mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 12:51:58 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@22743 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+7
-12
@@ -1322,10 +1322,9 @@ function wp_enqueue_media( $args = array() ) {
|
||||
unset( $tabs['type'], $tabs['type_url'], $tabs['gallery'], $tabs['library'] );
|
||||
|
||||
$settings = array(
|
||||
'tabs' => $tabs,
|
||||
'tabUrl' => add_query_arg( array(
|
||||
'chromeless' => true
|
||||
), admin_url('media-upload.php') ),
|
||||
'tabs' => $tabs,
|
||||
'tabUrl' => add_query_arg( array( 'chromeless' => true ), admin_url('media-upload.php') ),
|
||||
'mimeTypes' => wp_list_pluck( get_post_mime_types(), 0 ),
|
||||
);
|
||||
|
||||
$post = null;
|
||||
@@ -1354,16 +1353,12 @@ function wp_enqueue_media( $args = array() ) {
|
||||
'uploadMoreFiles' => __( 'Upload more files' ),
|
||||
|
||||
// Library
|
||||
'mediaLibraryTitle' => __( 'Media Library' ),
|
||||
'createNewGallery' => __( 'Create a new gallery' ),
|
||||
'insertIntoPost' => $hier ? __( 'Insert into page' ) : __( 'Insert into post' ),
|
||||
'returnToLibrary' => __( '← Return to library' ),
|
||||
|
||||
'mediaLibraryTitle' => __( 'Media Library' ),
|
||||
'createNewGallery' => __( 'Create a new gallery' ),
|
||||
'returnToLibrary' => __( '← Return to library' ),
|
||||
'allMediaItems' => __( 'All media items' ),
|
||||
'insertIntoPost' => $hier ? __( 'Insert into page' ) : __( 'Insert into post' ),
|
||||
'uploadedToThisPost' => $hier ? __( 'Uploaded to this page' ) : __( 'Uploaded to this post' ),
|
||||
'images' => __( 'Images' ),
|
||||
'audio' => __( 'Audio' ),
|
||||
'videos' => __( 'Videos' ),
|
||||
|
||||
// Embed
|
||||
'embedFromUrlTitle' => __( 'Embed From URL' ),
|
||||
|
||||
Reference in New Issue
Block a user