Changeset 7124
- Timestamp:
- 03/01/2008 08:41:18 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/media.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r7105 r7124 33 33 if ( isset($_GET['tab']) && array_key_exists($_GET['tab'], $tabs) ) 34 34 $current = $_GET['tab']; 35 else 36 $current = array_shift(array_keys($tabs)); 35 else { 36 $keys = array_keys($tabs); 37 $current = array_shift($keys); 38 } 37 39 foreach ( $tabs as $callback => $text ) { 38 40 $class = ''; … … 240 242 241 243 if ( isset($_POST['send']) ) { 242 $send_id = (int) array_shift(array_keys($_POST['send'])); 244 $keys = array_keys($_POST['send']); 245 $send_id = (int) array_shift($keys); 243 246 $attachment = $_POST['attachments'][$send_id]; 244 247 $html = apply_filters('media_send_to_editor', get_the_attachment_link($send_id, 0, array(125,125), !empty($attachment['post_content'])), $send_id, $attachment); … … 630 633 631 634 if ( isset($post_mime_types) ) { 632 $type = array_shift(array_keys(wp_match_mime_types(array_keys($post_mime_types), $post->post_mime_type))); 635 $keys = array_keys(wp_match_mime_types(array_keys($post_mime_types), $post->post_mime_type)); 636 $type = array_shift($keys); 633 637 $type = "<input type='hidden' id='type-of-$attachment_id' value='$type' />"; 634 638 }
Note: See TracChangeset
for help on using the changeset viewer.