Notice: There is no legacy documentation available for this item, so you are seeing the current documentation.
Purpose & version added
This filter can be used to enable or disable the Flyout menu.
Arguments (1)
- $enabled (boolean) – Whether the menu is enabled or not.
Example code snippet
The code snippet below is just an example of how this filter can be used. In the example below, we’ll disable the menu for all roles except for the administrator.
// Removes the Flyout menu for non-administrator users.
add_filter( 'aioseo_flyout_menu_enable', 'aioseo_filter_flyout_menu_enable' );
function aioseo_filter_flyout_menu_enable( $enabled ) {
if ( ! aioseo()->access->isAdmin() ) {
$enabled = false;
}
return $enabled;
}
Changelog
Version | Description |
4.1.5 | Introduced. |