@@ 616-626 (lines=11) @@ | ||
613 | // Initialize remote file upload request handlers. |
|
614 | // phpcs:ignore WordPress.Security.NonceVerification.Recommended |
|
615 | $is_jetpack_xmlrpc_request = isset( $_GET['for'] ) && 'jetpack' === $_GET['for'] && Constants::get_constant( 'XMLRPC_REQUEST' ); |
|
616 | if ( |
|
617 | ! $is_jetpack_xmlrpc_request |
|
618 | && is_admin() |
|
619 | && isset( $_POST['action'] ) // phpcs:ignore WordPress.Security.NonceVerification |
|
620 | && ( |
|
621 | 'jetpack_upload_file' === $_POST['action'] // phpcs:ignore WordPress.Security.NonceVerification |
|
622 | || 'jetpack_update_file' === $_POST['action'] // phpcs:ignore WordPress.Security.NonceVerification |
|
623 | ) |
|
624 | ) { |
|
625 | $this->add_remote_request_handlers(); |
|
626 | } |
|
627 | ||
628 | if ( Jetpack::is_active() ) { |
|
629 | add_action( 'login_form_jetpack_json_api_authorization', array( $this, 'login_form_json_api_authorization' ) ); |
@@ 61-72 (lines=12) @@ | ||
58 | ); |
|
59 | ||
60 | // All the XMLRPC functionality has been moved into setup_xmlrpc_handlers. |
|
61 | if ( |
|
62 | ! $is_jetpack_xmlrpc_request |
|
63 | && is_admin() |
|
64 | && isset( $_POST['action'] ) // phpcs:ignore WordPress.Security.NonceVerification |
|
65 | && ( |
|
66 | 'jetpack_upload_file' === $_POST['action'] // phpcs:ignore WordPress.Security.NonceVerification |
|
67 | || 'jetpack_update_file' === $_POST['action'] // phpcs:ignore WordPress.Security.NonceVerification |
|
68 | ) |
|
69 | ) { |
|
70 | $this->require_jetpack_authentication(); |
|
71 | return; |
|
72 | } |
|
73 | ||
74 | if ( $this->is_active() ) { |
|
75 | add_filter( 'xmlrpc_methods', array( $this, 'public_xmlrpc_methods' ) ); |