Make WordPress Core

Changeset 20060


Ignore:
Timestamp:
03/01/2012 06:57:28 PM (13 years ago)
Author:
ryan
Message:

Introduce jQuery Masonry. Use it to arrange header thumbnails on custom header screen. Props aaroncampbell. fixes #17242

Location:
trunk
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/custom-header.php

    r19815 r20060  
    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');
     
    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">
  • trunk/wp-includes/script-loader.php

    r19995 r20060  
    166166    $scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), false, 1 );
    167167    $scripts->add( 'jquery-postmessage', "/wp-includes/js/jquery/jquery.postmessage$suffix.js", array('jquery'), '0.5', 1 );
     168
     169    $scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$suffix.js", array('jquery'), '2.1.02', 1 );
    168170
    169171    $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20111117', 1 );
Note: See TracChangeset for help on using the changeset viewer.