Skip to content

fg_use_legacy_selection

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

Filter

add_filter('fg_use_legacy_selection', 'myprefix_make_fg_use_legacy_selection_mode' );

Description

This filter allows themes to force Featured Galleries to use the legacy selection method, where selecting multiple images requires using the SHIFT or COMMAND/CONTROL keys.

Callback Parameters

  • $useLegacySelection:
    • Type: Boolean
    • Description: A boolean which controls whether Feature Galleries will use the legacy selection mode or not.
    • Default Value: false
    • Possible Values: true or false

Examples

Example 1: This example force Featured Galleries to use the legacy selection method, where selecting multiple images requires using the SHIFT or COMMAND/CONTROL keys.

function myprefix_make_fg_use_legacy_selection_mode( $useLegacySelection ) {

    $useLegacySelection = true;

    return $useLegacySelection ;

}

add_filter('fg_use_legacy_selection', 'myprefix_make_fg_use_legacy_selection_mode' );

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_use_legacy_selection', function( $useLegacySelection ) {

    return true;

});
Clone this wiki locally