diff --git a/wp-admin/includes/post-formats.php b/wp-admin/includes/post-formats.php index a1bf209597..be0d4580ad 100644 --- a/wp-admin/includes/post-formats.php +++ b/wp-admin/includes/post-formats.php @@ -4,7 +4,7 @@ $format_meta = get_post_format_meta( $post_ID ); ?>
-
+
diff --git a/wp-admin/js/post-formats.js b/wp-admin/js/post-formats.js index d7b799c268..8f582616dc 100644 --- a/wp-admin/js/post-formats.js +++ b/wp-admin/js/post-formats.js @@ -3,8 +3,10 @@ window.wp = window.wp || {}; (function($) { var mediaFrame, lastMimeType, lastMenu, mediaPreview; $(function(){ + var $container = $( '.post-formats-fields' ); + // Post formats selection - $('.post-format-options a').on( 'click', function(e){ + $('.post-format-options').on( 'click', 'a', function(e){ var $this = $(this), editor, body, parent = $this.parent(), format = $this.data('wp-format'), @@ -16,8 +18,12 @@ window.wp = window.wp || {}; $('#icon-edit').removeClass(postFormats.currentPostFormat).addClass(format); $('#post_format').val(format); - container.get(0).className = container.get(0).className.replace( /\bwp-format-[^ ]+/, '' ); - container.addClass('wp-format-' + format); + $container.slideUp( 200, function(){ + container.get(0).className = container.get(0).className.replace( /\bwp-format-[^ ]+/, '' ); + container.addClass('wp-format-' + format); + $container.slideDown( 400 ); + }); + $('#title').focus(); // Update description line @@ -39,9 +45,9 @@ window.wp = window.wp || {}; postFormats.currentPostFormat = format; e.preventDefault(); - }).on('mouseenter focusin', function () { + }).on('mouseenter focusin', 'a', function () { $('.post-format-tip').html( $(this).prop('title') ); - }).on('mouseleave focusout', function () { + }).on('mouseleave focusout', 'a', function () { $('.post-format-tip').html( $('.post-format-options a.active').prop('title') ); });