Description:
This filter is called when loading the available default dimensions available for a SlideDeck. This filter is hooked into automatically by Lenses and will be the sizes property in the Lens JSON file by default. The structure of the data modified by this filter will be a two level associative array:
Array(
"small" => Array(
"label" => "Small",
"width" => 300,
"height" => 200
),
"medium" => Array(
"label" => "Medium",
"width" => 500,
"height" => 350
),
"large" => Array(
"label" => "Large",
"width" => 960,
"height" => 400
)
)
Usage:
To modify the sizes available to a SlideDeck, you would hook into this filter with the following code:
<?php add_filter( 'slidedeck_sizes', 'my_function_name', 10, 2 ); ?>
Parameters:
The slidedeck_sizes filter receives two parameters:
$sizes
(array) An associative array of the sizes available to a SlideDeck
$slidedeck
(array) The SlideDeck descriptor array
Return:
Return an associative array of sizes to show in the SlideDeck interface
Located In File:
/classes/slidedeck.php
Comments
0 comments
Article is closed for comments.