mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01:00
Funnel unknown values to blank (standard) post format in set_post_format()
git-svn-id: http://svn.automattic.com/wordpress/trunk@17224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bfee572698
commit
cc81b6adf0
@ -528,8 +528,7 @@ function set_post_format( $post, $format ) {
|
||||
|
||||
if ( !empty($format) ) {
|
||||
$format = sanitize_key($format);
|
||||
$empty_formats = array( 'post', 'standard' );
|
||||
if ( in_array( $format, $empty_formats ) )
|
||||
if ( 'standard' == $format || !in_array( $format, array_keys( get_post_format_slugs() ) ) )
|
||||
$format = '';
|
||||
else
|
||||
$format = 'post-format-' . $format;
|
||||
|
Loading…
Reference in New Issue
Block a user