Make WordPress Core

Changeset 17224


Ignore:
Timestamp:
01/05/2011 10:26:55 PM (13 years ago)
Author:
markjaquith
Message:

Funnel unknown values to blank (standard) post format in set_post_format()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r17197 r17224  
    529529    if ( !empty($format) ) {
    530530        $format = sanitize_key($format);
    531         $empty_formats = array( 'post', 'standard' );
    532         if ( in_array( $format, $empty_formats ) )
     531        if ( 'standard' == $format || !in_array( $format, array_keys( get_post_format_slugs() ) ) )
    533532            $format = '';
    534533        else
Note: See TracChangeset for help on using the changeset viewer.