Ticket #13528: wp-admin_includes_media.php.patch
File wp-admin_includes_media.php.patch, 1.5 KB (added by , 11 years ago) |
---|
-
wp-admin/includes/media.php
907 907 elseif ( $url_type == 'post' ) 908 908 $url = $link; 909 909 910 return"910 $output = " 911 911 <input type='text' class='text urlfield' name='attachments[$post->ID][url]' value='" . esc_attr($url) . "' /><br /> 912 912 <button type='button' class='button urlnone' title=''>" . __('None') . "</button> 913 <button type='button' class='button urlfile' title='" . esc_attr($file) . "'>" . __('File URL') . "</button>914 913 <button type='button' class='button urlpost' title='" . esc_attr($link) . "'>" . __('Post URL') . "</button> 915 914 "; 915 916 if( wp_attachment_is_image($post->ID) ) { 917 $size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full Size')); 918 919 foreach( $size_names AS $size => $size_name ) { 920 $image = image_downsize($post->ID, $size); 921 if( $image ) 922 $output .= "\t<button type='button' class='button url". $size ."' title='" . esc_attr($image[0]) . "'>" . __($size_name) . "</button>\n"; 923 } 924 } else { 925 $output .= "\t<button type='button' class='button urlfile' title='" . esc_attr($file) . "'>" . __('File URL') . "</button>\n"; 926 } 927 return $output; 916 928 } 917 929 918 930 /**