I would like to deactivate a plugin for a specific user. I'm using the following code inside a the wp-content/plugin-mu plugin file: add_filter( 'option_active_plugins', 'bo_disable_apm_plugin' ); ...
How can I update the role of a newly added user when displaying the registration form with a shortcode?
Basically I have a shortcode that includes a registration form(among other things). The custom form itself is also included on wp-login.php and user-new.php if the default role is set to ...
I've added an action to my functions.php file that forces a plugin (Content Scheduler) to act on posts, even when it wasn't explicitly enabled by the person writing the post. I've got that working, ...
I was surprised to discover that add_role() modifies the database and fails if the role already exists. There are two implications here, one first more serious than the other: 1) if you're in ...
I'm going to be using add_role() and $role->add_cap() to set up a new custom role and attach a new capability to existing roles. I'm wondering where the best place to do this is? Obviously I can do ...