Remove use of global $id from comment_form() and the media list table. see #24330.

git-svn-id: https://develop.svn.wordpress.org/trunk@24337 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-05-23 18:40:16 +00:00
parent 5f472898e5
commit c4ee22898d
2 changed files with 3 additions and 5 deletions

View File

@ -175,7 +175,7 @@ class WP_Media_List_Table extends WP_List_Table {
}
function display_rows() {
global $post, $id;
global $post;
add_filter( 'the_title','esc_html' );
$alt = '';
@ -191,7 +191,7 @@ class WP_Media_List_Table extends WP_List_Table {
$post_owner = ( get_current_user_id() == $post->post_author ) ? 'self' : 'other';
$att_title = _draft_or_post_title();
?>
<tr id='post-<?php echo $id; ?>' class='<?php echo trim( $alt . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top">
<tr id='post-<?php echo $post->ID; ?>' class='<?php echo trim( $alt . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top">
<?php
list( $columns, $hidden ) = $this->get_column_info();

View File

@ -1597,10 +1597,8 @@ function wp_list_comments($args = array(), $comments = null ) {
* @return void
*/
function comment_form( $args = array(), $post_id = null ) {
global $id;
if ( null === $post_id )
$post_id = $id;
$post_id = get_the_ID();
else
$id = $post_id;