|
@@ 183-191 (lines=9) @@
|
| 180 |
|
* @param array $options Standard Core options. |
| 181 |
|
* @return array Amended options. |
| 182 |
|
*/ |
| 183 |
|
public function xmlrpc_options( $options ) { |
| 184 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_options' ); |
| 185 |
|
|
| 186 |
|
if ( ! $this->connection_manager ) { |
| 187 |
|
$this->connection_manager = new Connection_Manager(); |
| 188 |
|
} |
| 189 |
|
|
| 190 |
|
return $this->connection_manager->xmlrpc_options( $options ); |
| 191 |
|
} |
| 192 |
|
|
| 193 |
|
/** |
| 194 |
|
* Handles a getOptions XMLRPC method call. |
|
@@ 202-210 (lines=9) @@
|
| 199 |
|
* @param array $args method call arguments. |
| 200 |
|
* @return array an amended XMLRPC server options array. |
| 201 |
|
*/ |
| 202 |
|
public function jetpack_getOptions( $args ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid |
| 203 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::jetpack_getOptions' ); |
| 204 |
|
|
| 205 |
|
if ( ! $this->connection_manager ) { |
| 206 |
|
$this->connection_manager = new Connection_Manager(); |
| 207 |
|
} |
| 208 |
|
|
| 209 |
|
return $this->connection_manager->jetpack_getOptions( $args ); |
| 210 |
|
} |
| 211 |
|
|
| 212 |
|
/** |
| 213 |
|
* In some setups, $HTTP_RAW_POST_DATA can be emptied during some IXR_Server paths since it is passed by reference to various methods. |
|
@@ 222-230 (lines=9) @@
|
| 219 |
|
* @param array $methods XMLRPC methods. |
| 220 |
|
* @return array XMLRPC methods, with the $HTTP_RAW_POST_DATA one. |
| 221 |
|
*/ |
| 222 |
|
public function xmlrpc_methods( $methods ) { |
| 223 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_methods' ); |
| 224 |
|
|
| 225 |
|
if ( ! $this->connection_manager ) { |
| 226 |
|
$this->connection_manager = new Connection_Manager(); |
| 227 |
|
} |
| 228 |
|
|
| 229 |
|
return $this->connection_manager->xmlrpc_methods( $methods ); |
| 230 |
|
} |
| 231 |
|
|
| 232 |
|
/** |
| 233 |
|
* Register additional public XMLRPC methods. |
|
@@ 241-249 (lines=9) @@
|
| 238 |
|
* @param array $methods Public XMLRPC methods. |
| 239 |
|
* @return array Public XMLRPC methods, with the getOptions one. |
| 240 |
|
*/ |
| 241 |
|
public function public_xmlrpc_methods( $methods ) { |
| 242 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::public_xmlrpc_methods' ); |
| 243 |
|
|
| 244 |
|
if ( ! $this->connection_manager ) { |
| 245 |
|
$this->connection_manager = new Connection_Manager(); |
| 246 |
|
} |
| 247 |
|
|
| 248 |
|
return $this->connection_manager->public_xmlrpc_methods( $methods ); |
| 249 |
|
} |
| 250 |
|
|
| 251 |
|
/** |
| 252 |
|
* Loads the Jetpack XML-RPC client. |
|
@@ 766-774 (lines=9) @@
|
| 763 |
|
* @deprecated since 7.7.0 |
| 764 |
|
* @see Automattic\Jetpack\Connection\Manager::require_jetpack_authentication() |
| 765 |
|
*/ |
| 766 |
|
public function require_jetpack_authentication() { |
| 767 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::require_jetpack_authentication' ); |
| 768 |
|
|
| 769 |
|
if ( ! $this->connection_manager ) { |
| 770 |
|
$this->connection_manager = new Connection_Manager(); |
| 771 |
|
} |
| 772 |
|
|
| 773 |
|
$this->connection_manager->require_jetpack_authentication(); |
| 774 |
|
} |
| 775 |
|
|
| 776 |
|
/** |
| 777 |
|
* The callback for the JITM ajax requests. |
|
@@ 795-803 (lines=9) @@
|
| 792 |
|
* @deprecated since 7.7.0 |
| 793 |
|
* @see Automattic\Jetpack\Connection\Manager::alternate_xmlrpc() |
| 794 |
|
*/ |
| 795 |
|
public function alternate_xmlrpc() { |
| 796 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::alternate_xmlrpc' ); |
| 797 |
|
|
| 798 |
|
if ( ! $this->connection_manager ) { |
| 799 |
|
$this->connection_manager = new Connection_Manager(); |
| 800 |
|
} |
| 801 |
|
|
| 802 |
|
$this->connection_manager->alternate_xmlrpc(); |
| 803 |
|
} |
| 804 |
|
|
| 805 |
|
/** |
| 806 |
|
* Removes all XML-RPC methods that are not `jetpack.*`. |
|
@@ 816-824 (lines=9) @@
|
| 813 |
|
* @param array $methods A list of registered WordPress XMLRPC methods. |
| 814 |
|
* @return array Filtered $methods |
| 815 |
|
*/ |
| 816 |
|
public function remove_non_jetpack_xmlrpc_methods( $methods ) { |
| 817 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::remove_non_jetpack_xmlrpc_methods' ); |
| 818 |
|
|
| 819 |
|
if ( ! $this->connection_manager ) { |
| 820 |
|
$this->connection_manager = new Connection_Manager(); |
| 821 |
|
} |
| 822 |
|
|
| 823 |
|
return $this->connection_manager->remove_non_jetpack_xmlrpc_methods( $methods ); |
| 824 |
|
} |
| 825 |
|
|
| 826 |
|
/** |
| 827 |
|
* Initialize REST API registration connector. |
|
@@ 832-840 (lines=9) @@
|
| 829 |
|
* @deprecated since 7.7.0 |
| 830 |
|
* @see Automattic\Jetpack\Connection\Manager::initialize_rest_api_registration_connector() |
| 831 |
|
*/ |
| 832 |
|
public function initialize_rest_api_registration_connector() { |
| 833 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::initialize_rest_api_registration_connector' ); |
| 834 |
|
|
| 835 |
|
if ( ! $this->connection_manager ) { |
| 836 |
|
$this->connection_manager = new Connection_Manager(); |
| 837 |
|
} |
| 838 |
|
|
| 839 |
|
$this->connection_manager->initialize_rest_api_registration_connector(); |
| 840 |
|
} |
| 841 |
|
|
| 842 |
|
/** |
| 843 |
|
* Sets up the XMLRPC request handlers. |