Changeset 23853
- Timestamp:
- 03/29/2013 07:06:21 AM (11 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post-formats.php
r23843 r23853 5 5 ?> 6 6 <div class="post-format-description"></div> 7 <div class="post-formats-fields edit-form-section">7 <div class="post-formats-fields"> 8 8 9 9 <input type="hidden" name="post_format" id="post_format" value="<?php echo esc_attr( $post_format ); ?>" /> -
trunk/wp-admin/js/post-formats.js
r23851 r23853 4 4 var mediaFrame, lastMimeType, lastMenu, mediaPreview; 5 5 $(function(){ 6 var $container = $( '.post-formats-fields' ); 7 6 8 // Post formats selection 7 $('.post-format-options a').on( 'click', function(e){9 $('.post-format-options').on( 'click', 'a', function(e){ 8 10 var $this = $(this), editor, body, 9 11 parent = $this.parent(), … … 17 19 $('#post_format').val(format); 18 20 19 container.get(0).className = container.get(0).className.replace( /\bwp-format-[^ ]+/, '' ); 20 container.addClass('wp-format-' + format); 21 $container.slideUp( 200, function(){ 22 container.get(0).className = container.get(0).className.replace( /\bwp-format-[^ ]+/, '' ); 23 container.addClass('wp-format-' + format); 24 $container.slideDown( 400 ); 25 }); 26 21 27 $('#title').focus(); 22 28 … … 40 46 41 47 e.preventDefault(); 42 }).on('mouseenter focusin', function () {48 }).on('mouseenter focusin', 'a', function () { 43 49 $('.post-format-tip').html( $(this).prop('title') ); 44 }).on('mouseleave focusout', function () {50 }).on('mouseleave focusout', 'a', function () { 45 51 $('.post-format-tip').html( $('.post-format-options a.active').prop('title') ); 46 52 });
Note: See TracChangeset
for help on using the changeset viewer.