mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
cd6acbcbb2
commit
8f19010b2d
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user