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.
Built from https://develop.svn.wordpress.org/trunk@45615


git-svn-id: http://core.svn.wordpress.org/trunk@45426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-07-09 20:57:56 +00:00
parent bb365054b8
commit 6a696f6051
2 changed files with 7 additions and 4 deletions

View File

@ -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 ) ) {

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45614';
$wp_version = '5.3-alpha-45615';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.