filter

jp_carousel_localize_strings

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

Parameters

$localize_strings
array

Array of strings passed to the Jetpack js file.

Changelog

How to use this hook

See “How to use actions and filters to customize Jetpack”.

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