Changeset 12110 for trunk/wp-admin/includes/media.php
- Timestamp:
- 10/26/2009 05:56:28 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/media.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r12098 r12110 1106 1106 */ 1107 1107 function get_media_item( $attachment_id, $args = null ) { 1108 global $ post_mime_types, $redir_tab;1108 global $redir_tab; 1109 1109 1110 1110 if ( ( $attachment_id = intval($attachment_id) ) && $thumb_url = get_attachment_icon_src( $attachment_id ) ) … … 1131 1131 } 1132 1132 1133 $type = ''; 1134 if ( isset($post_mime_types) ) { 1135 $keys = array_keys(wp_match_mime_types(array_keys($post_mime_types), $post->post_mime_type)); 1136 $type = array_shift($keys); 1137 $type_html = "<input type='hidden' id='type-of-$attachment_id' value='" . esc_attr( $type ) . "' />"; 1138 } 1133 $post_mime_types = get_post_mime_types(); 1134 $keys = array_keys(wp_match_mime_types(array_keys($post_mime_types), $post->post_mime_type)); 1135 $type = array_shift($keys); 1136 $type_html = "<input type='hidden' id='type-of-$attachment_id' value='" . esc_attr( $type ) . "' />"; 1139 1137 1140 1138 $form_fields = get_attachment_fields_to_edit($post, $errors);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)