Merge similar error strings for invalid data.

props pavelevap.
fixes #32329.
Built from https://develop.svn.wordpress.org/trunk@32477


git-svn-id: http://core.svn.wordpress.org/trunk@32447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling
2015-05-09 21:09:25 +00:00
parent 42cd948544
commit 60c9fdf9fd
4 changed files with 8 additions and 8 deletions

View File

@@ -65,7 +65,7 @@ function set_post_format( $post, $format ) {
$post = get_post( $post );
if ( empty( $post ) )
return new WP_Error( 'invalid_post', __( 'Invalid post' ) );
return new WP_Error( 'invalid_post', __( 'Invalid post.' ) );
if ( ! empty( $format ) ) {
$format = sanitize_key( $format );