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

See #30224.


git-svn-id: https://develop.svn.wordpress.org/trunk@30137 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-11-01 01:28:18 +00:00
parent 334fc5b9f2
commit 842d9bc5cf
1 changed files with 5 additions and 6 deletions

View File

@ -972,18 +972,17 @@ class wp_xmlrpc_server extends IXR_Server {
*/
protected function _prepare_comment( $comment ) {
// Format page date.
$comment_date = $this->_convert_date( $comment->comment_date );
$comment_date_gmt = $this->_convert_date_gmt( $comment->comment_date_gmt, $comment->comment_date );
if ( '0' == $comment->comment_approved )
if ( '0' == $comment->comment_approved ) {
$comment_status = 'hold';
else if ( 'spam' == $comment->comment_approved )
} elseif ( 'spam' == $comment->comment_approved ) {
$comment_status = 'spam';
else if ( '1' == $comment->comment_approved )
} elseif ( '1' == $comment->comment_approved ) {
$comment_status = 'approve';
else
} else {
$comment_status = $comment->comment_approved;
}
$_comment = array(
'date_created_gmt' => $comment_date_gmt,
'user_id' => $comment->user_id,