Make WordPress Core


Ignore:
Timestamp:
09/19/2011 05:02:58 PM (15 years ago)
Author:
duck_
Message:

Add post formats to quick edit and bulk edit. Fixes #18083.

File:
1 edited

Legend:

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

    r18721 r18722  
    308308                        if ( empty($terms) )
    309309                                continue;
    310                         if ( is_taxonomy_hierarchical( $tax_name ) )
     310                        if ( is_taxonomy_hierarchical( $tax_name ) ) {
    311311                                $tax_input[$tax_name] = array_map( 'absint', $terms );
    312                         else {
     312                        } else {
    313313                                $tax_input[$tax_name] = preg_replace( '/\s*,\s*/', ',', rtrim( trim($terms), ' ,' ) );
    314314                                $tax_input[$tax_name] = explode(',', $tax_input[$tax_name]);
     
    331331                        }
    332332                }
     333        }
     334
     335        if ( isset( $post_data['post_format'] ) ) {
     336                if ( '0' == $post_data['post_format'] )
     337                        $post_data['post_format'] = false;
     338                // don't change the post format if it's not supported or not '0' (standard)
     339                elseif ( ! current_theme_supports( 'post-formats', $post_data['post_format'] ) )
     340                        unset( $post_data['post_format'] );
    333341        }
    334342
     
    383391                }
    384392
     393                if ( isset( $post_data['post_format'] ) )
     394                        set_post_format( $post_ID, $post_data['post_format'] );
    385395        }
    386396
Note: See TracChangeset for help on using the changeset viewer.