Make WordPress Core

Ticket #24013: 24013.2.diff

File 24013.2.diff, 946 bytes (added by aniketpant, 12 years ago)

Fix for #24013 after revision 24036

  • wp-admin/js/post-formats.js

     
    33(function($) {
    44        var container, mediaFrame, lastMimeType, mediaPreview,
    55                noUIFormats = ['standard', 'chat', 'status', 'aside', 'gallery'],
     6                noInsertMediaButtonFormats = ['aside', 'status'],
    67                $container = $( '.post-formats-fields' );
    78
    89        function switchFormatClass( format ) {
     
    2526                $('#post_format').val(format);
    2627                $('.post-format-change').show().find('span.icon').removeClass(postFormats.currentPostFormat).addClass(format);
    2728
     29                if ( -1 < $.inArray( format, noInsertMediaButtonFormats ) )  {
     30                        $('#insert-media-button').hide();
     31                } else {
     32                        $('#insert-media-button').show();
     33                }
     34
    2835                if ( -1 < $.inArray( format, noUIFormats ) ) {
    2936                        switchFormatClass( format ); // No slide
    3037                        $container.hide();