What do I have to edit, to set "image size" in media manager to "Full Size" as the default, instead of medium?
I have a feeling its something in media.php, somebody point me in the right direction ; )
What do I have to edit, to set "image size" in media manager to "Full Size" as the default, instead of medium?
I have a feeling its something in media.php, somebody point me in the right direction ; )
ok.
HANDLE WITH CARE AND BACKUP YOUR FILES BEFORE DOING THAT .
what you look for is not in media.php but in upload.js inside js folder inside wp-admin folder. around line 126.
and in file script-loader.php inside wp-includes folder around line 130 you will find this :
'thumb' => __('Thumbnail'),
'full' => __('Full size'),
'icon' => __('Icon'),
'title' => __('Title'),
this givees a "name" to the options for the jscript.
Modify on your own risk
Hi thanks for the response, I have looked at upload.js and I cant work out what I need to do. There is no mention of "medium" anywhere in upload.js or script-loader.php, only full and thumb.
Are these the lines I should focus on?
var display = [];
var checkedDisplay = 'display-title';
if ( 1 == this.currentImage.isImage ) {
checkedDisplay = 'display-full';
if ( this.currentImage.thumb ) {
display.push("<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' /> " + this.thumb + "</label>");
checkedDisplay = 'display-thumb';
}
display.push("<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> " + this.full + "</label>");
} else if ( this.currentImage.thumb ) {
display.push("<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' /> " + this.icon + "</label>");
}
if ( display.length ) {
display.push("<label for='display-title'><input type='radio' name='display' id='display-title' value='title' /> " + this.title + "</label>");
h += "<tr><th style='padding-bottom:.5em'>" + this.show + "</th><td style='padding-bottom:.5em'>";
jQuery(display).each( function() { h += this; } );
h += "</td></tr>";
}Found this topic looking for the same solution. Kujina, you were right from the start! I was able to change the default size in wp-admin/includes/media.php, in the following section: (starting line 452)
$form_fields['image-size'] = array(
'label' => __('Size'),
'input' => 'html',
'html' => "
" . ( $thumb ? "<input type='radio' name='attachments[$post->ID][image-size]' id='image-size-thumb-$post->ID' value='thumbnail' />
<label for='image-size-thumb-$post->ID'>" . __('Thumbnail') . "</label>
" : '' ) . "<input type='radio' name='attachments[$post->ID][image-size]' id='image-size-medium-$post->ID' value='medium' checked='checked' />
<label for='image-size-medium-$post->ID'>" . __('Medium') . "</label>
<input type='radio' name='attachments[$post->ID][image-size]' id='image-size-full-$post->ID' value='full' />
<label for='image-size-full-$post->ID'>" . __('Full size') . "</label>",
);
just move the checked='checked' attribute to the option you want to be the default. You can also change the default image alignment, it's a few lines up.
Hope that helps. It would be nice to see this as a configuration option in future releases :)
Sweet. Editing the media.php worked a charm for me too. What about removing the automatic link? Suggestions there?
Tnx for the solution!
This topic has been closed to new replies.