Ticket #13429: 13429.2.patch
File 13429.2.patch, 1017 bytes (added by , 14 years ago) |
---|
-
wp-admin/includes/media.php
444 444 } 445 445 } 446 446 447 if ( isset($attachment['url']) ) 448 update_post_meta( $attachment_id, '_wp_attachment_url', esc_url_raw($attachment['url']) ); 449 447 450 if ( isset($post['errors']) ) { 448 451 $errors[$attachment_id] = $post['errors']; 449 452 unset($post['errors']); … … 907 910 if ( empty($url_type) ) 908 911 $url_type = get_user_setting('urlbutton', 'post'); 909 912 910 $url = ''; 911 if ( $url_type == 'file' ) 912 $url = $file; 913 elseif ( $url_type == 'post' ) 914 $url = $link; 913 $url = get_post_meta( $post->ID, '_wp_attachment_url', true ); 914 if ( empty($url) ) { 915 if ( $url_type == 'file' ) 916 $url = $file; 917 elseif ( $url_type == 'post' ) 918 $url = $link; 919 } 915 920 916 921 return " 917 922 <input type='text' class='text urlfield' name='attachments[$post->ID][url]' value='" . esc_attr($url) . "' /><br />