Ticket #43658: 43658.1.patch
File 43658.1.patch, 1.3 KB (added by , 6 years ago) |
---|
-
src/wp-includes/media.php
3567 3567 foreach ( $months as $month_year ) { 3568 3568 $month_year->text = sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month_year->month ), $month_year->year ); 3569 3569 } 3570 3570 /* settings 'mimeTypes' filter by available post mime types which is already done in media 'list' mode */ 3571 $avail_post_mime_types = get_available_post_mime_types( 'attachment' ); 3572 $mimeTypes = wp_list_pluck( get_post_mime_types(), 0 ); 3573 foreach ( $mimeTypes as $mime_type => $label ) { 3574 if ( ! wp_match_mime_types( $mime_type, $avail_post_mime_types ) ) { 3575 unset( $mimeTypes[$mime_type] ); 3576 } 3577 } 3571 3578 $settings = array( 3572 3579 'tabs' => $tabs, 3573 3580 'tabUrl' => add_query_arg( array( 'chromeless' => true ), admin_url( 'media-upload.php' ) ), 3574 'mimeTypes' => wp_list_pluck( get_post_mime_types(), 0 ),3581 'mimeTypes' => $mimeTypes, 3575 3582 /** This filter is documented in wp-admin/includes/media.php */ 3576 3583 'captions' => ! apply_filters( 'disable_captions', '' ), 3577 3584 'nonce' => array(