Add checks for WP_Error. props ptahdunbar. see #14746

git-svn-id: https://develop.svn.wordpress.org/trunk@16315 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2010-11-12 04:10:56 +00:00
parent 647422ad33
commit d3684a509d
2 changed files with 15 additions and 5 deletions
@@ -468,8 +468,10 @@ class WP_Posts_List_Table extends WP_List_Table {
$title = _draft_or_post_title();
$post_type_object = get_post_type_object( $post->post_type );
$can_edit_post = current_user_can( 'edit_post', $post->ID );
$post_format = get_post_format( $post->ID );
$post_format_class = ( $post_format && !is_wp_error($post_format) ) ? 'format-' . sanitize_html_class( $post_format ) : 'format-default';
?>
<tr id='post-<?php echo $post->ID; ?>' class='<?php echo trim( $rowclass . ' author-' . $post_owner . ' status-' . $post->post_status . ' ' . sanitize_html_class( 'format-' . ( get_post_format( $post->ID ) ? get_post_format( $post->ID ) : 'default' ) ) ); ?> iedit' valign="top">
<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">
<?php
list( $columns, $hidden ) = $this->get_column_info();