Filter: um_nav_menu_roles_item_visibility

apply_filters( 'um_nav_menu_roles_item_visibility', $visible, $item ) → {bool}

Filters menu item visibility base on Ultimate Member visibility settings.

Parameters:
Name Type Description
$visible bool

Menu item visibility.

$item object

Menu item instance.

Since:
  • 1.3.x
Source:
Returns:

Menu item visibility.

Type
bool
Example

Make the menu item visible for some custom reason.

function my_nav_menu_roles_item_visibility( $visible, $item ) {
    $visible = true;
    return $visible;
}
add_filter( 'um_nav_menu_roles_item_visibility', 'my_nav_menu_roles_item_visibility', 10, 2 );