How to give remove role editing permission from user

This will remove the option to change user group except if this is the administrator. The Codex states: While checking against particular roles in place of a capability is supported in part, this practice is discouraged as it may produce unreliable results. For this reason, I check for activate_plugins capability that normally only Admins will … Read more

how to set any post creation for pending status and let the admin approve it first?

if your website has users granted the edit_posts capability but not the publish_posts capability, then when those users start writing a new post, WordPress will display a “Submit for Review” button instead of a “Publish” button. Likewise, WordPress then assigns the post that user created the pending status when they press that button. This is … Read more

Iframe disappears when author updates page

Note that allowing iframes directly in a post content area can be dangerous, that’s why they’re stripped out for security reasons. Super admins on multisites or administrators on single sites have the unfiltered_html capability, and can insert anything they please into a post content area, but this is dangerous. For example, granting your author this … Read more

New user is assigned 2 roles: customer and superadmin

To restore super admin to just the admin username: <?php update_site_option( ‘site_admins’, array(‘admin’) ); ?> Place a PHP file with this line in your /wp-content/mu-plugins/ directory and access any site URL. Once done you can delete the file. Alternative you can edit the site_admins key directly in the wp_sitemeta table (but the first is easier … Read more