Skip to content

Commit

Permalink
Carousel: allow to filter EXIF tags that will be displayed in lightbox (
Browse files Browse the repository at this point in the history
  • Loading branch information
eliorivero authored and samhotchkiss committed Feb 10, 2017
1 parent b78d04a commit adbde22
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion modules/carousel/jetpack-carousel.css
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ div#carousel-reblog-box {

.jp-carousel-image-meta li {
width: 48% !important;
float: left !important;
display: inline-block !important;
vertical-align: top !important;
margin: 0 2% 15px 0 !important;
color: #fff !important;
font-size:13px !important;
Expand Down
2 changes: 1 addition & 1 deletion modules/carousel/jetpack-carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ jQuery(document).ready(function($) {
var $ul = $( '<ul class=\'jp-carousel-image-exif\'></ul>' );

$.each( meta, function( key, val ) {
if ( 0 === parseFloat(val) || !val.length || -1 === $.inArray( key, [ 'camera', 'aperture', 'shutter_speed', 'focal_length' ] ) ) {
if ( 0 === parseFloat(val) || !val.length || -1 === $.inArray( key, $.makeArray( jetpackCarouselStrings.meta_data ) ) ) {
return;
}

Expand Down
4 changes: 3 additions & 1 deletion modules/carousel/jetpack-carousel.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function check_if_shortcode_processed_and_enqueue_assets( $output ) {

function enqueue_assets() {
if ( $this->first_run ) {
wp_enqueue_script( 'jetpack-carousel', plugins_url( 'jetpack-carousel.js', __FILE__ ), array( 'jquery.spin' ), $this->asset_version( '20160325' ), true );
wp_enqueue_script( 'jetpack-carousel', plugins_url( 'jetpack-carousel.js', __FILE__ ), array( 'jquery.spin' ), $this->asset_version( '20170209' ), true );

// Note: using home_url() instead of admin_url() for ajaxurl to be sure to get same domain on wpcom when using mapped domains (also works on self-hosted)
// Also: not hardcoding path since there is no guarantee site is running on site root in self-hosted context.
Expand Down Expand Up @@ -231,11 +231,13 @@ function enqueue_assets() {
'aperture' => __( 'Aperture', 'jetpack' ),
'shutter_speed' => __( 'Shutter Speed', 'jetpack' ),
'focal_length' => __( 'Focal Length', 'jetpack' ),
'copyright' => __( 'Copyright', 'jetpack' ),
'comment_registration' => $comment_registration,
'require_name_email' => $require_name_email,
/** This action is documented in core/src/wp-includes/link-template.php */
'login_url' => wp_login_url( apply_filters( 'the_permalink', get_permalink() ) ),
'blog_id' => (int) get_current_blog_id(),
'meta_data' => array( 'camera', 'aperture', 'shutter_speed', 'focal_length', 'copyright' )
);

if ( ! isset( $localize_strings['jetpack_comments_iframe_src'] ) || empty( $localize_strings['jetpack_comments_iframe_src'] ) ) {
Expand Down

0 comments on commit adbde22

Please sign in to comment.