The bulk editor and post format meta box should use the same checks for available post formats.

Props eightface.
Fixes #27187.


Built from https://develop.svn.wordpress.org/trunk@27762


git-svn-id: http://core.svn.wordpress.org/trunk@27599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-03-27 00:06:15 +00:00
parent 2133c89e8f
commit fd0e34ec9f
1 changed files with 5 additions and 4 deletions

View File

@ -1197,19 +1197,20 @@ class WP_Posts_List_Table extends WP_List_Table {
<?php
if ( $bulk && post_type_supports( $screen->post_type, 'post-formats' ) ) {
$all_post_formats = get_post_format_strings();
if ( $bulk && current_theme_supports( 'post-formats' ) && post_type_supports( $screen->post_type, 'post-formats' ) ) {
$post_formats = get_theme_support( 'post-formats' );
?>
<label class="alignleft" for="post_format">
<span class="title"><?php _ex( 'Format', 'post format' ); ?></span>
<select name="post_format">
<option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
<option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
<?php
foreach ( $all_post_formats as $slug => $format ) {
foreach ( $post_formats[0] as $format ) {
?>
<option value="<?php echo esc_attr( $slug ); ?>"><?php echo esc_html( $format ); ?></option>
<option value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
<?php
}