Source file: modules/carousel/jetpack-carousel.php
View in GitHubParameters
- $localize_strings
-
(array) Array of strings passed to the Jetpack js file.
Changelog
Since: Jetpack 1.6.0
Notes
This filter allows you to filter the EXIF tags displayed in the Carousel view. New fields can be added like so:
function jp_custom_exif_info( $js ) { // Add tag to list $js['meta_data'][] = 'credit'; // Add translation for tag $js['credit'] = __( 'Credit', 'jetpack' ); return $js; } add_filter( 'jp_carousel_localize_strings', 'jp_custom_exif_info');
You can also use the filter to redefine the tags that will be displayed by overwriting the list with a full array instead of appending an item like in the previous example:
function jp_custom_exif_info( $js ) { // Overwrite with a new list $js['meta_data'] = array( 'copyright', 'credit' ); // Add translation for tag $js['credit'] = __( 'Credit', 'jetpack' ); return $js; } add_filter( 'jp_carousel_localize_strings', 'jp_custom_exif_info');