-
Notifications
You must be signed in to change notification settings - Fork 1
fg_use_legacy_selection
Andy Mercer edited this page Aug 2, 2018
·
5 revisions
add_filter('fg_use_legacy_selection', 'myprefix_make_fg_use_legacy_selection_mode' );
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.
-
$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
orfalse
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;
});