@@ 5729-5737 (lines=9) @@ | ||
5726 | * @param int $timestamp Timestamp of the request. |
|
5727 | * @param string $nonce Nonce string. |
|
5728 | */ |
|
5729 | public function add_nonce( $timestamp, $nonce ) { |
|
5730 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::add_nonce' ); |
|
5731 | ||
5732 | if ( ! $this->connection_manager ) { |
|
5733 | $this->connection_manager = new Connection_Manager(); |
|
5734 | } |
|
5735 | ||
5736 | return $this->connection_manager->add_nonce( $timestamp, $nonce ); |
|
5737 | } |
|
5738 | ||
5739 | /** |
|
5740 | * In some setups, $HTTP_RAW_POST_DATA can be emptied during some IXR_Server paths since it is passed by reference to various methods. |
|
@@ 5749-5757 (lines=9) @@ | ||
5746 | * @param array $methods XMLRPC methods. |
|
5747 | * @return array XMLRPC methods, with the $HTTP_RAW_POST_DATA one. |
|
5748 | */ |
|
5749 | public function xmlrpc_methods( $methods ) { |
|
5750 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_methods' ); |
|
5751 | ||
5752 | if ( ! $this->connection_manager ) { |
|
5753 | $this->connection_manager = new Connection_Manager(); |
|
5754 | } |
|
5755 | ||
5756 | return $this->connection_manager->xmlrpc_methods( $methods ); |
|
5757 | } |
|
5758 | ||
5759 | /** |
|
5760 | * Register additional public XMLRPC methods. |
|
@@ 5768-5776 (lines=9) @@ | ||
5765 | * @param array $methods Public XMLRPC methods. |
|
5766 | * @return array Public XMLRPC methods, with the getOptions one. |
|
5767 | */ |
|
5768 | public function public_xmlrpc_methods( $methods ) { |
|
5769 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::public_xmlrpc_methods' ); |
|
5770 | ||
5771 | if ( ! $this->connection_manager ) { |
|
5772 | $this->connection_manager = new Connection_Manager(); |
|
5773 | } |
|
5774 | ||
5775 | return $this->connection_manager->public_xmlrpc_methods( $methods ); |
|
5776 | } |
|
5777 | ||
5778 | /** |
|
5779 | * Handles a getOptions XMLRPC method call. |
|
@@ 5787-5795 (lines=9) @@ | ||
5784 | * @param array $args method call arguments. |
|
5785 | * @return array an amended XMLRPC server options array. |
|
5786 | */ |
|
5787 | public function jetpack_getOptions( $args ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid |
|
5788 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::jetpack_getOptions' ); |
|
5789 | ||
5790 | if ( ! $this->connection_manager ) { |
|
5791 | $this->connection_manager = new Connection_Manager(); |
|
5792 | } |
|
5793 | ||
5794 | return $this->connection_manager->jetpack_getOptions( $args ); |
|
5795 | } |
|
5796 | ||
5797 | /** |
|
5798 | * Adds Jetpack-specific options to the output of the XMLRPC options method. |
|
@@ 5806-5814 (lines=9) @@ | ||
5803 | * @param array $options Standard Core options. |
|
5804 | * @return array Amended options. |
|
5805 | */ |
|
5806 | public function xmlrpc_options( $options ) { |
|
5807 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_options' ); |
|
5808 | ||
5809 | if ( ! $this->connection_manager ) { |
|
5810 | $this->connection_manager = new Connection_Manager(); |
|
5811 | } |
|
5812 | ||
5813 | return $this->connection_manager->xmlrpc_options( $options ); |
|
5814 | } |
|
5815 | ||
5816 | /** |
|
5817 | * Cleans nonces that were saved when calling ::add_nonce. |
|
@@ 885-893 (lines=9) @@ | ||
882 | * @deprecated since 7.7.0 |
|
883 | * @see Automattic\Jetpack\Connection\Manager::initialize_rest_api_registration_connector() |
|
884 | */ |
|
885 | public function initialize_rest_api_registration_connector() { |
|
886 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::initialize_rest_api_registration_connector' ); |
|
887 | ||
888 | if ( ! $this->connection_manager ) { |
|
889 | $this->connection_manager = new Connection_Manager(); |
|
890 | } |
|
891 | ||
892 | $this->connection_manager->initialize_rest_api_registration_connector(); |
|
893 | } |
|
894 | ||
895 | /** |
|
896 | * This is ported over from the manage module, which has been deprecated and baked in here. |
|
@@ 1011-1019 (lines=9) @@ | ||
1008 | * @param array $methods A list of registered WordPress XMLRPC methods. |
|
1009 | * @return array Filtered $methods |
|
1010 | */ |
|
1011 | public function remove_non_jetpack_xmlrpc_methods( $methods ) { |
|
1012 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::remove_non_jetpack_xmlrpc_methods' ); |
|
1013 | ||
1014 | if ( ! $this->connection_manager ) { |
|
1015 | $this->connection_manager = new Connection_Manager(); |
|
1016 | } |
|
1017 | ||
1018 | return $this->connection_manager->remove_non_jetpack_xmlrpc_methods( $methods ); |
|
1019 | } |
|
1020 | ||
1021 | /** |
|
1022 | * Since a lot of hosts use a hammer approach to "protecting" WordPress sites, |
|
@@ 1031-1039 (lines=9) @@ | ||
1028 | * @deprecated since 7.7.0 |
|
1029 | * @see Automattic\Jetpack\Connection\Manager::alternate_xmlrpc() |
|
1030 | */ |
|
1031 | public function alternate_xmlrpc() { |
|
1032 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::alternate_xmlrpc' ); |
|
1033 | ||
1034 | if ( ! $this->connection_manager ) { |
|
1035 | $this->connection_manager = new Connection_Manager(); |
|
1036 | } |
|
1037 | ||
1038 | $this->connection_manager->alternate_xmlrpc(); |
|
1039 | } |
|
1040 | ||
1041 | /** |
|
1042 | * The callback for the JITM ajax requests. |
|
@@ 1139-1147 (lines=9) @@ | ||
1136 | * @deprecated since 7.7.0 |
|
1137 | * @see Automattic\Jetpack\Connection\Manager::require_jetpack_authentication() |
|
1138 | */ |
|
1139 | public function require_jetpack_authentication() { |
|
1140 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::require_jetpack_authentication' ); |
|
1141 | ||
1142 | if ( ! $this->connection_manager ) { |
|
1143 | $this->connection_manager = new Connection_Manager(); |
|
1144 | } |
|
1145 | ||
1146 | $this->connection_manager->require_jetpack_authentication(); |
|
1147 | } |
|
1148 | ||
1149 | /** |
|
1150 | * Load language files |