|
@@ 1147-1155 (lines=9) @@
|
| 1144 |
|
* @deprecated since 7.7.0 |
| 1145 |
|
* @see Automattic\Jetpack\Connection\Manager::require_jetpack_authentication() |
| 1146 |
|
*/ |
| 1147 |
|
public function require_jetpack_authentication() { |
| 1148 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::require_jetpack_authentication' ); |
| 1149 |
|
|
| 1150 |
|
if ( ! $this->connection_manager ) { |
| 1151 |
|
$this->connection_manager = new Connection_Manager(); |
| 1152 |
|
} |
| 1153 |
|
|
| 1154 |
|
$this->connection_manager->require_jetpack_authentication(); |
| 1155 |
|
} |
| 1156 |
|
|
| 1157 |
|
/** |
| 1158 |
|
* Register assets for use in various modules and the Jetpack admin page. |
|
@@ 5560-5568 (lines=9) @@
|
| 5557 |
|
* @param int $timestamp Timestamp of the request. |
| 5558 |
|
* @param string $nonce Nonce string. |
| 5559 |
|
*/ |
| 5560 |
|
public function add_nonce( $timestamp, $nonce ) { |
| 5561 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::add_nonce' ); |
| 5562 |
|
|
| 5563 |
|
if ( ! $this->connection_manager ) { |
| 5564 |
|
$this->connection_manager = new Connection_Manager(); |
| 5565 |
|
} |
| 5566 |
|
|
| 5567 |
|
return $this->connection_manager->add_nonce( $timestamp, $nonce ); |
| 5568 |
|
} |
| 5569 |
|
|
| 5570 |
|
/** |
| 5571 |
|
* In some setups, $HTTP_RAW_POST_DATA can be emptied during some IXR_Server paths since it is passed by reference to various methods. |
|
@@ 5580-5588 (lines=9) @@
|
| 5577 |
|
* @param array $methods XMLRPC methods. |
| 5578 |
|
* @return array XMLRPC methods, with the $HTTP_RAW_POST_DATA one. |
| 5579 |
|
*/ |
| 5580 |
|
public function xmlrpc_methods( $methods ) { |
| 5581 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_methods' ); |
| 5582 |
|
|
| 5583 |
|
if ( ! $this->connection_manager ) { |
| 5584 |
|
$this->connection_manager = new Connection_Manager(); |
| 5585 |
|
} |
| 5586 |
|
|
| 5587 |
|
return $this->connection_manager->xmlrpc_methods( $methods ); |
| 5588 |
|
} |
| 5589 |
|
|
| 5590 |
|
/** |
| 5591 |
|
* Register additional public XMLRPC methods. |
|
@@ 5599-5607 (lines=9) @@
|
| 5596 |
|
* @param array $methods Public XMLRPC methods. |
| 5597 |
|
* @return array Public XMLRPC methods, with the getOptions one. |
| 5598 |
|
*/ |
| 5599 |
|
public function public_xmlrpc_methods( $methods ) { |
| 5600 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::public_xmlrpc_methods' ); |
| 5601 |
|
|
| 5602 |
|
if ( ! $this->connection_manager ) { |
| 5603 |
|
$this->connection_manager = new Connection_Manager(); |
| 5604 |
|
} |
| 5605 |
|
|
| 5606 |
|
return $this->connection_manager->public_xmlrpc_methods( $methods ); |
| 5607 |
|
} |
| 5608 |
|
|
| 5609 |
|
/** |
| 5610 |
|
* Handles a getOptions XMLRPC method call. |
|
@@ 5618-5626 (lines=9) @@
|
| 5615 |
|
* @param array $args method call arguments. |
| 5616 |
|
* @return array an amended XMLRPC server options array. |
| 5617 |
|
*/ |
| 5618 |
|
public function jetpack_getOptions( $args ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid |
| 5619 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::jetpack_getOptions' ); |
| 5620 |
|
|
| 5621 |
|
if ( ! $this->connection_manager ) { |
| 5622 |
|
$this->connection_manager = new Connection_Manager(); |
| 5623 |
|
} |
| 5624 |
|
|
| 5625 |
|
return $this->connection_manager->jetpack_getOptions( $args ); |
| 5626 |
|
} |
| 5627 |
|
|
| 5628 |
|
/** |
| 5629 |
|
* Adds Jetpack-specific options to the output of the XMLRPC options method. |
|
@@ 5637-5645 (lines=9) @@
|
| 5634 |
|
* @param array $options Standard Core options. |
| 5635 |
|
* @return array Amended options. |
| 5636 |
|
*/ |
| 5637 |
|
public function xmlrpc_options( $options ) { |
| 5638 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_options' ); |
| 5639 |
|
|
| 5640 |
|
if ( ! $this->connection_manager ) { |
| 5641 |
|
$this->connection_manager = new Connection_Manager(); |
| 5642 |
|
} |
| 5643 |
|
|
| 5644 |
|
return $this->connection_manager->xmlrpc_options( $options ); |
| 5645 |
|
} |
| 5646 |
|
|
| 5647 |
|
/** |
| 5648 |
|
* Cleans nonces that were saved when calling ::add_nonce. |
|
@@ 923-931 (lines=9) @@
|
| 920 |
|
* @deprecated since 7.7.0 |
| 921 |
|
* @see Automattic\Jetpack\Connection\Manager::initialize_rest_api_registration_connector() |
| 922 |
|
*/ |
| 923 |
|
public function initialize_rest_api_registration_connector() { |
| 924 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::initialize_rest_api_registration_connector' ); |
| 925 |
|
|
| 926 |
|
if ( ! $this->connection_manager ) { |
| 927 |
|
$this->connection_manager = new Connection_Manager(); |
| 928 |
|
} |
| 929 |
|
|
| 930 |
|
$this->connection_manager->initialize_rest_api_registration_connector(); |
| 931 |
|
} |
| 932 |
|
|
| 933 |
|
/** |
| 934 |
|
* This is ported over from the manage module, which has been deprecated and baked in here. |
|
@@ 1049-1057 (lines=9) @@
|
| 1046 |
|
* @param array $methods A list of registered WordPress XMLRPC methods. |
| 1047 |
|
* @return array Filtered $methods |
| 1048 |
|
*/ |
| 1049 |
|
public function remove_non_jetpack_xmlrpc_methods( $methods ) { |
| 1050 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::remove_non_jetpack_xmlrpc_methods' ); |
| 1051 |
|
|
| 1052 |
|
if ( ! $this->connection_manager ) { |
| 1053 |
|
$this->connection_manager = new Connection_Manager(); |
| 1054 |
|
} |
| 1055 |
|
|
| 1056 |
|
return $this->connection_manager->remove_non_jetpack_xmlrpc_methods( $methods ); |
| 1057 |
|
} |
| 1058 |
|
|
| 1059 |
|
/** |
| 1060 |
|
* Since a lot of hosts use a hammer approach to "protecting" WordPress sites, |
|
@@ 1069-1077 (lines=9) @@
|
| 1066 |
|
* @deprecated since 7.7.0 |
| 1067 |
|
* @see Automattic\Jetpack\Connection\Manager::alternate_xmlrpc() |
| 1068 |
|
*/ |
| 1069 |
|
public function alternate_xmlrpc() { |
| 1070 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::alternate_xmlrpc' ); |
| 1071 |
|
|
| 1072 |
|
if ( ! $this->connection_manager ) { |
| 1073 |
|
$this->connection_manager = new Connection_Manager(); |
| 1074 |
|
} |
| 1075 |
|
|
| 1076 |
|
$this->connection_manager->alternate_xmlrpc(); |
| 1077 |
|
} |
| 1078 |
|
|
| 1079 |
|
/** |
| 1080 |
|
* The callback for the JITM ajax requests. |