Make WordPress Core


Ignore:
Timestamp:
09/04/2012 04:29:28 PM (14 years ago)
Author:
ryan
Message:

Use get_post() instead of global $post.
Make the $post argument to get_post() optional, defaulting to the current post in The Loop.

Props nacin
see #21309

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-comments-list-table.php

    r21323 r21735  
    303303
    304304    function single_row( $a_comment ) {
    305         global $post, $comment;
     305        global $comment;
     306        $post = get_post();
    306307
    307308        $comment = $a_comment;
     
    326327
    327328    function column_comment( $comment ) {
    328         global $post, $comment_status;
     329        global $comment_status;
     330        $post = get_post();
    329331
    330332        $user_can = $this->user_can;
     
    480482
    481483    function column_response( $comment ) {
    482         global $post;
     484        $post = get_post();
    483485
    484486        if ( isset( $this->pending_count[$post->ID] ) ) {
Note: See TracChangeset for help on using the changeset viewer.