Use pings_open() to check ping status

git-svn-id: http://svn.automattic.com/wordpress/trunk@9696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-11-14 22:33:13 +00:00
parent cd6acbcbb2
commit 8f19010b2d
2 changed files with 2 additions and 2 deletions

View File

@ -1570,7 +1570,7 @@ function _close_comments_for_old_posts( $posts ) {
}
/**
* Close comments on an old post. Hooked to comments_open.
* Close comments on an old post. Hooked to comments_open and pings_open.
*
* @access private
* @since 2.7.0

View File

@ -3236,7 +3236,7 @@ class wp_xmlrpc_server extends IXR_Server {
return new IXR_Error(0, __('The source URL and the target URL cannot both point to the same resource.'));
// Check if pings are on
if ( 'closed' == $post->ping_status )
if ( !pings_open($post) )
return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.'));
// Let's check that the remote site didn't already pingback this entry