|
@@ 5594-5602 (lines=9) @@
|
| 5591 |
|
* @param int $timestamp Timestamp of the request. |
| 5592 |
|
* @param string $nonce Nonce string. |
| 5593 |
|
*/ |
| 5594 |
|
public function add_nonce( $timestamp, $nonce ) { |
| 5595 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::add_nonce' ); |
| 5596 |
|
|
| 5597 |
|
if ( ! $this->connection_manager ) { |
| 5598 |
|
$this->connection_manager = new Connection_Manager(); |
| 5599 |
|
} |
| 5600 |
|
|
| 5601 |
|
return $this->connection_manager->add_nonce( $timestamp, $nonce ); |
| 5602 |
|
} |
| 5603 |
|
|
| 5604 |
|
/** |
| 5605 |
|
* In some setups, $HTTP_RAW_POST_DATA can be emptied during some IXR_Server paths since it is passed by reference to various methods. |
|
@@ 5614-5622 (lines=9) @@
|
| 5611 |
|
* @param array $methods XMLRPC methods. |
| 5612 |
|
* @return array XMLRPC methods, with the $HTTP_RAW_POST_DATA one. |
| 5613 |
|
*/ |
| 5614 |
|
public function xmlrpc_methods( $methods ) { |
| 5615 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_methods' ); |
| 5616 |
|
|
| 5617 |
|
if ( ! $this->connection_manager ) { |
| 5618 |
|
$this->connection_manager = new Connection_Manager(); |
| 5619 |
|
} |
| 5620 |
|
|
| 5621 |
|
return $this->connection_manager->xmlrpc_methods( $methods ); |
| 5622 |
|
} |
| 5623 |
|
|
| 5624 |
|
/** |
| 5625 |
|
* Register additional public XMLRPC methods. |
|
@@ 5633-5641 (lines=9) @@
|
| 5630 |
|
* @param array $methods Public XMLRPC methods. |
| 5631 |
|
* @return array Public XMLRPC methods, with the getOptions one. |
| 5632 |
|
*/ |
| 5633 |
|
public function public_xmlrpc_methods( $methods ) { |
| 5634 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::public_xmlrpc_methods' ); |
| 5635 |
|
|
| 5636 |
|
if ( ! $this->connection_manager ) { |
| 5637 |
|
$this->connection_manager = new Connection_Manager(); |
| 5638 |
|
} |
| 5639 |
|
|
| 5640 |
|
return $this->connection_manager->public_xmlrpc_methods( $methods ); |
| 5641 |
|
} |
| 5642 |
|
|
| 5643 |
|
/** |
| 5644 |
|
* Handles a getOptions XMLRPC method call. |
|
@@ 5652-5660 (lines=9) @@
|
| 5649 |
|
* @param array $args method call arguments. |
| 5650 |
|
* @return array an amended XMLRPC server options array. |
| 5651 |
|
*/ |
| 5652 |
|
public function jetpack_getOptions( $args ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid |
| 5653 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::jetpack_getOptions' ); |
| 5654 |
|
|
| 5655 |
|
if ( ! $this->connection_manager ) { |
| 5656 |
|
$this->connection_manager = new Connection_Manager(); |
| 5657 |
|
} |
| 5658 |
|
|
| 5659 |
|
return $this->connection_manager->jetpack_getOptions( $args ); |
| 5660 |
|
} |
| 5661 |
|
|
| 5662 |
|
/** |
| 5663 |
|
* Adds Jetpack-specific options to the output of the XMLRPC options method. |
|
@@ 5671-5679 (lines=9) @@
|
| 5668 |
|
* @param array $options Standard Core options. |
| 5669 |
|
* @return array Amended options. |
| 5670 |
|
*/ |
| 5671 |
|
public function xmlrpc_options( $options ) { |
| 5672 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_options' ); |
| 5673 |
|
|
| 5674 |
|
if ( ! $this->connection_manager ) { |
| 5675 |
|
$this->connection_manager = new Connection_Manager(); |
| 5676 |
|
} |
| 5677 |
|
|
| 5678 |
|
return $this->connection_manager->xmlrpc_options( $options ); |
| 5679 |
|
} |
| 5680 |
|
|
| 5681 |
|
/** |
| 5682 |
|
* Cleans nonces that were saved when calling ::add_nonce. |
|
@@ 875-883 (lines=9) @@
|
| 872 |
|
* @deprecated since 7.7.0 |
| 873 |
|
* @see Automattic\Jetpack\Connection\Manager::initialize_rest_api_registration_connector() |
| 874 |
|
*/ |
| 875 |
|
public function initialize_rest_api_registration_connector() { |
| 876 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::initialize_rest_api_registration_connector' ); |
| 877 |
|
|
| 878 |
|
if ( ! $this->connection_manager ) { |
| 879 |
|
$this->connection_manager = new Connection_Manager(); |
| 880 |
|
} |
| 881 |
|
|
| 882 |
|
$this->connection_manager->initialize_rest_api_registration_connector(); |
| 883 |
|
} |
| 884 |
|
|
| 885 |
|
/** |
| 886 |
|
* This is ported over from the manage module, which has been deprecated and baked in here. |
|
@@ 995-1003 (lines=9) @@
|
| 992 |
|
* @param array $methods A list of registered WordPress XMLRPC methods. |
| 993 |
|
* @return array Filtered $methods |
| 994 |
|
*/ |
| 995 |
|
public function remove_non_jetpack_xmlrpc_methods( $methods ) { |
| 996 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::remove_non_jetpack_xmlrpc_methods' ); |
| 997 |
|
|
| 998 |
|
if ( ! $this->connection_manager ) { |
| 999 |
|
$this->connection_manager = new Connection_Manager(); |
| 1000 |
|
} |
| 1001 |
|
|
| 1002 |
|
return $this->connection_manager->remove_non_jetpack_xmlrpc_methods( $methods ); |
| 1003 |
|
} |
| 1004 |
|
|
| 1005 |
|
/** |
| 1006 |
|
* Since a lot of hosts use a hammer approach to "protecting" WordPress sites, |
|
@@ 1015-1023 (lines=9) @@
|
| 1012 |
|
* @deprecated since 7.7.0 |
| 1013 |
|
* @see Automattic\Jetpack\Connection\Manager::alternate_xmlrpc() |
| 1014 |
|
*/ |
| 1015 |
|
public function alternate_xmlrpc() { |
| 1016 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::alternate_xmlrpc' ); |
| 1017 |
|
|
| 1018 |
|
if ( ! $this->connection_manager ) { |
| 1019 |
|
$this->connection_manager = new Connection_Manager(); |
| 1020 |
|
} |
| 1021 |
|
|
| 1022 |
|
$this->connection_manager->alternate_xmlrpc(); |
| 1023 |
|
} |
| 1024 |
|
|
| 1025 |
|
/** |
| 1026 |
|
* The callback for the JITM ajax requests. |
|
@@ 1123-1131 (lines=9) @@
|
| 1120 |
|
* @deprecated since 7.7.0 |
| 1121 |
|
* @see Automattic\Jetpack\Connection\Manager::require_jetpack_authentication() |
| 1122 |
|
*/ |
| 1123 |
|
public function require_jetpack_authentication() { |
| 1124 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::require_jetpack_authentication' ); |
| 1125 |
|
|
| 1126 |
|
if ( ! $this->connection_manager ) { |
| 1127 |
|
$this->connection_manager = new Connection_Manager(); |
| 1128 |
|
} |
| 1129 |
|
|
| 1130 |
|
$this->connection_manager->require_jetpack_authentication(); |
| 1131 |
|
} |
| 1132 |
|
|
| 1133 |
|
/** |
| 1134 |
|
* Load language files |