Make WordPress Core


Ignore:
Timestamp:
11/01/2014 01:28:18 AM (10 years ago)
Author:
wonderboymusic
Message:

In wp_xmlrpc_server->_prepare_comment(), $comment_date is set internally but never used.

See #30224.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r29731 r30137  
    973973    protected function _prepare_comment( $comment ) {
    974974        // Format page date.
    975         $comment_date = $this->_convert_date( $comment->comment_date );
    976975        $comment_date_gmt = $this->_convert_date_gmt( $comment->comment_date_gmt, $comment->comment_date );
    977976
    978         if ( '0' == $comment->comment_approved )
     977        if ( '0' == $comment->comment_approved ) {
    979978            $comment_status = 'hold';
    980         else if ( 'spam' == $comment->comment_approved )
     979        } elseif ( 'spam' == $comment->comment_approved ) {
    981980            $comment_status = 'spam';
    982         else if ( '1' == $comment->comment_approved )
     981        } elseif ( '1' == $comment->comment_approved ) {
    983982            $comment_status = 'approve';
    984         else
     983        } else {
    985984            $comment_status = $comment->comment_approved;
    986 
     985        }
    987986        $_comment = array(
    988987            'date_created_gmt' => $comment_date_gmt,
Note: See TracChangeset for help on using the changeset viewer.