Changeset 45270 for trunk/src/wp-includes/media.php
- Timestamp:
- 04/26/2019 12:43:50 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r45232 r45270 3577 3577 } 3578 3578 3579 // Filter to show only available mime types.3580 $avail_post_mime_types = get_available_post_mime_types( 'attachment' );3581 $mimeTypes = wp_list_pluck( get_post_mime_types(), 0 );3582 foreach ( $mimeTypes as $mime_type => $label ) {3583 if ( ! wp_match_mime_types( $mime_type, $avail_post_mime_types ) ) {3584 unset( $mimeTypes[ $mime_type ] );3585 }3586 }3587 3579 $settings = array( 3588 3580 'tabs' => $tabs, 3589 3581 'tabUrl' => add_query_arg( array( 'chromeless' => true ), admin_url( 'media-upload.php' ) ), 3590 'mimeTypes' => $mimeTypes,3582 'mimeTypes' => wp_list_pluck( get_post_mime_types(), 0 ), 3591 3583 /** This filter is documented in wp-admin/includes/media.php */ 3592 3584 'captions' => ! apply_filters( 'disable_captions', '' ),
Note: See TracChangeset
for help on using the changeset viewer.