Image Editor: fix JS prompt, add size to 'load_image_to_edit' filter, see #10528
git-svn-id: https://develop.svn.wordpress.org/trunk@11967 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
254df719da
commit
dfed9737d7
@ -90,7 +90,7 @@ function wp_image_editor($post_id, $msg = false) {
|
||||
</div>
|
||||
|
||||
<div class="imgedit-submit">
|
||||
<input type="button" onclick="imageEdit.close(<?php echo "$post_id, '$nonce'"; ?>)" class="button" value="<?php echo esc_attr__( 'Cancel' ); ?>" />
|
||||
<input type="button" onclick="imageEdit.close(<?php echo $post_id; ?>, 1)" class="button" value="<?php echo esc_attr__( 'Cancel' ); ?>" />
|
||||
<input type="button" onclick="imageEdit.save(<?php echo "$post_id, '$nonce'"; ?>)" class="button-primary imgedit-submit-btn" value="<?php echo esc_attr__( 'Save' ); ?>" />
|
||||
</div>
|
||||
</td>
|
||||
@ -232,7 +232,7 @@ function load_image_to_edit($post, $size = 'full') {
|
||||
break;
|
||||
}
|
||||
if ( is_resource($image) ) {
|
||||
$image = apply_filters('load_image_to_edit', $image, $post->ID);
|
||||
$image = apply_filters('load_image_to_edit', $image, $post->ID, $size);
|
||||
if ( function_exists('imagealphablending') && function_exists('imagesavealpha') ) {
|
||||
imagealphablending($image, false);
|
||||
imagesavealpha($image, true);
|
||||
|
@ -355,10 +355,12 @@ imageEdit = {
|
||||
$('#imgedit-selection-' + postid).val( JSON.stringify(sel) );
|
||||
},
|
||||
|
||||
close : function(postid) {
|
||||
if ( this.notsaved(postid) )
|
||||
close : function(postid, warn) {
|
||||
warn = warn || false;
|
||||
|
||||
if ( warn && this.notsaved(postid) )
|
||||
return false;
|
||||
|
||||
|
||||
this.iasapi = {};
|
||||
this.hold = {};
|
||||
$('#image-editor-' + postid).fadeOut('fast', function() {
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user