|
@@ 1009-1017 (lines=9) @@
|
| 1006 |
|
* @param array $methods A list of registered WordPress XMLRPC methods. |
| 1007 |
|
* @return array Filtered $methods |
| 1008 |
|
*/ |
| 1009 |
|
public function remove_non_jetpack_xmlrpc_methods( $methods ) { |
| 1010 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::remove_non_jetpack_xmlrpc_methods' ); |
| 1011 |
|
|
| 1012 |
|
if ( ! $this->connection_manager ) { |
| 1013 |
|
$this->connection_manager = new Connection_Manager(); |
| 1014 |
|
} |
| 1015 |
|
|
| 1016 |
|
return $this->connection_manager->remove_non_jetpack_xmlrpc_methods( $methods ); |
| 1017 |
|
} |
| 1018 |
|
|
| 1019 |
|
/** |
| 1020 |
|
* Since a lot of hosts use a hammer approach to "protecting" WordPress sites, |
|
@@ 1029-1037 (lines=9) @@
|
| 1026 |
|
* @deprecated since 7.7.0 |
| 1027 |
|
* @see Automattic\Jetpack\Connection\Manager::alternate_xmlrpc() |
| 1028 |
|
*/ |
| 1029 |
|
public function alternate_xmlrpc() { |
| 1030 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::alternate_xmlrpc' ); |
| 1031 |
|
|
| 1032 |
|
if ( ! $this->connection_manager ) { |
| 1033 |
|
$this->connection_manager = new Connection_Manager(); |
| 1034 |
|
} |
| 1035 |
|
|
| 1036 |
|
$this->connection_manager->alternate_xmlrpc(); |
| 1037 |
|
} |
| 1038 |
|
|
| 1039 |
|
/** |
| 1040 |
|
* The callback for the JITM ajax requests. |
|
@@ 1137-1145 (lines=9) @@
|
| 1134 |
|
* @deprecated since 7.7.0 |
| 1135 |
|
* @see Automattic\Jetpack\Connection\Manager::require_jetpack_authentication() |
| 1136 |
|
*/ |
| 1137 |
|
public function require_jetpack_authentication() { |
| 1138 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::require_jetpack_authentication' ); |
| 1139 |
|
|
| 1140 |
|
if ( ! $this->connection_manager ) { |
| 1141 |
|
$this->connection_manager = new Connection_Manager(); |
| 1142 |
|
} |
| 1143 |
|
|
| 1144 |
|
$this->connection_manager->require_jetpack_authentication(); |
| 1145 |
|
} |
| 1146 |
|
|
| 1147 |
|
/** |
| 1148 |
|
* Load language files |
|
@@ 879-887 (lines=9) @@
|
| 876 |
|
* @deprecated since 7.7.0 |
| 877 |
|
* @see Automattic\Jetpack\Connection\Manager::initialize_rest_api_registration_connector() |
| 878 |
|
*/ |
| 879 |
|
public function initialize_rest_api_registration_connector() { |
| 880 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::initialize_rest_api_registration_connector' ); |
| 881 |
|
|
| 882 |
|
if ( ! $this->connection_manager ) { |
| 883 |
|
$this->connection_manager = new Connection_Manager(); |
| 884 |
|
} |
| 885 |
|
|
| 886 |
|
$this->connection_manager->initialize_rest_api_registration_connector(); |
| 887 |
|
} |
| 888 |
|
|
| 889 |
|
/** |
| 890 |
|
* This is ported over from the manage module, which has been deprecated and baked in here. |
|
@@ 5684-5692 (lines=9) @@
|
| 5681 |
|
* @param int $timestamp Timestamp of the request. |
| 5682 |
|
* @param string $nonce Nonce string. |
| 5683 |
|
*/ |
| 5684 |
|
public function add_nonce( $timestamp, $nonce ) { |
| 5685 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::add_nonce' ); |
| 5686 |
|
|
| 5687 |
|
if ( ! $this->connection_manager ) { |
| 5688 |
|
$this->connection_manager = new Connection_Manager(); |
| 5689 |
|
} |
| 5690 |
|
|
| 5691 |
|
return $this->connection_manager->add_nonce( $timestamp, $nonce ); |
| 5692 |
|
} |
| 5693 |
|
|
| 5694 |
|
/** |
| 5695 |
|
* In some setups, $HTTP_RAW_POST_DATA can be emptied during some IXR_Server paths since it is passed by reference to various methods. |
|
@@ 5704-5712 (lines=9) @@
|
| 5701 |
|
* @param array $methods XMLRPC methods. |
| 5702 |
|
* @return array XMLRPC methods, with the $HTTP_RAW_POST_DATA one. |
| 5703 |
|
*/ |
| 5704 |
|
public function xmlrpc_methods( $methods ) { |
| 5705 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_methods' ); |
| 5706 |
|
|
| 5707 |
|
if ( ! $this->connection_manager ) { |
| 5708 |
|
$this->connection_manager = new Connection_Manager(); |
| 5709 |
|
} |
| 5710 |
|
|
| 5711 |
|
return $this->connection_manager->xmlrpc_methods( $methods ); |
| 5712 |
|
} |
| 5713 |
|
|
| 5714 |
|
/** |
| 5715 |
|
* Register additional public XMLRPC methods. |
|
@@ 5723-5731 (lines=9) @@
|
| 5720 |
|
* @param array $methods Public XMLRPC methods. |
| 5721 |
|
* @return array Public XMLRPC methods, with the getOptions one. |
| 5722 |
|
*/ |
| 5723 |
|
public function public_xmlrpc_methods( $methods ) { |
| 5724 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::public_xmlrpc_methods' ); |
| 5725 |
|
|
| 5726 |
|
if ( ! $this->connection_manager ) { |
| 5727 |
|
$this->connection_manager = new Connection_Manager(); |
| 5728 |
|
} |
| 5729 |
|
|
| 5730 |
|
return $this->connection_manager->public_xmlrpc_methods( $methods ); |
| 5731 |
|
} |
| 5732 |
|
|
| 5733 |
|
/** |
| 5734 |
|
* Handles a getOptions XMLRPC method call. |
|
@@ 5742-5750 (lines=9) @@
|
| 5739 |
|
* @param array $args method call arguments. |
| 5740 |
|
* @return array an amended XMLRPC server options array. |
| 5741 |
|
*/ |
| 5742 |
|
public function jetpack_getOptions( $args ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid |
| 5743 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::jetpack_getOptions' ); |
| 5744 |
|
|
| 5745 |
|
if ( ! $this->connection_manager ) { |
| 5746 |
|
$this->connection_manager = new Connection_Manager(); |
| 5747 |
|
} |
| 5748 |
|
|
| 5749 |
|
return $this->connection_manager->jetpack_getOptions( $args ); |
| 5750 |
|
} |
| 5751 |
|
|
| 5752 |
|
/** |
| 5753 |
|
* Adds Jetpack-specific options to the output of the XMLRPC options method. |
|
@@ 5761-5769 (lines=9) @@
|
| 5758 |
|
* @param array $options Standard Core options. |
| 5759 |
|
* @return array Amended options. |
| 5760 |
|
*/ |
| 5761 |
|
public function xmlrpc_options( $options ) { |
| 5762 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_options' ); |
| 5763 |
|
|
| 5764 |
|
if ( ! $this->connection_manager ) { |
| 5765 |
|
$this->connection_manager = new Connection_Manager(); |
| 5766 |
|
} |
| 5767 |
|
|
| 5768 |
|
return $this->connection_manager->xmlrpc_options( $options ); |
| 5769 |
|
} |
| 5770 |
|
|
| 5771 |
|
/** |
| 5772 |
|
* Cleans nonces that were saved when calling ::add_nonce. |