Make WordPress Core


Ignore:
Timestamp:
11/12/2010 04:10:56 AM (15 years ago)
Author:
markjaquith
Message:

Add checks for WP_Error. props ptahdunbar. see #14746

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-posts-list-table.php

    r16235 r16315  
    469469        $post_type_object = get_post_type_object( $post->post_type );
    470470        $can_edit_post = current_user_can( 'edit_post', $post->ID );
     471        $post_format = get_post_format( $post->ID );
     472        $post_format_class = ( $post_format && !is_wp_error($post_format) ) ? 'format-' . sanitize_html_class( $post_format ) : 'format-default';
    471473    ?>
    472         <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">
     474        <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">
    473475    <?php
    474476
Note: See TracChangeset for help on using the changeset viewer.