|
@@ 890-898 (lines=9) @@
|
| 887 |
|
* @deprecated since 7.7.0 |
| 888 |
|
* @see Automattic\Jetpack\Connection\Manager::initialize_rest_api_registration_connector() |
| 889 |
|
*/ |
| 890 |
|
public function initialize_rest_api_registration_connector() { |
| 891 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::initialize_rest_api_registration_connector' ); |
| 892 |
|
|
| 893 |
|
if ( ! $this->connection_manager ) { |
| 894 |
|
$this->connection_manager = new Connection_Manager(); |
| 895 |
|
} |
| 896 |
|
|
| 897 |
|
$this->connection_manager->initialize_rest_api_registration_connector(); |
| 898 |
|
} |
| 899 |
|
|
| 900 |
|
/** |
| 901 |
|
* This is ported over from the manage module, which has been deprecated and baked in here. |
|
@@ 1016-1024 (lines=9) @@
|
| 1013 |
|
* @param array $methods A list of registered WordPress XMLRPC methods. |
| 1014 |
|
* @return array Filtered $methods |
| 1015 |
|
*/ |
| 1016 |
|
public function remove_non_jetpack_xmlrpc_methods( $methods ) { |
| 1017 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::remove_non_jetpack_xmlrpc_methods' ); |
| 1018 |
|
|
| 1019 |
|
if ( ! $this->connection_manager ) { |
| 1020 |
|
$this->connection_manager = new Connection_Manager(); |
| 1021 |
|
} |
| 1022 |
|
|
| 1023 |
|
return $this->connection_manager->remove_non_jetpack_xmlrpc_methods( $methods ); |
| 1024 |
|
} |
| 1025 |
|
|
| 1026 |
|
/** |
| 1027 |
|
* Since a lot of hosts use a hammer approach to "protecting" WordPress sites, |
|
@@ 1036-1044 (lines=9) @@
|
| 1033 |
|
* @deprecated since 7.7.0 |
| 1034 |
|
* @see Automattic\Jetpack\Connection\Manager::alternate_xmlrpc() |
| 1035 |
|
*/ |
| 1036 |
|
public function alternate_xmlrpc() { |
| 1037 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::alternate_xmlrpc' ); |
| 1038 |
|
|
| 1039 |
|
if ( ! $this->connection_manager ) { |
| 1040 |
|
$this->connection_manager = new Connection_Manager(); |
| 1041 |
|
} |
| 1042 |
|
|
| 1043 |
|
$this->connection_manager->alternate_xmlrpc(); |
| 1044 |
|
} |
| 1045 |
|
|
| 1046 |
|
/** |
| 1047 |
|
* The callback for the JITM ajax requests. |
|
@@ 1144-1152 (lines=9) @@
|
| 1141 |
|
* @deprecated since 7.7.0 |
| 1142 |
|
* @see Automattic\Jetpack\Connection\Manager::require_jetpack_authentication() |
| 1143 |
|
*/ |
| 1144 |
|
public function require_jetpack_authentication() { |
| 1145 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::require_jetpack_authentication' ); |
| 1146 |
|
|
| 1147 |
|
if ( ! $this->connection_manager ) { |
| 1148 |
|
$this->connection_manager = new Connection_Manager(); |
| 1149 |
|
} |
| 1150 |
|
|
| 1151 |
|
$this->connection_manager->require_jetpack_authentication(); |
| 1152 |
|
} |
| 1153 |
|
|
| 1154 |
|
/** |
| 1155 |
|
* Load language files |
|
@@ 5729-5737 (lines=9) @@
|
| 5726 |
|
* @param int $timestamp Timestamp of the request. |
| 5727 |
|
* @param string $nonce Nonce string. |
| 5728 |
|
*/ |
| 5729 |
|
public function add_nonce( $timestamp, $nonce ) { |
| 5730 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::add_nonce' ); |
| 5731 |
|
|
| 5732 |
|
if ( ! $this->connection_manager ) { |
| 5733 |
|
$this->connection_manager = new Connection_Manager(); |
| 5734 |
|
} |
| 5735 |
|
|
| 5736 |
|
return $this->connection_manager->add_nonce( $timestamp, $nonce ); |
| 5737 |
|
} |
| 5738 |
|
|
| 5739 |
|
/** |
| 5740 |
|
* In some setups, $HTTP_RAW_POST_DATA can be emptied during some IXR_Server paths since it is passed by reference to various methods. |
|
@@ 5749-5757 (lines=9) @@
|
| 5746 |
|
* @param array $methods XMLRPC methods. |
| 5747 |
|
* @return array XMLRPC methods, with the $HTTP_RAW_POST_DATA one. |
| 5748 |
|
*/ |
| 5749 |
|
public function xmlrpc_methods( $methods ) { |
| 5750 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_methods' ); |
| 5751 |
|
|
| 5752 |
|
if ( ! $this->connection_manager ) { |
| 5753 |
|
$this->connection_manager = new Connection_Manager(); |
| 5754 |
|
} |
| 5755 |
|
|
| 5756 |
|
return $this->connection_manager->xmlrpc_methods( $methods ); |
| 5757 |
|
} |
| 5758 |
|
|
| 5759 |
|
/** |
| 5760 |
|
* Register additional public XMLRPC methods. |
|
@@ 5768-5776 (lines=9) @@
|
| 5765 |
|
* @param array $methods Public XMLRPC methods. |
| 5766 |
|
* @return array Public XMLRPC methods, with the getOptions one. |
| 5767 |
|
*/ |
| 5768 |
|
public function public_xmlrpc_methods( $methods ) { |
| 5769 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::public_xmlrpc_methods' ); |
| 5770 |
|
|
| 5771 |
|
if ( ! $this->connection_manager ) { |
| 5772 |
|
$this->connection_manager = new Connection_Manager(); |
| 5773 |
|
} |
| 5774 |
|
|
| 5775 |
|
return $this->connection_manager->public_xmlrpc_methods( $methods ); |
| 5776 |
|
} |
| 5777 |
|
|
| 5778 |
|
/** |
| 5779 |
|
* Handles a getOptions XMLRPC method call. |
|
@@ 5787-5795 (lines=9) @@
|
| 5784 |
|
* @param array $args method call arguments. |
| 5785 |
|
* @return array an amended XMLRPC server options array. |
| 5786 |
|
*/ |
| 5787 |
|
public function jetpack_getOptions( $args ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid |
| 5788 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::jetpack_getOptions' ); |
| 5789 |
|
|
| 5790 |
|
if ( ! $this->connection_manager ) { |
| 5791 |
|
$this->connection_manager = new Connection_Manager(); |
| 5792 |
|
} |
| 5793 |
|
|
| 5794 |
|
return $this->connection_manager->jetpack_getOptions( $args ); |
| 5795 |
|
} |
| 5796 |
|
|
| 5797 |
|
/** |
| 5798 |
|
* Adds Jetpack-specific options to the output of the XMLRPC options method. |
|
@@ 5806-5814 (lines=9) @@
|
| 5803 |
|
* @param array $options Standard Core options. |
| 5804 |
|
* @return array Amended options. |
| 5805 |
|
*/ |
| 5806 |
|
public function xmlrpc_options( $options ) { |
| 5807 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_options' ); |
| 5808 |
|
|
| 5809 |
|
if ( ! $this->connection_manager ) { |
| 5810 |
|
$this->connection_manager = new Connection_Manager(); |
| 5811 |
|
} |
| 5812 |
|
|
| 5813 |
|
return $this->connection_manager->xmlrpc_options( $options ); |
| 5814 |
|
} |
| 5815 |
|
|
| 5816 |
|
/** |
| 5817 |
|
* Cleans nonces that were saved when calling ::add_nonce. |