Note that WordPress ships with WP_HTTP_IXR_CLIENT
that extends the IXR_Client
. So replace
require_once ABSPATH . WPINC . '/class-IXR.php';
$rpc = new IXR_Client( 'http://localhost/wordpress/wordpress/xmlrpc.php' );
with:
require_once ABSPATH . WPINC . '/class-IXR.php';
require_once ABSPATH . WPINC . '/class-wp-http-ixr-client.php';
$rpc = new WP_HTTP_IXR_CLIENT( 'http://localhost/wordpress/wordpress/xmlrpc.php' );
Then try replacing:
$result = $rpc->query(
'pingback.extensions.getPingbacks',
'http://localhost/wordpress/wordpress/2018/01/17/hallo-welt/&post_type=something'
);
with
$result = $rpc->query(
'pingback.extensions.getPingbacks',
'http://localhost/wordpress/wordpress/2018/01/17/hallo-welt/?post_type=something'
);
The server method wp_xmlrpc_server::pingback_extensions_getPingbacks()
uses the url_to_postid()
function to convert the url to a post ID. So make sure your url works there!
PS: These days many WordPress users are looking into the new REST-API instead of the XML-RPC API.