Ticket #24116: 24116.4.diff
| File 24116.4.diff, 1.5 KB (added by , 13 years ago) |
|---|
-
wp-admin/includes/screen.php
148 148 * @return string HTML for the screen icon. 149 149 */ 150 150 function get_screen_icon( $screen = '' ) { 151 global $post_ID;152 151 if ( empty( $screen ) ) 153 152 $screen = get_current_screen(); 154 153 elseif ( is_string( $screen ) ) … … 168 167 if ( $screen->post_type ) 169 168 $class .= ' ' . sanitize_html_class( 'icon32-posts-' . $screen->post_type ); 170 169 171 if ( $post_ID ) { 172 $format = get_post_format( $post_ID ); 173 if ( $format ) 174 $class .= ' wp-format-' . $format; 170 if ( 'post' == $screen->id ) { 171 $post_format = get_post_format(); 172 if ( ! $post_format && ! empty( $_REQUEST['format'] ) && in_array( $_REQUEST['format'], get_post_format_slugs() ) ) 173 $post_format = $_REQUEST['format']; 174 175 if ( $post_format ) 176 $class .= ' wp-format-' . $post_format; 175 177 } 176 178 } 177 179 -
wp-admin/edit-form-advanced.php
139 139 140 140 if ( ! $post_format ) { 141 141 $post_format = 'standard'; 142 if ( 'auto-draft' == $post->post_status ) 142 143 if ( ! empty( $_REQUEST['format'] ) && in_array( $_REQUEST['format'], get_post_format_slugs() ) ) 144 $post_format = $_REQUEST['format']; 145 elseif ( 'auto-draft' == $post->post_status ) 143 146 $post_format_set_class = ''; 144 147 } 145 148