Make WordPress Core


Ignore:
Timestamp:
03/29/2013 03:35:41 AM (14 years ago)
Author:
markjaquith
Message:

Post Format UI.

  • Icons
  • Selection
  • Prompt text
  • Special fields
  • Styling
  • Sparkles

This is going to need testing, polish, and love.

see #19570. props melchoyce, helen, wonderboymusic, lessbloat, rachelbaker, aaroncampbell, DrewAPicture, ryelle.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/screen.php

    r23658 r23843  
    143143 * @since 3.2.0
    144144 *
     145 * @global $post_ID
    145146 * @param string|WP_Screen $screen Optional. Accepts a screen object (and defaults to the current screen object)
    146147 *      which it uses to determine an icon HTML ID. Or, if a string is provided, it is used to form the icon HTML ID.
    … …  
    148149 */
    149150function get_screen_icon( $screen = '' ) {
     151        global $post_ID;
    150152        if ( empty( $screen ) )
    151153                $screen = get_current_screen();
    … …  
    166168                if ( $screen->post_type )
    167169                        $class .= ' ' . sanitize_html_class( 'icon32-posts-' . $screen->post_type );
     170
     171                if ( $post_ID ) {
     172                        $format = get_post_format( $post_ID );
     173                        if ( $format )
     174                                $class .= ' ' . $format;
     175                }
    168176        }
    169177
Note: See TracChangeset for help on using the changeset viewer.