Change WordPress user roles and capabilities Forums Bug Reports Some Buddypress menu item not detected

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2104
    dweb360
    Participant

    Hello,
    in The Administrator Menu Access module, i can’t see some menus displayed by Buddypress
    Example :
    themes.php?page=bp-emails-customizer-redirect
    or
    edit.php?post_type=bp-email&page=bp-emails-customizer-redirect

    I try this code in functions.php, but not working :


    function custom_menu_page_removing() {

    if ( ! current_user_can( 'update_core' ) ) {
    remove_menu_page( 'theme_my_login' );
    remove_menu_page( 'revslider' );
    remove_menu_page( 'edit.php?post_type=acf-field-group' );
    remove_menu_page( 'vc-general' );
    remove_menu_page( 'duplicator' );
    remove_menu_page( 'themes.php?page=bp-emails-customizer-redirect' );
    remove_menu_page( 'bp-emails-customizer-redirect' );
    }

    }
    add_action( 'admin_menu', 'custom_menu_page_removing' );

    Thank you for your help

    #2105
    dweb360
    Participant

    Hello,
    I have removed a menu item via :

    remove_submenu_page( ‘themes.php’, ‘bp-emails-customizer-redirect’ );

    but can’t remove this one :

    edit.php?post_type=bp-email&page=bp-emails-customizer-redirect

    Thank you

    #2107
    dweb360
    Participant

    Hello,
    I made a clone of the website and now in the clone we can hide the menu via your plugin but in the original it is not displayed also capabilities are nor displayed in the same manner !!!
    original : http://hpics.li/9e6f873
    clone : http://hpics.li/ee6fb12
    Thank you

    #2109
    Vladimir
    Keymaster

    Hello,

    I confirm the bug with menu items similar to BuddyPress. It’s fixed at upcoming version 4.23.3. I plan to publish it in a couple of days.

    #2110
    Vladimir
    Keymaster

    In order to remove ‘Emails->Customize’ menu item use this code:

    
    add_action('admin_menu', 'my_remove_buddypress', 20);
    
    function my_remove_buddypress() {
      
        if (current_user_can('your-own-role')) {     
            remove_submenu_page('edit.php?post_type=bp-email', 'bp-emails-customizer-redirect');
        }
      
    }
    
    #2111
    Vladimir
    Keymaster

    In relation to the screenshots with capabilities:
    – Is it possible that you have different set of plugins activated on these sites?

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.