Make WordPress Core


Ignore:
Timestamp:
05/09/2013 10:45:14 PM (11 years ago)
Author:
markjaquith
Message:

Improve the UX and flow of the Image post format.

  • Drag-and-drop
  • Textarea for HTML/URL hidden to start
  • Bigger click target for entering Media modal
  • Image preview height-contrained to 300 pixels
  • Hid the alignment, size, etc options that didn't have an effect anyway
  • Got wp-format-{format} into the <body> class

props DrewAPicture, aaroncampbell, markjaquith, azaozz. see #24291.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r23879 r24226  
    8686$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
    8787
     88if ( false !== $post_format = get_post_format() ) {
     89    if ( ! $post_format ) {
     90        $post_format = 'standard';
     91
     92        if ( ! empty( $_REQUEST['format'] ) && in_array( $_REQUEST['format'], get_post_format_slugs() ) )
     93            $post_format = $_REQUEST['format'];
     94    }
     95
     96    $admin_body_class .= ' wp-format-' . $post_format;
     97}
     98
    8899if ( wp_is_mobile() )
    89100    $admin_body_class .= ' mobile';
     
    99110
    100111<?php
    101 // Make sure the customize body classes are correct as early as possible. 
     112// Make sure the customize body classes are correct as early as possible.
    102113if ( current_user_can( 'edit_theme_options' ) )
    103114    wp_customize_support_script();
Note: See TracChangeset for help on using the changeset viewer.