Ticket #24013: #24013.patch
File #24013.patch, 1.1 KB (added by , 12 years ago) |
---|
-
edit-form-advanced.php
529 529 if ( post_type_supports( $post_type, 'comments' ) ) 530 530 wp_comment_reply(); 531 531 ?> 532 532 <?php 533 wp_enqueue_script( 534 'add-media-hider', 535 get_admin_url() . '/js/add-media-hider.js', 536 array( 'jquery' ) 537 ); 538 ?> 533 539 <?php if ( (isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message']) ) : ?> 534 540 <script type="text/javascript"> 535 541 try{document.post.title.focus();}catch(e){} -
js/add-media-hider.js
1 (function ($) { 2 $('.post-format-options a').click( function() { 3 if ( $(this).attr('data-wp-format') == 'aside' || $(this).attr('data-wp-format') == 'status' ) { 4 $('#insert-media-button').addClass('hidden') ; 5 } else { 6 $('#insert-media-button').removeClass('hidden') ; 7 } 8 }); 9 }(jQuery));