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: https://develop.svn.wordpress.org/trunk@21736 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-09-04 18:23:51 +00:00
parent 31ec698423
commit dcb0d4fe80
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 = '';