Ticket #24219: 24219.patch
File 24219.patch, 1.9 KB (added by , 11 years ago) |
---|
-
wp-admin/press-this.php
69 69 } else { 70 70 // Post formats 71 71 if ( isset( $_POST['post_format'] ) ) { 72 if ( current_theme_supports( 'post-formats', $_POST['post_format']) )72 if ( in_array( $_POST['post_format'], get_post_format_slugs() ) ) 73 73 set_post_format( $post_ID, $_POST['post_format'] ); 74 74 elseif ( '0' == $_POST['post_format'] ) 75 75 set_post_format( $post_ID, false ); … … 470 470 <span class="spinner" style="display: none;"></span> 471 471 </p> 472 472 <?php if ( current_theme_supports( 'post-formats' ) && post_type_supports( 'post', 'post-formats' ) ) : 473 $post_formats = get_theme_support( 'post-formats' ); 474 if ( is_array( $post_formats[0] ) ) : 475 $default_format = get_option( 'default_post_format', '0' ); 476 ?> 473 $post_formats = get_post_format_strings(); 474 unset( $post_formats['standard'] ); ?> 477 475 <p> 478 476 <label for="post_format"><?php _e( 'Post Format:' ); ?> 479 477 <select name="post_format" id="post_format"> 480 <option value="0"><?php _ex( 'Standard', 'Post format' ); ?></option>481 <?php foreach ( $post_formats [0] as $format): ?>482 <option<?php selected( $default_format, $format ); ?> value="<?php echo esc_attr( $format ); ?>"> <?php echo esc_html( get_post_format_string( $format )); ?></option>478 <option value="0"><?php echo get_post_format_string( 'standard' ); ?></option> 479 <?php foreach ( $post_formats as $format_slug => $format_name ): ?> 480 <option<?php selected( get_option( 'default_post_format' ), $format_slug ); ?> value="<?php echo esc_attr( $format_slug ); ?>"><?php echo esc_html( $format_name ); ?></option> 483 481 <?php endforeach; ?> 484 482 </select></label> 485 483 </p> 486 <?php endif; endif;?>484 <?php endif; ?> 487 485 </div> 488 486 </div> 489 487