|
@@ 1140-1148 (lines=9) @@
|
| 1137 |
|
* @deprecated since 7.7.0 |
| 1138 |
|
* @see Automattic\Jetpack\Connection\Manager::require_jetpack_authentication() |
| 1139 |
|
*/ |
| 1140 |
|
public function require_jetpack_authentication() { |
| 1141 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::require_jetpack_authentication' ); |
| 1142 |
|
|
| 1143 |
|
if ( ! $this->connection_manager ) { |
| 1144 |
|
$this->connection_manager = new Connection_Manager(); |
| 1145 |
|
} |
| 1146 |
|
|
| 1147 |
|
$this->connection_manager->require_jetpack_authentication(); |
| 1148 |
|
} |
| 1149 |
|
|
| 1150 |
|
/** |
| 1151 |
|
* Register assets for use in various modules and the Jetpack admin page. |
|
@@ 916-924 (lines=9) @@
|
| 913 |
|
* @deprecated since 7.7.0 |
| 914 |
|
* @see Automattic\Jetpack\Connection\Manager::initialize_rest_api_registration_connector() |
| 915 |
|
*/ |
| 916 |
|
public function initialize_rest_api_registration_connector() { |
| 917 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::initialize_rest_api_registration_connector' ); |
| 918 |
|
|
| 919 |
|
if ( ! $this->connection_manager ) { |
| 920 |
|
$this->connection_manager = new Connection_Manager(); |
| 921 |
|
} |
| 922 |
|
|
| 923 |
|
$this->connection_manager->initialize_rest_api_registration_connector(); |
| 924 |
|
} |
| 925 |
|
|
| 926 |
|
/** |
| 927 |
|
* This is ported over from the manage module, which has been deprecated and baked in here. |
|
@@ 1042-1050 (lines=9) @@
|
| 1039 |
|
* @param array $methods A list of registered WordPress XMLRPC methods. |
| 1040 |
|
* @return array Filtered $methods |
| 1041 |
|
*/ |
| 1042 |
|
public function remove_non_jetpack_xmlrpc_methods( $methods ) { |
| 1043 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::remove_non_jetpack_xmlrpc_methods' ); |
| 1044 |
|
|
| 1045 |
|
if ( ! $this->connection_manager ) { |
| 1046 |
|
$this->connection_manager = new Connection_Manager(); |
| 1047 |
|
} |
| 1048 |
|
|
| 1049 |
|
return $this->connection_manager->remove_non_jetpack_xmlrpc_methods( $methods ); |
| 1050 |
|
} |
| 1051 |
|
|
| 1052 |
|
/** |
| 1053 |
|
* Since a lot of hosts use a hammer approach to "protecting" WordPress sites, |
|
@@ 1062-1070 (lines=9) @@
|
| 1059 |
|
* @deprecated since 7.7.0 |
| 1060 |
|
* @see Automattic\Jetpack\Connection\Manager::alternate_xmlrpc() |
| 1061 |
|
*/ |
| 1062 |
|
public function alternate_xmlrpc() { |
| 1063 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::alternate_xmlrpc' ); |
| 1064 |
|
|
| 1065 |
|
if ( ! $this->connection_manager ) { |
| 1066 |
|
$this->connection_manager = new Connection_Manager(); |
| 1067 |
|
} |
| 1068 |
|
|
| 1069 |
|
$this->connection_manager->alternate_xmlrpc(); |
| 1070 |
|
} |
| 1071 |
|
|
| 1072 |
|
/** |
| 1073 |
|
* The callback for the JITM ajax requests. |
|
@@ 5553-5561 (lines=9) @@
|
| 5550 |
|
* @param int $timestamp Timestamp of the request. |
| 5551 |
|
* @param string $nonce Nonce string. |
| 5552 |
|
*/ |
| 5553 |
|
public function add_nonce( $timestamp, $nonce ) { |
| 5554 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::add_nonce' ); |
| 5555 |
|
|
| 5556 |
|
if ( ! $this->connection_manager ) { |
| 5557 |
|
$this->connection_manager = new Connection_Manager(); |
| 5558 |
|
} |
| 5559 |
|
|
| 5560 |
|
return $this->connection_manager->add_nonce( $timestamp, $nonce ); |
| 5561 |
|
} |
| 5562 |
|
|
| 5563 |
|
/** |
| 5564 |
|
* In some setups, $HTTP_RAW_POST_DATA can be emptied during some IXR_Server paths since it is passed by reference to various methods. |
|
@@ 5573-5581 (lines=9) @@
|
| 5570 |
|
* @param array $methods XMLRPC methods. |
| 5571 |
|
* @return array XMLRPC methods, with the $HTTP_RAW_POST_DATA one. |
| 5572 |
|
*/ |
| 5573 |
|
public function xmlrpc_methods( $methods ) { |
| 5574 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_methods' ); |
| 5575 |
|
|
| 5576 |
|
if ( ! $this->connection_manager ) { |
| 5577 |
|
$this->connection_manager = new Connection_Manager(); |
| 5578 |
|
} |
| 5579 |
|
|
| 5580 |
|
return $this->connection_manager->xmlrpc_methods( $methods ); |
| 5581 |
|
} |
| 5582 |
|
|
| 5583 |
|
/** |
| 5584 |
|
* Register additional public XMLRPC methods. |
|
@@ 5592-5600 (lines=9) @@
|
| 5589 |
|
* @param array $methods Public XMLRPC methods. |
| 5590 |
|
* @return array Public XMLRPC methods, with the getOptions one. |
| 5591 |
|
*/ |
| 5592 |
|
public function public_xmlrpc_methods( $methods ) { |
| 5593 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::public_xmlrpc_methods' ); |
| 5594 |
|
|
| 5595 |
|
if ( ! $this->connection_manager ) { |
| 5596 |
|
$this->connection_manager = new Connection_Manager(); |
| 5597 |
|
} |
| 5598 |
|
|
| 5599 |
|
return $this->connection_manager->public_xmlrpc_methods( $methods ); |
| 5600 |
|
} |
| 5601 |
|
|
| 5602 |
|
/** |
| 5603 |
|
* Handles a getOptions XMLRPC method call. |
|
@@ 5611-5619 (lines=9) @@
|
| 5608 |
|
* @param array $args method call arguments. |
| 5609 |
|
* @return array an amended XMLRPC server options array. |
| 5610 |
|
*/ |
| 5611 |
|
public function jetpack_getOptions( $args ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid |
| 5612 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::jetpack_getOptions' ); |
| 5613 |
|
|
| 5614 |
|
if ( ! $this->connection_manager ) { |
| 5615 |
|
$this->connection_manager = new Connection_Manager(); |
| 5616 |
|
} |
| 5617 |
|
|
| 5618 |
|
return $this->connection_manager->jetpack_getOptions( $args ); |
| 5619 |
|
} |
| 5620 |
|
|
| 5621 |
|
/** |
| 5622 |
|
* Adds Jetpack-specific options to the output of the XMLRPC options method. |
|
@@ 5630-5638 (lines=9) @@
|
| 5627 |
|
* @param array $options Standard Core options. |
| 5628 |
|
* @return array Amended options. |
| 5629 |
|
*/ |
| 5630 |
|
public function xmlrpc_options( $options ) { |
| 5631 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_options' ); |
| 5632 |
|
|
| 5633 |
|
if ( ! $this->connection_manager ) { |
| 5634 |
|
$this->connection_manager = new Connection_Manager(); |
| 5635 |
|
} |
| 5636 |
|
|
| 5637 |
|
return $this->connection_manager->xmlrpc_options( $options ); |
| 5638 |
|
} |
| 5639 |
|
|
| 5640 |
|
/** |
| 5641 |
|
* Cleans nonces that were saved when calling ::add_nonce. |