apply_filters( 'lp__admin_toolbar_menu_args/{id}', $args )
Allow filter for specific admin toolbar arguments during its preparation for registration.
Plugin
Namespace
Launchpad
Parameters
array
$args
Admin toolbar arguments
Return
array
Filtered admin toolbar arguments
Example
Here’s how you can customize specific admin toolbar menu arguments to set the toolbar menu icon to empty:
// Add the filter hook for customizing all admin toolbar menu arguments
add_filter( 'lp__admin_toolbar_menu_args/specific-toolbar-menu-id', function ( $args ) {
// Set the toolbar menu icon to empty
$args['icon'] = '';
// Return the modified admin toolbar menu arguments
return $args;
});
After applying this customization, the toolbar menu icons for all admin toolbar menus will be set to empty, effectively removing the icons from the toolbar menus.