apply_filters( 'lp__admin_sub_view_args/sub_view={sub_view}' )
Allow filter for specific admin sub view arguments during its preparation for registration.
Plugin
Namespace
Launchpad
Parameters
array
$args
Admin sub view arguments
Return
array
Filtered admin sub view arguments
Example
Here’s how you can customize the admin sub-view arguments for a specific admin page using the lp__admin_sub_view_args/sub_view={sub_view} filter:
// Add the filter hook for customizing admin sub-view arguments for a specific admin sub view page
add_filter( 'lp__admin_sub_view_args/sub_view=your-sub-view-page', function ( $args ) {
// Customize the arguments for the sub-views of the 'your-sub-view-page' admin sub view page
$args['sub_view_title'] = 'Sub View Title';
// Return the modified admin sub-view arguments
return $args;
});
After applying this customization, the sub-views within the specified admin sub view page (‘your-sub-view-page’) will have their arguments updated or modified based on the modifications made inside the filter callback function.