Make WordPress Core


Ignore:
Timestamp:
04/26/2013 12:22:55 PM (12 years ago)
Author:
markjaquith
Message:

Post format UI refresh.

  • Post format switcher does not go away after clicking
  • Refresh of format switcher style
  • Highlighting of active post format
  • Prompt text goes under the switcher
  • Better animations

see #24046. props wonderboymusic, johnjamesjacoby, aaroncampbell, PeteMall.

Also, because I forgot it on [24006]: props saracannon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r24097 r24098  
    137137    wp_enqueue_style( 'wp-mediaelement' );
    138138    $post_format = get_post_format();
    139     $post_format_set_class = 'post-format-set';
    140139
    141140    if ( ! $post_format ) {
     
    144143        if ( ! empty( $_REQUEST['format'] ) && in_array( $_REQUEST['format'], get_post_format_slugs() ) )
    145144            $post_format = $_REQUEST['format'];
    146         elseif ( 'auto-draft' == $post->post_status )
    147             $post_format_set_class = '';
    148145    }
    149146
     
    426423<div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
    427424<div id="post-body-content"<?php echo $format_class; ?>>
     425<div class="wp-post-format-ui<?php if ( ! $show_post_format_ui ) echo ' no-ui' ?>">
     426    <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</div>
    428428<?php if ( post_type_supports($post_type, 'title') ) { ?>
    429429<div id="titlediv">
Note: See TracChangeset for help on using the changeset viewer.