Make WordPress Core


Ignore:
Timestamp:
11/21/2012 10:18:59 AM (12 years ago)
Author:
koopersmith
Message:

Media: Dynamically generate attachment filters using get_post_mime_types().

Moves get_post_mime_types() from wp-admin/includes/post.php to wp-includes/post.php.

fixes #22514, see #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r22735 r22743  
    13231323
    13241324    $settings = array(
    1325         'tabs'   => $tabs,
    1326         'tabUrl' => add_query_arg( array(
    1327             'chromeless' => true
    1328         ), admin_url('media-upload.php') ),
     1325        'tabs'      => $tabs,
     1326        'tabUrl'    => add_query_arg( array( 'chromeless' => true ), admin_url('media-upload.php') ),
     1327        'mimeTypes' => wp_list_pluck( get_post_mime_types(), 0 ),
    13291328    );
    13301329
     
    13551354
    13561355        // Library
    1357         'mediaLibraryTitle' => __( 'Media Library' ),
    1358         'createNewGallery'  => __( 'Create a new gallery' ),
    1359         'insertIntoPost'    =>  $hier ? __( 'Insert into page' ) : __( 'Insert into post' ),
    1360         'returnToLibrary'   => __( '← Return to library' ),
    1361 
     1356        'mediaLibraryTitle'  => __( 'Media Library' ),
     1357        'createNewGallery'   => __( 'Create a new gallery' ),
     1358        'returnToLibrary'    => __( '← Return to library' ),
    13621359        'allMediaItems'      => __( 'All media items' ),
     1360        'insertIntoPost'     => $hier ? __( 'Insert into page' ) : __( 'Insert into post' ),
    13631361        'uploadedToThisPost' => $hier ? __( 'Uploaded to this page' ) : __( 'Uploaded to this post' ),
    1364         'images'             => __( 'Images' ),
    1365         'audio'              => __( 'Audio' ),
    1366         'videos'             => __( 'Videos' ),
    13671362
    13681363        // Embed
Note: See TracChangeset for help on using the changeset viewer.