Make WordPress Core

Ticket #37390: 37390.1.diff

File 37390.1.diff, 1.7 KB (added by celloexpressions, 9 years ago)

Bump script version

  • src/wp-content/themes/twentythirteen/functions.php

     
    173173                wp_enqueue_script( 'jquery-masonry' );
    174174
    175175        // Loads JavaScript file with functionality specific to Twenty Thirteen.
    176         wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true );
     176        wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160717', true );
    177177
    178178        // Add Source Sans Pro and Bitter fonts, used in the main stylesheet.
    179179        wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null );
  • src/wp-content/themes/twentythirteen/js/functions.js

     
    119119        /**
    120120         * Arranges footer widgets vertically.
    121121         */
    122         if ( $.isFunction( $.fn.masonry ) ) {
    123                 var columnWidth = body.is( '.sidebar' ) ? 228 : 245,
    124                         widgetArea = $( '#secondary .widget-area' );
     122        $( function() {
     123                var columnWidth, widgetArea;
     124                if ( ! $.isFunction( $.fn.masonry ) ) {
     125                        return;
     126                }
     127                columnWidth = body.is( '.sidebar' ) ? 228 : 245;
     128                widgetArea = $( '#secondary .widget-area' );
    125129
    126130                widgetArea.masonry( {
    127131                        itemSelector: '.widget',
     
    157161                                }
    158162                        } );
    159163                }
    160         }
     164        } );
    161165} )( jQuery );
     166 No newline at end of file