Skip to content

fg_show_sid℮bar

Andy Mercer edited this page Aug 2, 2018 · 5 revisions

Filter

add_filter( 'fg_show_sidebar', 'myprefix_show_fg_mediamanagermodal_sidebar' );

Description

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.

Callback Parameters

  • $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

Examples

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;

});
Clone this wiki locally