WordPress.org

Make WordPress Core

Ticket #17242: 17242.masonry.2.diff

File 17242.masonry.2.diff, 1.5 KB (added by aaroncampbell, 6 years ago)
  • wp-includes/script-loader.php

     
    165165        $scripts->add( 'jquery-hotkeys', "/wp-includes/js/jquery/jquery.hotkeys$suffix.js", array('jquery'), '0.0.2m', 1 );
    166166        $scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), false, 1 );
    167167
     168        $scripts->add( 'jquery-masonry', "/wp-includes/js/jquery.masonry$suffix.js", array('jquery'), '2.1.02', 1 );
     169
    168170        $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20111117', 1 );
    169171        $scripts->localize( 'thickbox', 'thickboxL10n', array(
    170172                        'next' => __('Next >'),
  • wp-admin/custom-header.php

     
    140140        function js_includes() {
    141141                $step = $this->step();
    142142
     143                if ( 1 == $step )
     144                        wp_enqueue_script('jquery-masonry');
    143145                if ( ( 1 == $step || 3 == $step ) && $this->header_text() )
    144146                        wp_enqueue_script('farbtastic');
    145147                elseif ( 2 == $step )
     
    637639        <?php endif; ?>
    638640</tbody>
    639641</table>
    640 
     642<script type="text/javascript">
     643jQuery(function() {
     644        jQuery('.available-headers').masonry({
     645                itemSelector: '.default-header'
     646        });
     647});
     648</script>
    641649        <?php if ( $this->header_text() ) : ?>
    642650<table class="form-table">
    643651<tbody>