'ure_do_not_remove_from_admin_bar'
filter allows to add admin bar menu item ID to the ignore list in order URE’s admin menu access add-on does not block/hide/remove it. By default ignore list is a PHP array with these items:
$default_ignore_list = array(
'about',
'edit-profile',
'logout',
'my-account',
'switch-back',
'user-info'
);
$ignore_list = apply_filters('ure_do_not_remove_from_admin_bar', $default_ignore_list);
So you can use this filter as in example below (just replace menu item ID template with exact ID of menu item you wish to leave unblocked):
add_filter('ure_do_not_remove_from_admin_bar', 'my_do_not_remove_from_admin_bar', 10, 1 );
function my_do_not_remove_from_admin_bar( $ignore_list ) {
$ignore_list[] = 'admin_bar_menu_item_id_to_ignore';
return $ignore_list;
}
In case you don’t know the menu item ID or it’s assigned dynamically, you may use more smart version, like below, which checks if menu item link/URL contains ‘?flbuilder’ and add such menu item ID to the ignore list:
add_filter('ure_do_not_remove_from_admin_bar', 'my_do_not_remove_from_admin_bar', 10, 1 );
function my_do_not_remove_from_admin_bar( $ignore_list ) {
global $wp_admin_bar;
foreach( $wp_admin_bar as $menu_item ) {
if ( strpos( $menu_item->href, '?fl_builder')!==false) {
$ignore_list[] = $menu_item->id;
}
}
return $ignore_list;
}