Changeset 24264 for trunk/wp-admin/edit-form-advanced.php
- Timestamp:
- 05/15/2013 08:43:09 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r24184 r24264 131 131 $post_format = ''; 132 132 $post_format_options = ''; 133 $show_post_format_ui = false;134 133 if ( post_type_supports( $post_type, 'post-formats' ) && apply_filters( 'enable_post_format_ui', true, $post ) ) { 135 134 wp_enqueue_script( 'post-formats' ); … … 143 142 if ( ! empty( $_REQUEST['format'] ) && in_array( $_REQUEST['format'], get_post_format_slugs() ) ) 144 143 $post_format = $_REQUEST['format']; 145 }146 147 $user_wants = get_user_option( 'post_formats_' . $post_type );148 if ( false !== $user_wants ) {149 // User wants what user gets.150 $show_post_format_ui = (bool) $user_wants;151 } else {152 // UI is shown when the theme supports formats, or if the site has formats assigned to posts.153 $show_post_format_ui = current_theme_supports( 'post-formats' ) || get_terms( 'post_format', array( 'number' => 1 ) );154 144 } 155 145 … … 390 380 </div> 391 381 <?php if ( ! empty( $post_format_options ) ) : ?> 392 <div class="wp-post-format-ui <?php if ( ! $show_post_format_ui ) echo ' no-ui' ?>">382 <div class="wp-post-format-ui"> 393 383 <div class="post-format-options"> 394 384 <?php echo $post_format_options; ?> … … 423 413 <div id="post-body-content"<?php echo $format_class; ?>> 424 414 <?php if ( ! empty( $all_post_formats ) ) : ?> 425 <div class="wp-post-format-ui <?php if ( ! $show_post_format_ui ) echo ' no-ui' ?>">415 <div class="wp-post-format-ui"> 426 416 <div class="post-format-change"><span class="icon <?php echo esc_attr( 'wp-format-' . $post_format ); ?>"></span> <span class="post-format-description"><?php echo $all_post_formats[$post_format]['description']; ?></span></div> 427 417 </div>
Note: See TracChangeset
for help on using the changeset viewer.