How to write a plugin to add users to a mail list

You would hook into profile_update and user_register. First check to see if it’s a new user and whether she is an admin/editor. Then send the mail. Same story with updating the user: see if the role has changed, and whether the new role is admin or editor. <?php add_action( ‘profile_update’, ‘wpse33949_profile_update’ ); add_action( ‘user_register’, ‘wpse33949_profile_update’ … Read more

Why does my multisite blog doesn’t show users?

Had the same problem. The issue was in wp_options table. Find line where option name is wp_user_roles and look what’s going on there. This line is responsible for user roles, and if they are an a mess, users canot be shown as well. Better copy option_value from the other table. (Change wp_ to your prefix).

Hide active themes on multisite subdomains

You could remove the ‘switch_themes’ capability from the ‘administrator’ role, which should prevent regular admins (as opposed to the network superadmin) from being able to switch their theme. Try this: add_action(‘admin_init’, ‘custom_remove_switch_themes_role_from_admins’); function custom_remove_switch_themes_role_from_admins(){ global $wp_roles; $wp_roles->remove_cap(‘administrator’, ‘switch_themes’); } EDIT: From a bit more extended testing with this above function, I noticed some issues when … Read more