diff --git wp-admin/edit-form-advanced.php wp-admin/edit-form-advanced.php
index 801072a..30fce33 100644
|
|
if ( post_type_supports($post_type, 'editor') ) { |
460 | 460 | ?> |
461 | 461 | <div id="postdivrich" class="postarea edit-form-section"> |
462 | 462 | |
463 | | <?php wp_editor($post->post_content, 'content', array('dfw' => true, 'tabfocus_elements' => 'insert-media-button,save-post', 'editor_height' => 360) ); ?> |
464 | | |
| 463 | <?php wp_editor( $post->post_content, 'content', array( |
| 464 | 'dfw' => true, |
| 465 | 'tabfocus_elements' => 'insert-media-button,save-post', |
| 466 | 'editor_height' => in_array( $post_format, array( 'status', 'aside' ) ) ? 120 : 360 |
| 467 | ) ); ?> |
465 | 468 | <table id="post-status-info" cellspacing="0"><tbody><tr> |
466 | 469 | <td id="wp-word-count"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></td> |
467 | 470 | <td class="autosave-info"> |
diff --git wp-admin/js/post-formats.js wp-admin/js/post-formats.js
index 33f2e96..f135dc1 100644
|
|
|
1 | 1 | window.wp = window.wp || {}; |
2 | 2 | |
3 | 3 | (function($) { |
4 | | var container, mediaFrame, lastMimeType, mediaPreview, lastHeight, content, |
5 | | $container = $( '.post-formats-fields' ), |
| 4 | var container, $container, mediaFrame, lastMimeType, mediaPreview, lastHeight = 360, content, |
| 5 | initialFormat = 'standard', |
6 | 6 | shortClass = 'short-format', |
7 | 7 | shortContentFormats = ['status', 'aside'], |
8 | 8 | noUIFormats = ['standard', 'chat', 'status', 'aside', 'gallery'], |
… |
… |
window.wp = window.wp || {}; |
16 | 16 | $screenIcon.addClass('wp-format-' + format); |
17 | 17 | } |
18 | 18 | |
19 | | function resizeContent( shorter ) { |
20 | | content = content || $('#content, #content_ifr'); |
21 | | if ( shorter ) { |
| 19 | function resizeContent( format, noAnimate ) { |
| 20 | var height; |
| 21 | |
| 22 | content = $('#content, #content_ifr'); |
| 23 | |
| 24 | height = content.height(); |
| 25 | if ( 120 < height ) { |
| 26 | lastHeight = height; |
| 27 | } |
| 28 | |
| 29 | if ( -1 < $.inArray( format, shortContentFormats ) ) { |
22 | 30 | if ( ! content.hasClass(shortClass) ) { |
23 | | lastHeight = content.height(); |
24 | | content.addClass(shortClass).animate({ height : 120 }); |
| 31 | content.addClass(shortClass); |
| 32 | if ( noAnimate ) { |
| 33 | content.each(function () { |
| 34 | $(this).css({ height : 120 }); |
| 35 | }); |
| 36 | } else { |
| 37 | content.each(function () { |
| 38 | $(this).animate({ height : 120 }); |
| 39 | }); |
| 40 | } |
25 | 41 | } |
26 | | } else if ( lastHeight ) { |
| 42 | } else { |
27 | 43 | content.removeClass(shortClass).animate({ height : lastHeight }); |
28 | 44 | } |
29 | 45 | } |
… |
… |
window.wp = window.wp || {}; |
53 | 69 | }); |
54 | 70 | } |
55 | 71 | |
56 | | resizeContent( -1 < $.inArray( format, shortContentFormats ) ); |
| 72 | resizeContent( format ); |
57 | 73 | |
58 | 74 | postTitle.focus(); |
59 | 75 | |
… |
… |
window.wp = window.wp || {}; |
79 | 95 | postFormats.currentPostFormat = format; |
80 | 96 | } |
81 | 97 | |
82 | | $(function(){ |
| 98 | $(function() { |
| 99 | $container = $( '.post-formats-fields' ); |
| 100 | |
| 101 | initialFormat = $( '.post-format-options .active' ).data( 'wp-format' ); |
| 102 | if ( -1 < $.inArray( initialFormat, shortContentFormats ) ) { |
| 103 | resizeContent( initialFormat, true ); |
| 104 | } |
83 | 105 | |
84 | 106 | $('.post-format-change a').click(function() { |
85 | 107 | $('.post-formats-fields, .post-format-change').slideUp(); |