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:
parent
cfb35a9d85
commit
d31f7b3793
|
@ -302,8 +302,7 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||||
}
|
}
|
||||||
|
|
||||||
function single_row( $a_comment ) {
|
function single_row( $a_comment ) {
|
||||||
global $comment;
|
global $post, $comment;
|
||||||
$post = get_post();
|
|
||||||
|
|
||||||
$comment = $a_comment;
|
$comment = $a_comment;
|
||||||
$the_comment_class = join( ' ', get_comment_class( wp_get_comment_status( $comment->comment_ID ) ) );
|
$the_comment_class = join( ' ', get_comment_class( wp_get_comment_status( $comment->comment_ID ) ) );
|
||||||
|
|
|
@ -156,8 +156,7 @@ class WP_Media_List_Table extends WP_List_Table {
|
||||||
}
|
}
|
||||||
|
|
||||||
function display_rows() {
|
function display_rows() {
|
||||||
$post = get_post();
|
global $post, $id;
|
||||||
$id = $post->ID;
|
|
||||||
|
|
||||||
add_filter( 'the_title','esc_html' );
|
add_filter( 'the_title','esc_html' );
|
||||||
$alt = '';
|
$alt = '';
|
||||||
|
|
Loading…
Reference in New Issue