Make WordPress Core

Ticket #28825: 28825.patch

File 28825.patch, 1.6 KB (added by ocean90, 11 years ago)
  • src/wp-admin/upload.php

     
    3333        add_screen_option( 'mime', array( 'label' => __( 'Mime-type' ) ) );
    3434
    3535        require_once( ABSPATH . 'wp-admin/admin-header.php' );
     36        ?>
     37        <div class="wrap">
     38                <h2>
     39                <?php
     40                echo esc_html( $title );
     41                if ( current_user_can( 'upload_files' ) ) { ?>
     42                        <a href="media-new.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'file'); ?></a><?php
     43                }
     44                ?>
     45                </h2>
     46        </div>
     47        <?php
    3648        include( ABSPATH . 'wp-admin/admin-footer.php' );
    3749        exit;
    3850}
  • src/wp-includes/js/media-grid.js

     
    201201                        libraryState = new media.controller.Library({
    202202                                library:    media.query( options.library ),
    203203                                multiple:   options.multiple,
    204                                 title:      options.title,
     204                                title:      '',
    205205                                priority:   20,
    206206                                toolbar:    false,
    207207                                router:     false,
     
    209209                                filterable: 'mime-types'
    210210                        });
    211211
    212                         libraryState._renderTitle = function( view ) {
    213                                 var text = this.get('title') || '';
    214                                 view.$el.addClass( 'wrap' );
    215                                 text += '<a class="add-new-h2">Add New</a>';
    216                                 view.$el.html( text );
    217                         };
    218212                        // Add the default states.
    219213                        this.states.add([
    220214                                libraryState
     
    693687                }
    694688        });
    695689
    696 }(jQuery, _, Backbone, wp));
    697  No newline at end of file
     690}(jQuery, _, Backbone, wp));