Media: Merge two error messages and use `sprintf()` for the method names.

See #33642.

git-svn-id: https://develop.svn.wordpress.org/trunk@36968 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2016-03-10 23:35:37 +00:00
parent f4ee598def
commit e20f75533e
1 changed files with 4 additions and 2 deletions

View File

@ -679,11 +679,13 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
protected function strip_meta() { protected function strip_meta() {
if ( ! is_callable( array( $this->image, 'getImageProfiles' ) ) ) { if ( ! is_callable( array( $this->image, 'getImageProfiles' ) ) ) {
return new WP_Error( 'image_strip_meta_error', __('Imagick::getImageProfiles() is required to strip image meta.') ); /* translators: %s: ImageMagick method name */
return new WP_Error( 'image_strip_meta_error', sprintf( __( '%s is required to strip image meta.' ), '<code>Imagick::getImageProfiles()</code>' ) );
} }
if ( ! is_callable( array( $this->image, 'removeImageProfile' ) ) ) { if ( ! is_callable( array( $this->image, 'removeImageProfile' ) ) ) {
return new WP_Error( 'image_strip_meta_error', __('Imagick::removeImageProfile() is required to strip image meta.') ); /* translators: %s: ImageMagick method name */
return new WP_Error( 'image_strip_meta_error', sprintf( __( '%s is required to strip image meta.' ), '<code>Imagick::removeImageProfile()</code>' ) );
} }
/* /*