|
@@ 1150-1158 (lines=9) @@
|
| 1147 |
|
* @deprecated since 7.7.0 |
| 1148 |
|
* @see Automattic\Jetpack\Connection\Manager::require_jetpack_authentication() |
| 1149 |
|
*/ |
| 1150 |
|
public function require_jetpack_authentication() { |
| 1151 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::require_jetpack_authentication' ); |
| 1152 |
|
|
| 1153 |
|
if ( ! $this->connection_manager ) { |
| 1154 |
|
$this->connection_manager = new Connection_Manager(); |
| 1155 |
|
} |
| 1156 |
|
|
| 1157 |
|
$this->connection_manager->require_jetpack_authentication(); |
| 1158 |
|
} |
| 1159 |
|
|
| 1160 |
|
/** |
| 1161 |
|
* Register assets for use in various modules and the Jetpack admin page. |
|
@@ 926-934 (lines=9) @@
|
| 923 |
|
* @deprecated since 7.7.0 |
| 924 |
|
* @see Automattic\Jetpack\Connection\Manager::initialize_rest_api_registration_connector() |
| 925 |
|
*/ |
| 926 |
|
public function initialize_rest_api_registration_connector() { |
| 927 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::initialize_rest_api_registration_connector' ); |
| 928 |
|
|
| 929 |
|
if ( ! $this->connection_manager ) { |
| 930 |
|
$this->connection_manager = new Connection_Manager(); |
| 931 |
|
} |
| 932 |
|
|
| 933 |
|
$this->connection_manager->initialize_rest_api_registration_connector(); |
| 934 |
|
} |
| 935 |
|
|
| 936 |
|
/** |
| 937 |
|
* This is ported over from the manage module, which has been deprecated and baked in here. |
|
@@ 1052-1060 (lines=9) @@
|
| 1049 |
|
* @param array $methods A list of registered WordPress XMLRPC methods. |
| 1050 |
|
* @return array Filtered $methods |
| 1051 |
|
*/ |
| 1052 |
|
public function remove_non_jetpack_xmlrpc_methods( $methods ) { |
| 1053 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::remove_non_jetpack_xmlrpc_methods' ); |
| 1054 |
|
|
| 1055 |
|
if ( ! $this->connection_manager ) { |
| 1056 |
|
$this->connection_manager = new Connection_Manager(); |
| 1057 |
|
} |
| 1058 |
|
|
| 1059 |
|
return $this->connection_manager->remove_non_jetpack_xmlrpc_methods( $methods ); |
| 1060 |
|
} |
| 1061 |
|
|
| 1062 |
|
/** |
| 1063 |
|
* Since a lot of hosts use a hammer approach to "protecting" WordPress sites, |
|
@@ 1072-1080 (lines=9) @@
|
| 1069 |
|
* @deprecated since 7.7.0 |
| 1070 |
|
* @see Automattic\Jetpack\Connection\Manager::alternate_xmlrpc() |
| 1071 |
|
*/ |
| 1072 |
|
public function alternate_xmlrpc() { |
| 1073 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::alternate_xmlrpc' ); |
| 1074 |
|
|
| 1075 |
|
if ( ! $this->connection_manager ) { |
| 1076 |
|
$this->connection_manager = new Connection_Manager(); |
| 1077 |
|
} |
| 1078 |
|
|
| 1079 |
|
$this->connection_manager->alternate_xmlrpc(); |
| 1080 |
|
} |
| 1081 |
|
|
| 1082 |
|
/** |
| 1083 |
|
* The callback for the JITM ajax requests. |
|
@@ 5574-5582 (lines=9) @@
|
| 5571 |
|
* @param int $timestamp Timestamp of the request. |
| 5572 |
|
* @param string $nonce Nonce string. |
| 5573 |
|
*/ |
| 5574 |
|
public function add_nonce( $timestamp, $nonce ) { |
| 5575 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::add_nonce' ); |
| 5576 |
|
|
| 5577 |
|
if ( ! $this->connection_manager ) { |
| 5578 |
|
$this->connection_manager = new Connection_Manager(); |
| 5579 |
|
} |
| 5580 |
|
|
| 5581 |
|
return $this->connection_manager->add_nonce( $timestamp, $nonce ); |
| 5582 |
|
} |
| 5583 |
|
|
| 5584 |
|
/** |
| 5585 |
|
* In some setups, $HTTP_RAW_POST_DATA can be emptied during some IXR_Server paths since it is passed by reference to various methods. |
|
@@ 5594-5602 (lines=9) @@
|
| 5591 |
|
* @param array $methods XMLRPC methods. |
| 5592 |
|
* @return array XMLRPC methods, with the $HTTP_RAW_POST_DATA one. |
| 5593 |
|
*/ |
| 5594 |
|
public function xmlrpc_methods( $methods ) { |
| 5595 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_methods' ); |
| 5596 |
|
|
| 5597 |
|
if ( ! $this->connection_manager ) { |
| 5598 |
|
$this->connection_manager = new Connection_Manager(); |
| 5599 |
|
} |
| 5600 |
|
|
| 5601 |
|
return $this->connection_manager->xmlrpc_methods( $methods ); |
| 5602 |
|
} |
| 5603 |
|
|
| 5604 |
|
/** |
| 5605 |
|
* Register additional public XMLRPC methods. |
|
@@ 5613-5621 (lines=9) @@
|
| 5610 |
|
* @param array $methods Public XMLRPC methods. |
| 5611 |
|
* @return array Public XMLRPC methods, with the getOptions one. |
| 5612 |
|
*/ |
| 5613 |
|
public function public_xmlrpc_methods( $methods ) { |
| 5614 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::public_xmlrpc_methods' ); |
| 5615 |
|
|
| 5616 |
|
if ( ! $this->connection_manager ) { |
| 5617 |
|
$this->connection_manager = new Connection_Manager(); |
| 5618 |
|
} |
| 5619 |
|
|
| 5620 |
|
return $this->connection_manager->public_xmlrpc_methods( $methods ); |
| 5621 |
|
} |
| 5622 |
|
|
| 5623 |
|
/** |
| 5624 |
|
* Handles a getOptions XMLRPC method call. |
|
@@ 5632-5640 (lines=9) @@
|
| 5629 |
|
* @param array $args method call arguments. |
| 5630 |
|
* @return array an amended XMLRPC server options array. |
| 5631 |
|
*/ |
| 5632 |
|
public function jetpack_getOptions( $args ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid |
| 5633 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::jetpack_getOptions' ); |
| 5634 |
|
|
| 5635 |
|
if ( ! $this->connection_manager ) { |
| 5636 |
|
$this->connection_manager = new Connection_Manager(); |
| 5637 |
|
} |
| 5638 |
|
|
| 5639 |
|
return $this->connection_manager->jetpack_getOptions( $args ); |
| 5640 |
|
} |
| 5641 |
|
|
| 5642 |
|
/** |
| 5643 |
|
* Adds Jetpack-specific options to the output of the XMLRPC options method. |
|
@@ 5651-5659 (lines=9) @@
|
| 5648 |
|
* @param array $options Standard Core options. |
| 5649 |
|
* @return array Amended options. |
| 5650 |
|
*/ |
| 5651 |
|
public function xmlrpc_options( $options ) { |
| 5652 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_options' ); |
| 5653 |
|
|
| 5654 |
|
if ( ! $this->connection_manager ) { |
| 5655 |
|
$this->connection_manager = new Connection_Manager(); |
| 5656 |
|
} |
| 5657 |
|
|
| 5658 |
|
return $this->connection_manager->xmlrpc_options( $options ); |
| 5659 |
|
} |
| 5660 |
|
|
| 5661 |
|
/** |
| 5662 |
|
* Cleans nonces that were saved when calling ::add_nonce. |