Ticket #16503: 16503.diff
| File 16503.diff, 1.8 KB (added by nacin, 2 years ago) |
|---|
-
wp-admin/includes/class-wp-posts-list-table.php
476 476 $title = _draft_or_post_title(); 477 477 $post_type_object = get_post_type_object( $post->post_type ); 478 478 $can_edit_post = current_user_can( $post_type_object->cap->edit_post, $post->ID ); 479 $post_format = get_post_format( $post->ID );479 $post_format = post_type_supports( $post->post_type, 'post-formats' ) && get_post_format( $post->ID ); 480 480 $post_format_class = ( $post_format && !is_wp_error($post_format) ) ? 'format-' . sanitize_html_class( $post_format ) : 'format-default'; 481 481 ?> 482 482 <tr id='post-<?php echo $post->ID; ?>' class='<?php echo trim( $rowclass . ' author-' . $post_owner . ' status-' . $post->post_status . ' ' . $post_format_class); ?> iedit' valign="top"> -
wp-admin/includes/template.php
1647 1647 } 1648 1648 } 1649 1649 1650 if ( get_post_format( $post->ID ) )1650 if ( post_type_supports( $post->post_type, 'post-formats' ) && get_post_format( $post->ID ) ) 1651 1651 echo ' - <span class="post-state-format">' . get_post_format_string( get_post_format( $post->ID ) ) . '</span>'; 1652 1652 } 1653 1653 -
wp-includes/post.php
487 487 function get_post_format( $post = null ) { 488 488 $post = get_post($post); 489 489 490 if ( ! post_type_supports( $post->post_type, 'post-formats' ) ) 491 return false; 492 490 493 $_format = get_the_terms( $post->ID, 'post_format' ); 491 494 492 495 if ( empty( $_format ) )
