Changeset 10696
- Timestamp:
- 03/04/2009 08:22:25 AM (16 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/async-upload.php
r9699 r10696 31 31 echo get_media_item($id, array( 'send' => false, 'delete' => false )); 32 32 } else { 33 add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2); 33 34 echo get_media_item($id); 34 35 } -
trunk/wp-admin/css/colors-classic.css
r10349 r10696 1578 1578 background: transparent url(../images/wp-logo.gif) no-repeat scroll center center; 1579 1579 } 1580 1581 input[readonly] { 1582 background-color: #eee; 1583 } -
trunk/wp-admin/css/colors-fresh.css
r10349 r10696 1578 1578 background: transparent url(../images/wp-logo.gif) no-repeat scroll center center; 1579 1579 } 1580 1581 input[readonly] { 1582 background-color: #eee; 1583 } -
trunk/wp-admin/includes/media.php
r10640 r10696 839 839 if ( substr($post->post_mime_type, 0, 5) == 'image' ) { 840 840 $form_fields['post_title']['required'] = true; 841 $file = wp_get_attachment_url($post->ID); 842 843 $form_fields['image_url']['value'] = $file; 841 844 842 845 $form_fields['post_excerpt']['label'] = __('Caption'); … … 869 872 function media_single_attachment_fields_to_edit( $form_fields, $post ) { 870 873 unset($form_fields['url'], $form_fields['align'], $form_fields['image-size']); 874 return $form_fields; 875 } 876 877 function media_post_single_attachment_fields_to_edit( $form_fields, $post ) { 878 unset($form_fields['image_url']); 871 879 return $form_fields; 872 880 } … … 943 951 if ( is_array($post) ) 944 952 $post = (object) $post; 953 954 $image_url = wp_get_attachment_url($post->ID); 945 955 946 956 $edit_post = sanitize_post($post, 'edit'); … … 970 980 'value' => $edit_post->menu_order 971 981 ), 982 'image_url' => array( 983 'label' => __('File URL'), 984 'input' => 'html', 985 'html' => "<input type='text' class='urlfield' readonly='readonly' name='attachments[$post->ID][url]' value='" . attribute_escape($image_url) . "' /><br />", 986 'value' => $edit_post->post_url, 987 'helps' => __('Location of the uploaded file.'), 988 ) 972 989 ); 973 990 … … 1372 1389 if ( $id ) { 1373 1390 if ( !is_wp_error($id) ) { 1391 add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2); 1374 1392 echo get_media_items( $id, $errors ); 1375 1393 } else { … … 1538 1556 </table> 1539 1557 <div id="media-items"> 1558 <?php add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2); ?> 1540 1559 <?php echo get_media_items($post_id, $errors); ?> 1541 1560 </div> … … 1771 1790 1772 1791 <div id="media-items"> 1792 <?php add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2); ?> 1773 1793 <?php echo get_media_items(null, $errors); ?> 1774 1794 </div>
Note: See TracChangeset
for help on using the changeset viewer.