skip to Main Content
My WP Add-on Select User Roles

My WP Add-on Select User Roles

Description

Add-on the apply customize for selected user roles on My WP.

 

Feature Details

You can possible to apply customize for your selected user roles group and easy-to-use.

Add-ons Select User Roles Setting Screen

 

Supported compatible version for WordPress

Supported version is same to My WP Customize plugin. Check to version https://wordpress.org/plugins/my-wp/.

 

Download

This add-on is free. Please download the GitHub https://github.com/gqevu6bsiz/mywp_addon_select_user_roles.

 

How to installation

  1. Please download the latest version of My WP Add-on Select User Roles.
  2. Unzip the download file and upload the entire mywp-select-user-roles to the /wp-content/plugins/ directory.
  3. Activate the plugin through the Plugins menu in WordPress.
  4. You will find User Roles child menu in My WP of your WordPress admin panel.
This Post Has 4 Comments
  1. My WP Add-on Select User Roles doesn’t seem to work with WordPress 5.1 …

    Without this, the whole idea of managing the WP UI looses a lot of its value, compared with “WP Admin UI Customize”, wich offered much more value compared with its new replacement. Pity … 🙁

    1. Thank you for your comment.
      I just check to work with WP 5.1 and My WP Add-on Select User Roles, it seems to work well. e.g.) Dashboard
      could you tell me your problem details?
      Thanks and Regards!

  2. Hi,
    it is great that I can specify certain the admin user role as well. But what to do if I have 2 admins and only want to hide things for 1 admin?
    But do you have something like a “superadmin” for a non multisite install?
    Why do I ask for? Well, I have a plug-in installed, which has only “admin” rights, which I need to give access to an author.
    Thank you for your kind answer.
    Luko

    1. Thank you for your comment.
      My WP Customize and this Add-on is not have your said feature(superadmin for singlesite install). But I think there two ways.
      1: Sub admin similar to admin.
      Create a user roles group “sub admin” to grant the same feature as admin. And you can customize for sub admin.
      2: Filters for specific admin
      You can custom filters for specific admin after My WP Add-on Select User Roles.
      e.g.)

      add_filter( 'mywp_controller_is_do' , 'custom_mywp_controller_is_do' , 10 , 2 );
      
      function custom_mywp_controller_is_do( $is_do_controller , $controller_id ) {
      
        if( ! class_exists( 'MywpUser' ) ) {
      
          return $is_do_controller;
      
        }
      
        $mywp_user = new MywpUser();
      
        $current_user_role = $mywp_user->get_user_role();
      
        if( empty( $current_user_role ) or $current_user_role !== 'administrator' ) {
      
          return $is_do_controller;
      
        }
      
        $user_id = $mywp_user->get_user_id();
      
        if( $user_id === 1 ) {
      
          return false; // Exclude customize
      
        }
      
        return true; // Do customize
      
      }
      

      Thanks and Regards!

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top