apply_filters ( 'jp_carousel_localize_strings', array $localize_strings )

Filter the strings passed to the Carousel's js file.

Source file: modules/carousel/jetpack-carousel.php

View in GitHub

Parameters

$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');

Have a note to contribute?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s