From 0179ece052950b903c7012b868bee7db589d3741 Mon Sep 17 00:00:00 2001 From: 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: http://svn.automattic.com/wordpress/trunk@18706 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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();