From 5e2adb5db76a6200b462504edc500782710dddb2 Mon Sep 17 00:00:00 2001 From: Ari Stathopoulos Date: Wed, 1 Mar 2023 13:20:29 +0200 Subject: [PATCH] class-IXR.php doesn't need to be included anymore --- src/wp-includes/comment.php | 2 -- src/wp-includes/functions.php | 1 - src/xmlrpc.php | 1 - tests/phpunit/includes/testcase-xmlrpc.php | 1 - tests/phpunit/multisite.xml | 1 - tests/phpunit/tests/xmlrpc/basic.php | 1 - tests/phpunit/tests/xmlrpc/client.php | 1 - 7 files changed, 8 deletions(-) diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index 3ac41ef394962..a6496eff95e59 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -3051,7 +3051,6 @@ function generic_ping( $post_id = 0 ) { * @param int|WP_Post $post Post ID or object. */ function pingback( $content, $post ) { - include_once ABSPATH . WPINC . '/class-IXR.php'; // Original code by Mort (http://mort.mine.nu:8080). $post_links = array(); @@ -3217,7 +3216,6 @@ function trackback( $trackback_url, $title, $excerpt, $ID ) { * @param string $path Path to send the ping. */ function weblog_ping( $server = '', $path = '' ) { - include_once ABSPATH . WPINC . '/class-IXR.php'; // Using a timeout of 3 seconds should be enough to cover slow servers. $client = new WP_HTTP_IXR_Client( $server, ( ( ! strlen( trim( $path ) ) || ( '/' === $path ) ) ? false : $path ) ); diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 67089803bbca3..89073b25b13df 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -881,7 +881,6 @@ function do_enclose( $content, $post ) { global $wpdb; // @todo Tidy this code and make the debug code optional. - include_once ABSPATH . WPINC . '/class-IXR.php'; $post = get_post( $post ); if ( ! $post ) { diff --git a/src/xmlrpc.php b/src/xmlrpc.php index 20b38f4872dbb..dbd1620faf9e8 100644 --- a/src/xmlrpc.php +++ b/src/xmlrpc.php @@ -62,7 +62,6 @@ } require_once ABSPATH . 'wp-admin/includes/admin.php'; -require_once ABSPATH . WPINC . '/class-IXR.php'; /** * Posts submitted via the XML-RPC interface get that title diff --git a/tests/phpunit/includes/testcase-xmlrpc.php b/tests/phpunit/includes/testcase-xmlrpc.php index 2608ca1f268af..b5c810b839cb6 100644 --- a/tests/phpunit/includes/testcase-xmlrpc.php +++ b/tests/phpunit/includes/testcase-xmlrpc.php @@ -1,6 +1,5 @@ ../../src/wp-admin/includes/ms-deprecated.php ../../src/wp-includes/atomlib.php - ../../src/wp-includes/class-IXR.php ../../src/wp-includes/class-json.php ../../src/wp-includes/class-phpass.php ../../src/wp-includes/class-pop3.php diff --git a/tests/phpunit/tests/xmlrpc/basic.php b/tests/phpunit/tests/xmlrpc/basic.php index a754fdbb634e8..fc10e1c61eaeb 100644 --- a/tests/phpunit/tests/xmlrpc/basic.php +++ b/tests/phpunit/tests/xmlrpc/basic.php @@ -1,7 +1,6 @@