Change WordPress user roles and capabilities › Forums › Bug Reports › Some Buddypress menu item not detected
Tagged: Buddypress
- This topic has 5 replies, 2 voices, and was last updated 10 years ago by
Vladimir.
-
AuthorPosts
-
12/03/2016 at 10:00 #2104
dweb360
ParticipantHello,
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-redirectI 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
12/03/2016 at 10:10 #2105dweb360
ParticipantHello,
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
12/03/2016 at 17:43 #2107dweb360
ParticipantHello,
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 you13/03/2016 at 02:01 #2109Vladimir
KeymasterHello,
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.
13/03/2016 at 02:15 #2110Vladimir
KeymasterIn 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'); } }13/03/2016 at 02:19 #2111Vladimir
KeymasterIn relation to the screenshots with capabilities:
– Is it possible that you have different set of plugins activated on these sites? -
AuthorPosts
- You must be logged in to reply to this topic.