When lenses are loaded, SlideDeck 2's core will load all of its default lenses automatically as well as any lens that exists in the user lens folder (/wp-content/plugins/slidedeck-lenses). If you want to write your own lens and store it in a different location, but still want it to be available to SlideDeck 2, you can hook into this filter and add your lens to the array it processes.
Alternatively, you could also hook into this filter if you wanted to remove access to certain lenses based off of your own set of parameters (such as user level permissions of the currently logged in user).
To modify the array of available lenses, hook into this filter with the following code:
<?php add_filter( 'slidedeck_get_lenses', 'my_function_name', 10, 2 ); ?>
The slidedeck_get_lenses filter receives two parameters:
(array) The array of lens objects with their meta and other properties.
(string) Optional lens slug that may be present when a specific lens is being requested.
Any user function that hooks into this filter should always return an array of lens objects.
Located In File: