mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Don't self ping. Props Mark Jaquith fixes #993
git-svn-id: https://develop.svn.wordpress.org/trunk@2983 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1179,6 +1179,9 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
if ( !$post ) // Post_ID not found
|
||||
return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
|
||||
|
||||
if ( $post_ID == url_to_postid($pagelinkedfrom) )
|
||||
return new IXR_Error(0, 'The source URI and the target URI cannot both point to the same resource.');
|
||||
|
||||
// Check if pings are on
|
||||
if ( 'closed' == $post->ping_status )
|
||||
return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
|
||||
|
||||
Reference in New Issue
Block a user