From be4c3e1d8669523ba6b0a3cdc1df413967171a12 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sun, 18 Sep 2011 21:11:28 +0000 Subject: [PATCH] Use get_post_class() in the posts list table. props brandondove, fixes #18516. git-svn-id: https://develop.svn.wordpress.org/trunk@18706 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/class-wp-posts-list-table.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 95b83010e8..1104fb457e 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -464,22 +464,21 @@ class WP_Posts_List_Table extends WP_List_Table { function single_row( $a_post, $level = 0 ) { global $post, $current_screen, $mode; - static $rowclass; + static $alternate; $global_post = $post; $post = $a_post; setup_postdata( $post ); - $rowclass = 'alternate' == $rowclass ? '' : 'alternate'; - $post_owner = ( get_current_user_id() == $post->post_author ? 'self' : 'other' ); $edit_link = get_edit_post_link( $post->ID ); $title = _draft_or_post_title(); $post_type_object = get_post_type_object( $post->post_type ); $can_edit_post = current_user_can( $post_type_object->cap->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'; + + $alternate = 'alternate' == $alternate ? '' : 'alternate'; + $classes = $alternate . ' iedit author-' . ( get_current_user_id() == $post->post_author ? 'self' : 'other' ); ?> - post_status . ' ' . $post_format_class); ?> iedit' valign="top"> + get_column_info();