Disable HTML Editor In WordPress

In contrast to the visual editor in WordPress, you can not disable the HTML editor. WordPress does not provide a user setting or a global option. Also, there is no hook, to disable the HTML tab above the editor when writing posts or pages.

But there are users who do not need this tab and like to deactivate it globally. Therefore, I have a solution, how you can disable it in your editor.
Alternatively, you can use the Plugin Adminimize, which offers such a possibility per role, just put it in the settings.
Continue reading …

Display The Total Number Of Registered Users

WordPress-Christmas-09Anyone who operates a community using WordPress, and would like to display the total number of registered users, can easily and quickly use the following small code snippet.

It reads via SQL the content of the table "users", and the numbers of IDs getting counted. This value simply gets wrapped around a text.

$myusers = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users");
echo sprintf( __('We have %s registered user.', 'myTextDomain') , $myusers );