-
Notifications
You must be signed in to change notification settings - Fork 1
fg_show_sid℮bar
Andy Mercer edited this page Aug 2, 2018
·
5 revisions
add_filter( 'fg_show_sidebar', 'myprefix_show_fg_mediamanagermodal_sidebar' );
This filter allows themes to show, rather than hide, the right sidebar on the media manager modal, by filtering a boolean which is set to false
by default.
-
$showSidebar
:- Type: Boolean
- Description: A boolean which controls whether the right sidebar will be shown in the Media Manager Modal
- Default Value:
false
- Possible Values:
false
,true
Example 1: This will cause the details sidebar on the media manager modal to be visible.
function myprefix_show_fg_mediamanagermodal_sidebar( $showSidebar ) {
$showSidebar = true;
return $showSidebar ;
}
add_filter( 'fg_show_sidebar', 'myprefix_show_fg_mediamanagermodal_sidebar' );
Example 2: This example accomplishes the exact same thing as Example 1, but is less verbose. It's just another way to write the same thing.
add_filter( 'fg_show_sidebar', function( $showSidebar ) {
return true;
});