Restore global references that broke the media and comment list tables. Todo, make list tables rely far less on global state. see #21309.

git-svn-id: http://core.svn.wordpress.org/trunk@21736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-09-04 18:23:51 +00:00
parent cfb35a9d85
commit d31f7b3793
2 changed files with 2 additions and 4 deletions

View File

@ -302,8 +302,7 @@ class WP_Comments_List_Table extends WP_List_Table {
}
function single_row( $a_comment ) {
global $comment;
$post = get_post();
global $post, $comment;
$comment = $a_comment;
$the_comment_class = join( ' ', get_comment_class( wp_get_comment_status( $comment->comment_ID ) ) );

View File

@ -156,8 +156,7 @@ class WP_Media_List_Table extends WP_List_Table {
}
function display_rows() {
$post = get_post();
$id = $post->ID;
global $post, $id;
add_filter( 'the_title','esc_html' );
$alt = '';