Categories
CMS Mastering Development Wordpress

Enable a role named ‘backend_user’ to access my plugin pages

I am new to plugin development and I am fairly okay with development by following all the plugin development best practices set by WordPress Codex. Following code describes on how Role: Administrator of WordPress gains access to the plugin. Administrator access to plugin in settings: SettingsApi.php public function register() { if ( ! empty($this->admin_pages) || […]

Categories
CMS Development Wordpress

How create a role with admin capability less 1 or 2?

I’ve created a new role and I need to give this role the full permissions and capability of an admin less create new admin user and edit plugin/themes. Is possible recall all and remove only the 3 I need, or i have to put 1 by 1 like in the code i posted (edit/delete post)? […]

Categories
CMS Development Wordpress

Unable to access theme activation page – permission issue

I am constantly getting the “Sorry, you are not allowed to access this page” when I click the submit_button from the theme activation. But if I go to the wp-admin page directly in the address bar I can see the dashboard. This is causing issues as part of the activation is to create pages, and […]

Categories
CMS Development Wordpress

Multisite custom user roles not working correctly

I am trying to create complete custom user roles for my multisite environment, but for some reason it doesn’t seem to work. I can’t seem to figure out why it won’t register correctly what permission it has or does not have. I have followed the codex and remove_role then add_role but that updates the capabilities, […]