|
@@ 5604-5612 (lines=9) @@
|
| 5601 |
|
* @param array $methods XMLRPC methods. |
| 5602 |
|
* @return array XMLRPC methods, with the $HTTP_RAW_POST_DATA one. |
| 5603 |
|
*/ |
| 5604 |
|
public function xmlrpc_methods( $methods ) { |
| 5605 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_methods' ); |
| 5606 |
|
|
| 5607 |
|
if ( ! $this->connection_manager ) { |
| 5608 |
|
$this->connection_manager = new Connection_Manager(); |
| 5609 |
|
} |
| 5610 |
|
|
| 5611 |
|
return $this->connection_manager->xmlrpc_methods( $methods ); |
| 5612 |
|
} |
| 5613 |
|
|
| 5614 |
|
/** |
| 5615 |
|
* Register additional public XMLRPC methods. |
|
@@ 5623-5631 (lines=9) @@
|
| 5620 |
|
* @param array $methods Public XMLRPC methods. |
| 5621 |
|
* @return array Public XMLRPC methods, with the getOptions one. |
| 5622 |
|
*/ |
| 5623 |
|
public function public_xmlrpc_methods( $methods ) { |
| 5624 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::public_xmlrpc_methods' ); |
| 5625 |
|
|
| 5626 |
|
if ( ! $this->connection_manager ) { |
| 5627 |
|
$this->connection_manager = new Connection_Manager(); |
| 5628 |
|
} |
| 5629 |
|
|
| 5630 |
|
return $this->connection_manager->public_xmlrpc_methods( $methods ); |
| 5631 |
|
} |
| 5632 |
|
|
| 5633 |
|
/** |
| 5634 |
|
* Handles a getOptions XMLRPC method call. |
|
@@ 5642-5650 (lines=9) @@
|
| 5639 |
|
* @param array $args method call arguments. |
| 5640 |
|
* @return array an amended XMLRPC server options array. |
| 5641 |
|
*/ |
| 5642 |
|
public function jetpack_getOptions( $args ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid |
| 5643 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::jetpack_getOptions' ); |
| 5644 |
|
|
| 5645 |
|
if ( ! $this->connection_manager ) { |
| 5646 |
|
$this->connection_manager = new Connection_Manager(); |
| 5647 |
|
} |
| 5648 |
|
|
| 5649 |
|
return $this->connection_manager->jetpack_getOptions( $args ); |
| 5650 |
|
} |
| 5651 |
|
|
| 5652 |
|
/** |
| 5653 |
|
* Adds Jetpack-specific options to the output of the XMLRPC options method. |
|
@@ 5661-5669 (lines=9) @@
|
| 5658 |
|
* @param array $options Standard Core options. |
| 5659 |
|
* @return array Amended options. |
| 5660 |
|
*/ |
| 5661 |
|
public function xmlrpc_options( $options ) { |
| 5662 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::xmlrpc_options' ); |
| 5663 |
|
|
| 5664 |
|
if ( ! $this->connection_manager ) { |
| 5665 |
|
$this->connection_manager = new Connection_Manager(); |
| 5666 |
|
} |
| 5667 |
|
|
| 5668 |
|
return $this->connection_manager->xmlrpc_options( $options ); |
| 5669 |
|
} |
| 5670 |
|
|
| 5671 |
|
/** |
| 5672 |
|
* State is passed via cookies from one request to the next, but never to subsequent requests. |
|
@@ 952-960 (lines=9) @@
|
| 949 |
|
* @deprecated since 7.7.0 |
| 950 |
|
* @see Automattic\Jetpack\Connection\Manager::initialize_rest_api_registration_connector() |
| 951 |
|
*/ |
| 952 |
|
public function initialize_rest_api_registration_connector() { |
| 953 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::initialize_rest_api_registration_connector' ); |
| 954 |
|
|
| 955 |
|
if ( ! $this->connection_manager ) { |
| 956 |
|
$this->connection_manager = new Connection_Manager(); |
| 957 |
|
} |
| 958 |
|
|
| 959 |
|
$this->connection_manager->initialize_rest_api_registration_connector(); |
| 960 |
|
} |
| 961 |
|
|
| 962 |
|
/** |
| 963 |
|
* This is ported over from the manage module, which has been deprecated and baked in here. |
|
@@ 1078-1086 (lines=9) @@
|
| 1075 |
|
* @param array $methods A list of registered WordPress XMLRPC methods. |
| 1076 |
|
* @return array Filtered $methods |
| 1077 |
|
*/ |
| 1078 |
|
public function remove_non_jetpack_xmlrpc_methods( $methods ) { |
| 1079 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::remove_non_jetpack_xmlrpc_methods' ); |
| 1080 |
|
|
| 1081 |
|
if ( ! $this->connection_manager ) { |
| 1082 |
|
$this->connection_manager = new Connection_Manager(); |
| 1083 |
|
} |
| 1084 |
|
|
| 1085 |
|
return $this->connection_manager->remove_non_jetpack_xmlrpc_methods( $methods ); |
| 1086 |
|
} |
| 1087 |
|
|
| 1088 |
|
/** |
| 1089 |
|
* Since a lot of hosts use a hammer approach to "protecting" WordPress sites, |
|
@@ 1098-1106 (lines=9) @@
|
| 1095 |
|
* @deprecated since 7.7.0 |
| 1096 |
|
* @see Automattic\Jetpack\Connection\Manager::alternate_xmlrpc() |
| 1097 |
|
*/ |
| 1098 |
|
public function alternate_xmlrpc() { |
| 1099 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::alternate_xmlrpc' ); |
| 1100 |
|
|
| 1101 |
|
if ( ! $this->connection_manager ) { |
| 1102 |
|
$this->connection_manager = new Connection_Manager(); |
| 1103 |
|
} |
| 1104 |
|
|
| 1105 |
|
$this->connection_manager->alternate_xmlrpc(); |
| 1106 |
|
} |
| 1107 |
|
|
| 1108 |
|
/** |
| 1109 |
|
* The callback for the JITM ajax requests. |
|
@@ 1176-1184 (lines=9) @@
|
| 1173 |
|
* @deprecated since 7.7.0 |
| 1174 |
|
* @see Automattic\Jetpack\Connection\Manager::require_jetpack_authentication() |
| 1175 |
|
*/ |
| 1176 |
|
public function require_jetpack_authentication() { |
| 1177 |
|
_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::require_jetpack_authentication' ); |
| 1178 |
|
|
| 1179 |
|
if ( ! $this->connection_manager ) { |
| 1180 |
|
$this->connection_manager = new Connection_Manager(); |
| 1181 |
|
} |
| 1182 |
|
|
| 1183 |
|
$this->connection_manager->require_jetpack_authentication(); |
| 1184 |
|
} |
| 1185 |
|
|
| 1186 |
|
/** |
| 1187 |
|
* Register assets for use in various modules and the Jetpack admin page. |