apply_filters( 'lp__admin_toolbar_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 the arguments for a specific admin toolbar (identified by its ID) by changing its class:
// Add the filter hook for customizing specific admin toolbar arguments by its id
add_filter( 'lp__admin_toolbar_args/specific-toolbar-id', function ( $args ) {
// Change the class of the specific toolbar
$args['class'] = 'test-class';
// Return the modified admin toolbar arguments
return $args;
});
After applying this customization, the specific admin toolbar identified by the ID ‘lp_main_toolbar’ will have its class updated to ‘test-class’. This change in class can affect the appearance or behavior of the toolbar as defined by your CSS or JavaScript.