Submit
Path:
~
/
home
/
getwphos
/
www
/
almajd14
/
wp-content
/
plugins
/
woocommerce
/
vendor
/
automattic
/
jetpack-connection
/
src
/
File Content:
class-xmlrpc-connector.php
<?php /** * Sets up the Connection XML-RPC methods. * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack\Connection; use IXR_Error; /** * Registers the XML-RPC methods for Connections. * * @phan-constructor-used-for-side-effects */ class XMLRPC_Connector { /** * The Connection Manager. * * @var Manager */ private $connection; /** * Constructor. * * @param Manager $connection The Connection Manager. */ public function __construct( Manager $connection ) { $this->connection = $connection; // Adding the filter late to avoid being overwritten by Jetpack's XMLRPC server. add_filter( 'xmlrpc_methods', array( $this, 'xmlrpc_methods' ), 20 ); } /** * Attached to the `xmlrpc_methods` filter. * * @param array $methods The already registered XML-RPC methods. * @return array */ public function xmlrpc_methods( $methods ) { return array_merge( $methods, array( 'jetpack.verifyRegistration' => array( $this, 'verify_registration' ), ) ); } /** * Handles verification that a site is registered. * * @param array $registration_data The data sent by the XML-RPC client: * [ $secret_1, $user_id ]. * * @return string|IXR_Error */ public function verify_registration( $registration_data ) { return $this->output( $this->connection->handle_registration( $registration_data ) ); } /** * Normalizes output for XML-RPC. * * @param mixed $data The data to output. */ private function output( $data ) { if ( is_wp_error( $data ) ) { $code = $data->get_error_data(); if ( ! $code ) { $code = -10520; } if ( ! class_exists( IXR_Error::class ) ) { require_once ABSPATH . WPINC . '/class-IXR.php'; } return new IXR_Error( $code, sprintf( 'Jetpack: [%s] %s', $data->get_error_code(), $data->get_error_message() ) ); } return $data; } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
identity-crisis
---
0755
sso
---
0755
traits
---
0755
webhooks
---
0755
class-authorize-json-api.php
8900 bytes
0644
class-client.php
16207 bytes
0644
class-connection-assets.php
900 bytes
0644
class-connection-notice.php
8089 bytes
0644
class-error-handler.php
33669 bytes
0644
class-external-storage.php
8256 bytes
0644
class-heartbeat.php
8006 bytes
0644
class-initial-state.php
1935 bytes
0644
class-manager.php
89192 bytes
0644
class-nonce-handler.php
5812 bytes
0644
class-package-version-tracker.php
5686 bytes
0644
class-package-version.php
648 bytes
0644
class-partner-coupon.php
11202 bytes
0644
class-partner.php
5072 bytes
0644
class-plugin-storage.php
7741 bytes
0644
class-plugin.php
2459 bytes
0644
class-rest-authentication.php
6302 bytes
0644
class-rest-connector.php
34784 bytes
0644
class-secrets.php
8608 bytes
0644
class-server-sandbox.php
7863 bytes
0644
class-terms-of-service.php
2798 bytes
0644
class-tokens-locks.php
1745 bytes
0644
class-tokens.php
21301 bytes
0644
class-tracking.php
10100 bytes
0644
class-urls.php
5091 bytes
0644
class-user-account-status.php
3632 bytes
0644
class-users-connection-admin.php
4549 bytes
0644
class-utils.php
3922 bytes
0644
class-webhooks.php
7066 bytes
0644
class-xmlrpc-async-call.php
2685 bytes
0644
class-xmlrpc-connector.php
1918 bytes
0644
interface-manager.php
298 bytes
0644
interface-storage-provider.php
2118 bytes
0644
N4ST4R_ID | Naxtarrr