I18N: Move code out of translatable string in a _deprecated_argument()
message in wp_stream_image()
, wp_save_image_file()
, and image_edit_apply_changes()
.
Props ramiy. Fixes #47406. git-svn-id: https://develop.svn.wordpress.org/trunk@45615 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
89919f6ac4
commit
9ed8e4189a
@ -272,7 +272,8 @@ function wp_stream_image( $image, $mime_type, $attachment_id ) {
|
||||
|
||||
return true;
|
||||
} else {
|
||||
_deprecated_argument( __FUNCTION__, '3.5.0', __( '$image needs to be an WP_Image_Editor object' ) );
|
||||
/* translators: 1: $image, 2: WP_Image_Editor */
|
||||
_deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( '%1$s needs to be a %2$s object.' ), '$image', 'WP_Image_Editor' ) );
|
||||
|
||||
/**
|
||||
* Filters the GD image resource to be streamed to the browser.
|
||||
@ -340,7 +341,8 @@ function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
|
||||
|
||||
return $image->save( $filename, $mime_type );
|
||||
} else {
|
||||
_deprecated_argument( __FUNCTION__, '3.5.0', __( '$image needs to be an WP_Image_Editor object' ) );
|
||||
/* translators: 1: $image, 2: WP_Image_Editor */
|
||||
_deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( '%1$s needs to be a %2$s object.' ), '$image', 'WP_Image_Editor' ) );
|
||||
|
||||
/** This filter is documented in wp-admin/includes/image-edit.php */
|
||||
$image = apply_filters( 'image_save_pre', $image, $post_id );
|
||||
@ -486,7 +488,8 @@ function _crop_image_resource( $img, $x, $y, $w, $h ) {
|
||||
*/
|
||||
function image_edit_apply_changes( $image, $changes ) {
|
||||
if ( is_resource( $image ) ) {
|
||||
_deprecated_argument( __FUNCTION__, '3.5.0', __( '$image needs to be an WP_Image_Editor object' ) );
|
||||
/* translators: 1: $image, 2: WP_Image_Editor */
|
||||
_deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( '%1$s needs to be a %2$s object.' ), '$image', 'WP_Image_Editor' ) );
|
||||
}
|
||||
|
||||
if ( ! is_array( $changes ) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user