@@ 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. |
|
@@ 1120-1128 (lines=9) @@ | ||
1117 | * @deprecated since 7.7.0 |
|
1118 | * @see Automattic\Jetpack\Connection\Manager::require_jetpack_authentication() |
|
1119 | */ |
|
1120 | public function require_jetpack_authentication() { |
|
1121 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::require_jetpack_authentication' ); |
|
1122 | ||
1123 | if ( ! $this->connection_manager ) { |
|
1124 | $this->connection_manager = new Connection_Manager(); |
|
1125 | } |
|
1126 | ||
1127 | $this->connection_manager->require_jetpack_authentication(); |
|
1128 | } |
|
1129 | ||
1130 | /** |
|
1131 | * Register assets for use in various modules and the Jetpack admin page. |
|
@@ 1022-1030 (lines=9) @@ | ||
1019 | * @param array $methods A list of registered WordPress XMLRPC methods. |
|
1020 | * @return array Filtered $methods |
|
1021 | */ |
|
1022 | public function remove_non_jetpack_xmlrpc_methods( $methods ) { |
|
1023 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::remove_non_jetpack_xmlrpc_methods' ); |
|
1024 | ||
1025 | if ( ! $this->connection_manager ) { |
|
1026 | $this->connection_manager = new Connection_Manager(); |
|
1027 | } |
|
1028 | ||
1029 | return $this->connection_manager->remove_non_jetpack_xmlrpc_methods( $methods ); |
|
1030 | } |
|
1031 | ||
1032 | /** |
|
1033 | * Since a lot of hosts use a hammer approach to "protecting" WordPress sites, |
|
@@ 1042-1050 (lines=9) @@ | ||
1039 | * @deprecated since 7.7.0 |
|
1040 | * @see Automattic\Jetpack\Connection\Manager::alternate_xmlrpc() |
|
1041 | */ |
|
1042 | public function alternate_xmlrpc() { |
|
1043 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::alternate_xmlrpc' ); |
|
1044 | ||
1045 | if ( ! $this->connection_manager ) { |
|
1046 | $this->connection_manager = new Connection_Manager(); |
|
1047 | } |
|
1048 | ||
1049 | $this->connection_manager->alternate_xmlrpc(); |
|
1050 | } |
|
1051 | ||
1052 | /** |
|
1053 | * The callback for the JITM ajax requests. |
|
@@ 896-904 (lines=9) @@ | ||
893 | * @deprecated since 7.7.0 |
|
894 | * @see Automattic\Jetpack\Connection\Manager::initialize_rest_api_registration_connector() |
|
895 | */ |
|
896 | public function initialize_rest_api_registration_connector() { |
|
897 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::initialize_rest_api_registration_connector' ); |
|
898 | ||
899 | if ( ! $this->connection_manager ) { |
|
900 | $this->connection_manager = new Connection_Manager(); |
|
901 | } |
|
902 | ||
903 | $this->connection_manager->initialize_rest_api_registration_connector(); |
|
904 | } |
|
905 | ||
906 | /** |
|
907 | * This is ported over from the manage module, which has been deprecated and baked in here. |