From 4ae507f6be6b83e7f96a5c7acb51c05b19609d79 Mon Sep 17 00:00:00 2001 From: leogermani Date: Sat, 21 Aug 2021 05:23:29 -0300 Subject: [PATCH] Update/connection annotations (#20766) * Change @since annotations * Update @deprecated annotations --- .../changelog/update-connection-annotations | 4 + .../legacy/class-jetpack-ixr-client.php | 5 +- .../class-jetpack-ixr-clientmulticall.php | 5 +- .../legacy/class-jetpack-signature.php | 4 +- .../legacy/class-jetpack-xmlrpc-server.php | 38 ++--- .../packages/connection/legacy/load-ixr.php | 3 +- .../packages/connection/src/class-client.php | 7 +- .../connection/src/class-error-handler.php | 56 +++---- .../packages/connection/src/class-manager.php | 139 ++++++++++-------- .../src/class-rest-authentication.php | 12 +- .../connection/src/class-rest-connector.php | 43 +++--- .../packages/connection/src/class-secrets.php | 9 +- .../packages/connection/src/class-tokens.php | 17 ++- .../packages/connection/src/class-urls.php | 6 +- .../packages/connection/src/class-utils.php | 8 +- .../connection/src/class-webhooks.php | 3 +- .../connection/src/interface-manager.php | 2 +- 17 files changed, 204 insertions(+), 157 deletions(-) create mode 100644 projects/packages/connection/changelog/update-connection-annotations diff --git a/projects/packages/connection/changelog/update-connection-annotations b/projects/packages/connection/changelog/update-connection-annotations new file mode 100644 index 0000000000000..07650aa0e8839 --- /dev/null +++ b/projects/packages/connection/changelog/update-connection-annotations @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +update annotations versions diff --git a/projects/packages/connection/legacy/class-jetpack-ixr-client.php b/projects/packages/connection/legacy/class-jetpack-ixr-client.php index e1c52b7a82f55..6c86d2957099f 100644 --- a/projects/packages/connection/legacy/class-jetpack-ixr-client.php +++ b/projects/packages/connection/legacy/class-jetpack-ixr-client.php @@ -4,8 +4,9 @@ * * @package automattic/jetpack-connection * - * @since 1.5 - * @since 7.7 Moved to the jetpack-connection package. + * @since 1.7.0 + * @since-jetpack 1.5 + * @since-jetpack 7.7 Moved to the jetpack-connection package. */ use Automattic\Jetpack\Connection\Client; diff --git a/projects/packages/connection/legacy/class-jetpack-ixr-clientmulticall.php b/projects/packages/connection/legacy/class-jetpack-ixr-clientmulticall.php index 31db1c7fc4035..3c52f05d4ceec 100644 --- a/projects/packages/connection/legacy/class-jetpack-ixr-clientmulticall.php +++ b/projects/packages/connection/legacy/class-jetpack-ixr-clientmulticall.php @@ -4,8 +4,9 @@ * * @package automattic/jetpack-connection * - * @since 1.5 - * @since 7.7 Moved to the jetpack-connection package. + * @since 1.7.0 + * @since-jetpack 1.5 + * @since-jetpack 7.7 Moved to the jetpack-connection package. */ /** diff --git a/projects/packages/connection/legacy/class-jetpack-signature.php b/projects/packages/connection/legacy/class-jetpack-signature.php index 74f113f23c9f6..125aa20a69d47 100644 --- a/projects/packages/connection/legacy/class-jetpack-signature.php +++ b/projects/packages/connection/legacy/class-jetpack-signature.php @@ -341,7 +341,7 @@ private function join_array_with_equal_sign( $name, $value ) { * It will analyze the current request, as well as some Jetpack constants, to return the string * to be concatenated in the URL representing the port of the current request. * - * @since 9.2.0 + * @since 1.8.4 * * @return string The port to be used in the signature */ @@ -382,7 +382,7 @@ public function get_current_request_port() { /** * Sanitizes a variable checking if it's a valid port number, which can be an integer or a numeric string * - * @since 9.2.0 + * @since 1.8.4 * * @param mixed $port_number Variable representing a port number. * @return string Always a string with a valid port number, or an empty string if input is invalid diff --git a/projects/packages/connection/legacy/class-jetpack-xmlrpc-server.php b/projects/packages/connection/legacy/class-jetpack-xmlrpc-server.php index 3d08844283f61..7a115dfbff643 100644 --- a/projects/packages/connection/legacy/class-jetpack-xmlrpc-server.php +++ b/projects/packages/connection/legacy/class-jetpack-xmlrpc-server.php @@ -80,7 +80,8 @@ public function xmlrpc_methods( $core_methods ) { /** * Filters the XML-RPC methods available to Jetpack for authenticated users. * - * @since 1.1.0 + * @since 1.7.0 + * @since-jetpack 1.1.0 * * @param array $jetpack_methods XML-RPC methods available to the Jetpack Server. * @param array $core_methods Available core XML-RPC methods. @@ -92,8 +93,9 @@ public function xmlrpc_methods( $core_methods ) { /** * Filters the XML-RPC methods available to Jetpack for requests signed both with a blog token or a user token. * - * @since 3.0.0 - * @since 9.6.0 Introduced the $user parameter. + * @since 1.7.0 + * @since 1.9.5 Introduced the $user parameter. + * @since-jetpack 3.0.0 * * @param array $jetpack_methods XML-RPC methods available to the Jetpack Server. * @param array $core_methods Available core XML-RPC methods. @@ -213,7 +215,8 @@ public function remote_authorize( $request ) { * - remote_provision * - get_user. * - * @since 8.0.0 + * @since 1.7.0 + * @since-jetpack 8.0.0 * * @param String $action the action name, i.e., 'remote_authorize'. * @param String $stage the execution stage, can be 'begin', 'success', 'error', etc. @@ -380,7 +383,7 @@ public function remote_provision( $request ) { * * @param string $redirect_uri The Redirect URI * - * @since 9.8.0 + * @since 1.9.7 */ $redirect_uri = apply_filters( 'jetpack_xmlrpc_remote_register_redirect_uri', admin_url() ); @@ -411,7 +414,7 @@ public function remote_provision( $request ) { * @param array $request An array containing at minimum a nonce key and a local_username key. * @param \WP_User $user The local authenticated user. * - * @since 9.8.0 + * @since 1.9.7 */ $response = apply_filters( 'jetpack_remote_xmlrpc_provision_response', $response, $request, $user ); @@ -492,7 +495,7 @@ public function remote_connect( $request, $ixr_client = false ) { /** * Hook fired at the end of the jetpack.remoteConnect XML-RPC callback * - * @since 9.8.0 + * @since 1.9.7 */ do_action( 'jetpack_remote_connect_end' ); @@ -727,7 +730,8 @@ public function unlink_user( $user_id = array() ) { /** * Fired when we want to log an event to the Jetpack event log. * - * @since 7.7.0 + * @since 1.7.0 + * @since-jetpack 7.7.0 * * @param string $code Unique name for the event. * @param string $data Optional data about the event. @@ -742,7 +746,7 @@ public function unlink_user( $user_id = array() ) { /** * Returns any object that is able to be synced. * - * @deprecated since 7.8.0 + * @deprecated since jetpack 7.8.0 * @see Automattic\Jetpack\Sync\Sender::sync_object() * * @param array $args the synchronized object parameters. @@ -789,13 +793,13 @@ public function update_attachment_parent( $args ) { * * Disconnect this blog from the connected wordpress.com account * - * @deprecated since 9.6.0 + * @deprecated since 1.25.0 * @see Jetpack_XMLRPC_Methods::disconnect_blog() in the Jetpack plugin * * @return boolean */ public function disconnect_blog() { - _deprecated_function( __METHOD__, 'jetpack-9.6', 'Jetpack_XMLRPC_Methods::disconnect_blog()' ); + _deprecated_function( __METHOD__, '1.25.0', 'Jetpack_XMLRPC_Methods::disconnect_blog()' ); if ( class_exists( 'Jetpack_XMLRPC_Methods' ) ) { return Jetpack_XMLRPC_Methods::disconnect_blog(); } @@ -807,13 +811,13 @@ public function disconnect_blog() { * * Returns what features are available. Uses the slug of the module files. * - * @deprecated since 9.6.0 + * @deprecated since 1.25.0 * @see Jetpack_XMLRPC_Methods::features_available() in the Jetpack plugin * * @return array */ public function features_available() { - _deprecated_function( __METHOD__, 'jetpack-9.6', 'Jetpack_XMLRPC_Methods::features_available()' ); + _deprecated_function( __METHOD__, '1.25.0', 'Jetpack_XMLRPC_Methods::features_available()' ); if ( class_exists( 'Jetpack_XMLRPC_Methods' ) ) { return Jetpack_XMLRPC_Methods::features_available(); } @@ -825,13 +829,13 @@ public function features_available() { * * Returns what features are enabled. Uses the slug of the modules files. * - * @deprecated since 9.6.0 + * @deprecated since 1.25.0 * @see Jetpack_XMLRPC_Methods::features_enabled() in the Jetpack plugin * * @return array */ public function features_enabled() { - _deprecated_function( __METHOD__, 'jetpack-9.6', 'Jetpack_XMLRPC_Methods::features_enabled()' ); + _deprecated_function( __METHOD__, '1.25.0', 'Jetpack_XMLRPC_Methods::features_enabled()' ); if ( class_exists( 'Jetpack_XMLRPC_Methods' ) ) { return Jetpack_XMLRPC_Methods::features_enabled(); } @@ -843,13 +847,13 @@ public function features_enabled() { * * Serve a JSON API request. * - * @deprecated since 9.6.0 + * @deprecated since 1.25.0 * @see Jetpack_XMLRPC_Methods::json_api() in the Jetpack plugin * * @param array $args request arguments. */ public function json_api( $args = array() ) { - _deprecated_function( __METHOD__, 'jetpack-9.6', 'Jetpack_XMLRPC_Methods::json_api()' ); + _deprecated_function( __METHOD__, '1.25.0', 'Jetpack_XMLRPC_Methods::json_api()' ); if ( class_exists( 'Jetpack_XMLRPC_Methods' ) ) { return Jetpack_XMLRPC_Methods::json_api( $args ); } diff --git a/projects/packages/connection/legacy/load-ixr.php b/projects/packages/connection/legacy/load-ixr.php index de77dfc4fe97b..5619398d1a08f 100644 --- a/projects/packages/connection/legacy/load-ixr.php +++ b/projects/packages/connection/legacy/load-ixr.php @@ -5,7 +5,8 @@ * Here we ensure that they are loaded before we declare our implementations. * * @package automattic/jetpack-connection - * @since 7.7 + * @since 1.7.0 + * @since-jetpack 7.7.0 */ if ( defined( 'ABSPATH' ) && defined( 'WPINC' ) ) { diff --git a/projects/packages/connection/src/class-client.php b/projects/packages/connection/src/class-client.php index bd28402497e86..a58ee5d354075 100644 --- a/projects/packages/connection/src/class-client.php +++ b/projects/packages/connection/src/class-client.php @@ -215,7 +215,8 @@ public static function _wp_remote_request( $url, $args, $set_fallback = false ) * Return `true` to ENABLE SSL verification, return `false` * to DISABLE SSL verification. * - * @since 3.6.0 + * @since 1.7.0 + * @since-jetpack 3.6.0 * * @param bool Whether to force `sslverify` or not. */ @@ -467,10 +468,10 @@ public static function _stringify_data( $data ) { // phpcs:ignore PSR2.Methods.M * * @return string Always 'https'. * - * @deprecated 9.1.0 WP.com API no longer supports requests using `http://`. + * @deprecated 1.19.2 WP.com API no longer supports requests using `http://`. */ public static function protocol() { - _deprecated_function( __METHOD__, 'jetpack-9.1.0' ); + _deprecated_function( __METHOD__, '1.19.2' ); return 'https'; } diff --git a/projects/packages/connection/src/class-error-handler.php b/projects/packages/connection/src/class-error-handler.php index 73051acfb1b6b..5a09d207c02b2 100644 --- a/projects/packages/connection/src/class-error-handler.php +++ b/projects/packages/connection/src/class-error-handler.php @@ -38,14 +38,14 @@ * * positive integer for user tokens * * 'invalid' for malformed tokens * - * @since 8.7.0 + * @since 1.14.2 */ class Error_Handler { /** * The name of the option that stores the errors * - * @since 8.7.0 + * @since 1.14.2 * * @var string */ @@ -54,7 +54,7 @@ class Error_Handler { /** * The name of the option that stores the errors * - * @since 8.7.0 + * @since 1.14.2 * * @var string */ @@ -63,7 +63,7 @@ class Error_Handler { /** * The prefix of the transient that controls the gate for each error code * - * @since 8.7.0 + * @since 1.14.2 * * @var string */ @@ -72,7 +72,7 @@ class Error_Handler { /** * Time in seconds a test should live in the database before being discarded * - * @since 8.7.0 + * @since 1.14.2 */ const ERROR_LIFE_TIME = DAY_IN_SECONDS; @@ -87,7 +87,7 @@ class Error_Handler { /** * List of known errors. Only error codes in this list will be handled * - * @since 8.7.0 + * @since 1.14.2 * * @var array */ @@ -119,7 +119,7 @@ class Error_Handler { /** * Holds the instance of this singleton class * - * @since 8.7.0 + * @since 1.14.2 * * @var Error_Handler $instance */ @@ -128,7 +128,7 @@ class Error_Handler { /** * Initialize instance, hookds and load verified errors handlers * - * @since 8.7.0 + * @since 1.14.2 */ private function __construct() { defined( 'JETPACK__ERRORS_PUBLIC_KEY' ) || define( 'JETPACK__ERRORS_PUBLIC_KEY', 'KdZY80axKX+nWzfrOcizf0jqiFHnrWCl9X8yuaClKgM=' ); @@ -149,7 +149,7 @@ private function __construct() { /** * Gets the list of verified errors and act upon them * - * @since 8.7.0 + * @since 1.14.2 * * @return void */ @@ -183,7 +183,7 @@ public function handle_verified_errors() { /** * Gets the instance of this singleton class * - * @since 8.7.0 + * @since 1.14.2 * * @return Error_Handler $instance */ @@ -197,7 +197,7 @@ public static function get_instance() { /** * Keep track of a connection error that was encountered * - * @since 8.7.0 + * @since 1.14.2 * * @param \WP_Error $error the error object. * @param boolean $force Force the report, even if should_report_error is false. @@ -217,7 +217,7 @@ public function report_error( \WP_Error $error, $force = false ) { * * This protects the site (and WPCOM) against over loads. * - * @since 8.7.0 + * @since 1.14.2 * * @param \WP_Error $error the error object. * @return boolean $should_report True if gate is open and the error should be reported. @@ -236,7 +236,7 @@ public function should_report_error( \WP_Error $error ) { * * This filter is useful for unit testing * - * @since 8.7.0 + * @since 1.14.2 * * @param boolean $bypass_gate whether to bypass the gate. Default is false, do not bypass. */ @@ -258,7 +258,7 @@ public function should_report_error( \WP_Error $error ) { /** * Stores the error in the database so we know there is an issue and can inform the user * - * @since 8.7.0 + * @since 1.14.2 * * @param \WP_Error $error the error object. * @return boolean|array False if stored errors were not updated and the error array if it was successfully stored. @@ -294,7 +294,7 @@ public function store_error( \WP_Error $error ) { /** * Converts a WP_Error object in the array representation we store in the database * - * @since 8.7.0 + * @since 1.14.2 * * @param \WP_Error $error the error object. * @return boolean|array False if error is invalid or the error array @@ -331,7 +331,7 @@ public function wp_error_to_array( \WP_Error $error ) { /** * Sends the error to WP.com to be verified * - * @since 8.7.0 + * @since 1.14.2 * * @param array $error_array The array representation of the error as it is stored in the database. * @return bool @@ -360,7 +360,7 @@ public function send_error_to_wpcom( $error_array ) { /** * Encrypt data to be sent over to WP.com * - * @since 8.7.0 + * @since 1.14.2 * * @param array|string $data the data to be encoded. * @return boolean|string The encoded string on success, false on failure @@ -385,7 +385,7 @@ public function encrypt_data_to_wpcom( $data ) { /** * Extracts the user ID from a token * - * @since 8.7.0 + * @since 1.14.2 * * @param string $token the token used to make the xml-rpc request. * @return string $the user id or `invalid` if user id not present. @@ -406,7 +406,7 @@ public function get_user_id_from_token( $token ) { /** * Gets the reported errors stored in the database * - * @since 8.7.0 + * @since 1.14.2 * * @return array $errors */ @@ -426,7 +426,7 @@ public function get_stored_errors() { /** * Gets the verified errors stored in the database * - * @since 8.7.0 + * @since 1.14.2 * * @return array $errors */ @@ -450,7 +450,7 @@ public function get_verified_errors() { * Whenever a new error is stored to the database or verified, this will be triggered and the * expired error will be permantently removed from the database * - * @since 8.7.0 + * @since 1.14.2 * * @param array $errors array of errors as stored in the database. * @return array @@ -476,7 +476,7 @@ function ( $user_errors ) { /** * Delete all stored and verified errors from the database * - * @since 8.7.0 + * @since 1.14.2 * * @return void */ @@ -503,7 +503,7 @@ public function delete_all_errors_and_return_unfiltered_value( $check ) { /** * Delete the reported errors stored in the database * - * @since 8.7.0 + * @since 1.14.2 * * @return boolean True, if option is successfully deleted. False on failure. */ @@ -514,7 +514,7 @@ public function delete_stored_errors() { /** * Delete the verified errors stored in the database * - * @since 8.7.0 + * @since 1.14.2 * * @return boolean True, if option is successfully deleted. False on failure. */ @@ -527,7 +527,7 @@ public function delete_verified_errors() { * * Receives a nonce and finds the related error. * - * @since 8.7.0 + * @since 1.14.2 * * @param string $nonce The nonce created for the error we want to get. * @return null|array Returns the error array representation or null if error not found. @@ -547,7 +547,7 @@ public function get_error_by_nonce( $nonce ) { /** * Adds an error to the verified error list * - * @since 8.7.0 + * @since 1.14.2 * * @param array $error The error array, as it was saved in the unverified errors list. * @return void @@ -571,7 +571,7 @@ public function verify_error( $error ) { /** * Register REST API end point for error hanlding. * - * @since 8.7.0 + * @since 1.14.2 * * @return void */ @@ -596,7 +596,7 @@ public function register_verify_error_endpoint() { /** * Handles verification that a xml rpc error is legit and came from WordPres.com * - * @since 8.7.0 + * @since 1.14.2 * * @param \WP_REST_Request $request The request sent to the WP REST API. * diff --git a/projects/packages/connection/src/class-manager.php b/projects/packages/connection/src/class-manager.php index 14c82376b37e7..ae7c4c53a64b7 100644 --- a/projects/packages/connection/src/class-manager.php +++ b/projects/packages/connection/src/class-manager.php @@ -49,7 +49,7 @@ class Manager { * * Use Manager::add_register_request_param to add values to this array. * - * @since 9.7.0 + * @since 1.26.0 * @var array */ private static $extra_register_params = array(); @@ -117,7 +117,7 @@ public static function configure() { /** * Sets up the XMLRPC request handlers. * - * @since 9.6.0 Deprecate $is_active param. + * @since 1.25.0 Deprecate $is_active param. * * @param array $request_params incoming request parameters. * @param bool $has_connected_owner Whether the site has a connected owner. @@ -222,7 +222,8 @@ public function alternate_xmlrpc() { /** * Filters the class used for handling XML-RPC requests. * - * @since 3.1.0 + * @since 1.7.0 + * @since-jetpack 3.1.0 * * @param string $class The name of the XML-RPC server class. */ @@ -317,7 +318,8 @@ public function verify_xml_rpc_signature() { /** * Action for logging XMLRPC signature verification errors. This data is sensitive. * - * @since 7.5.0 + * @since 1.7.0 + * @since-jetpack 7.5.0 * * @param WP_Error $signature_verification_error The verification error */ @@ -481,7 +483,8 @@ private function internal_verify_xml_rpc_signature() { /** * Action for additional token checking. * - * @since 7.7.0 + * @since 1.7.0 + * @since-jetpack 7.7.0 * * @param array $post_data request data. * @param array $token_data token data. @@ -501,11 +504,11 @@ private function internal_verify_xml_rpc_signature() { /** * Returns true if the current site is connected to WordPress.com and has the minimum requirements to enable Jetpack UI. * - * This method is deprecated since Jetpack 9.6.0. Please use has_connected_owner instead. + * This method is deprecated since version 1.25.0 of this package. Please use has_connected_owner instead. * * Since this method has a wide spread use, we decided not to throw any deprecation warnings for now. * - * @deprecated 9.6.0 + * @deprecated 1.25.0 * @see Manager::has_connected_owner * @return Boolean is the site connected? */ @@ -526,13 +529,13 @@ public function get_tokens() { * Returns true if the site has both a token and a blog id, which indicates a site has been registered. * * @access public - * @deprecated 9.2.0 Use is_connected instead + * @deprecated 1.12.1 Use is_connected instead * @see Manager::is_connected * * @return bool */ public function is_registered() { - _deprecated_function( __METHOD__, 'jetpack-9.2' ); + _deprecated_function( __METHOD__, '1.12.1' ); return $this->is_connected(); } @@ -540,7 +543,7 @@ public function is_registered() { * Returns true if the site has both a token and a blog id, which indicates a site has been connected. * * @access public - * @since 9.2.0 + * @since 1.21.1 * * @return bool */ @@ -554,7 +557,7 @@ public function is_connected() { * Returns true if the site has at least one connected administrator. * * @access public - * @since 9.2.0 + * @since 1.21.1 * * @return bool */ @@ -566,7 +569,7 @@ public function has_connected_admin() { * Returns true if the site has any connected user. * * @access public - * @since 9.2.0 + * @since 1.21.1 * * @return bool */ @@ -617,7 +620,7 @@ public function get_connected_users( $capability = 'any', $limit = null ) { * Returns true if the site has a connected Blog owner (master_user). * * @access public - * @since 9.2.0 + * @since 1.21.1 * * @return bool */ @@ -631,13 +634,13 @@ public function has_connected_owner() { * Note that we are explicitly checking for the existence of the master_user option in order to account for cases where we don't have any user tokens (user-level connection) but the master_user option is set, which could be the result of a problematic user connection. * * @access public - * @since 9.6.0 - * @deprecated 9.8.0 + * @since 1.25.0 + * @deprecated 1.27.0 * * @return bool */ public function is_userless() { - _deprecated_function( __METHOD__, 'jetpack-9.8.0', 'Automattic\\Jetpack\\Connection\\Manager::is_site_connection' ); + _deprecated_function( __METHOD__, '1.27.0', 'Automattic\\Jetpack\\Connection\\Manager::is_site_connection' ); return $this->is_site_connection(); } @@ -647,7 +650,7 @@ public function is_userless() { * Note that we are explicitly checking for the existence of the master_user option in order to account for cases where we don't have any user tokens (user-level connection) but the master_user option is set, which could be the result of a problematic user connection. * * @access public - * @since 9.8.0 + * @since 1.27.0 * * @return bool */ @@ -839,7 +842,8 @@ public function disconnect_user( $user_id = null, $can_overwrite_primary_user = /** * Fires after the current user has been unlinked from WordPress.com. * - * @since 4.1.0 + * @since 1.7.0 + * @since-jetpack 4.1.0 * * @param int $user_id The current user's ID. */ @@ -873,7 +877,7 @@ public function unlink_user_from_wpcom( $user_id ) { /** * Update the connection owner. * - * @since 9.9.0 + * @since 1.29.0 * * @param Integer $new_owner_id The ID of the user to become the connection owner. * @@ -929,7 +933,7 @@ public function update_connection_owner( $new_owner_id ) { /** * Request to WPCOM to update the connection owner. * - * @since 9.9.0 + * @since 1.29.0 * * @param Integer $new_owner_id The ID of the user to become the connection owner. * @@ -969,7 +973,7 @@ public function api_url( $relative_url ) { * Filters whether the connection manager should use the iframe authorization * flow instead of the regular redirect-based flow. * - * @since 8.3.0 + * @since 1.9.0 * * @param Boolean $is_iframe_flow_used should the iframe flow be used, defaults to false. */ @@ -983,7 +987,8 @@ public function api_url( $relative_url ) { /** * Filters the API URL that Jetpack uses for server communication. * - * @since 8.0.0 + * @since 1.7.0 + * @since-jetpack 8.0.0 * * @param String $url the generated URL. * @param String $relative_url the relative URL that was passed as an argument. @@ -1054,7 +1059,8 @@ public function register( $api_endpoint = 'register' ) { /** * Filters the request body for additional property addition. * - * @since 7.7.0 + * @since 1.7.0 + * @since-jetpack 7.7.0 * * @param array $post_data request data. * @param Array $token_data token data. @@ -1158,7 +1164,8 @@ function ( $response ) use ( $allow_inplace_authorization, $alternate_authorizat /** * Fires when a site is registered on WordPress.com. * - * @since 3.7.0 + * @since 1.7.0 + * @since-jetpack 3.7.0 * * @param int $json->jetpack_id Jetpack Blog ID. * @param string $json->jetpack_secret Jetpack Blog Token. @@ -1175,7 +1182,8 @@ function ( $response ) use ( $allow_inplace_authorization, $alternate_authorizat /** * Fires when a user token is sent along with the registration data. * - * @since 7.6.0 + * @since 1.7.0 + * @since-jetpack 7.6.0 * * @param object $token the administrator token for the newly registered site. */ @@ -1201,7 +1209,7 @@ public function try_registration( $tos_agree = true ) { /** * Action fired when the user attempts the registration. * - * @since 9.7.0 + * @since 1.26.0 */ $pre_register = apply_filters( 'jetpack_pre_register', null ); @@ -1235,7 +1243,7 @@ public function try_registration( $tos_agree = true ) { /** * Adds a parameter to the register request body * - * @since 9.7.0 + * @since 1.26.0 * * @param string $name The name of the parameter to be added. * @param string $value The value of the parameter to be added. @@ -1254,7 +1262,8 @@ public function add_register_request_param( $name, $value ) { * Takes the response from the Jetpack register new site endpoint and * verifies it worked properly. * - * @since 2.6 + * @since 1.7.0 + * @since-jetpack 2.6.0 * * @param Mixed $response the response object, or the error object. * @return string|WP_Error A JSON object on success or WP_Error on failures @@ -1336,11 +1345,11 @@ protected function validate_remote_register_response( $response ) { * @param string $nonce the nonce value. * @return bool whether the nonce is unique or not. * - * @deprecated since 9.5.0 + * @deprecated since 1.24.0 * @see Nonce_Handler::add() */ public function add_nonce( $timestamp, $nonce ) { - _deprecated_function( __METHOD__, 'jetpack-9.5.0', 'Automattic\\Jetpack\\Connection\\Nonce_Handler::add' ); + _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Nonce_Handler::add' ); return ( new Nonce_Handler() )->add( $timestamp, $nonce ); } @@ -1351,11 +1360,11 @@ public function add_nonce( $timestamp, $nonce ) { * * @param bool $all whether to clean even non-expired nonces. * - * @deprecated since 9.5.0 + * @deprecated since 1.24.0 * @see Nonce_Handler::clean_all() */ public function clean_nonces( $all = false ) { - _deprecated_function( __METHOD__, 'jetpack-9.5.0', 'Automattic\\Jetpack\\Connection\\Nonce_Handler::clean_all' ); + _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Nonce_Handler::clean_all' ); ( new Nonce_Handler() )->clean_all( $all ? PHP_INT_MAX : ( time() - Nonce_Handler::LIFETIME ) ); } @@ -1382,7 +1391,7 @@ public function jetpack_connection_custom_caps( $caps, $cap, $user_id, $args ) { /** * Filters the jetpack_disconnect capability. * - * @since 8.7.0 + * @since 1.14.2 * * @param array An array containing the capability name. */ @@ -1406,7 +1415,8 @@ public function jetpack_connection_custom_caps( $caps, $cap, $user_id, $args ) { * * Based on local php max_execution_time in php.ini * - * @since 5.4 + * @since 1.7.0 + * @since-jetpack 5.4.0 * @return int **/ public function get_max_execution_time() { @@ -1422,7 +1432,8 @@ public function get_max_execution_time() { /** * Sets a minimum request timeout, and returns the current timeout * - * @since 5.4 + * @since 1.7.0 + * @since-jetpack 5.4.0 * @param Integer $min_timeout the minimum timeout value. **/ public function set_min_time_limit( $min_timeout ) { @@ -1440,7 +1451,8 @@ public function set_min_time_limit( $min_timeout ) { * - Earliest admin user registration date. * - Earliest date of post of any post type. * - * @since 7.2.0 + * @since 1.7.0 + * @since-jetpack 7.2.0 * * @return string Assumed site creation date and time. */ @@ -1522,27 +1534,27 @@ public function generate_secrets( $action, $user_id = false, $exp = 600 ) { /** * Returns two secret tokens and the end of life timestamp for them. * - * @deprecated 9.5 Use Automattic\Jetpack\Connection\Secrets->get() instead. + * @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Secrets->get() instead. * * @param String $action The action name. * @param Integer $user_id The user identifier. * @return string|array an array of secrets or an error string. */ public function get_secrets( $action, $user_id ) { - _deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Secrets->get' ); + _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Secrets->get' ); return ( new Secrets() )->get( $action, $user_id ); } /** * Deletes secret tokens in case they, for example, have expired. * - * @deprecated 9.5 Use Automattic\Jetpack\Connection\Secrets->delete() instead. + * @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Secrets->delete() instead. * * @param String $action The action name. * @param Integer $user_id The user identifier. */ public function delete_secrets( $action, $user_id ) { - _deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Secrets->delete' ); + _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Secrets->delete' ); ( new Secrets() )->delete( $action, $user_id ); } @@ -1567,7 +1579,7 @@ public function delete_all_connection_tokens( $ignore_connected_plugins = false * Fires upon the disconnect attempt. * Return `false` to prevent the disconnect. * - * @since 8.7.0 + * @since 1.14.2 */ if ( ! apply_filters( 'jetpack_connection_delete_all_tokens', true ) ) { return false; @@ -1614,7 +1626,7 @@ public function disconnect_site_wpcom( $ignore_connected_plugins = false ) { * Fires upon the disconnect attempt. * Return `false` to prevent the disconnect. * - * @since 8.7.0 + * @since 1.14.2 */ if ( ! apply_filters( 'jetpack_connection_disconnect_site_wpcom', true, $this ) ) { return false; @@ -1719,21 +1731,21 @@ public function handle_registration( array $registration_data ) { /** * Perform the API request to validate the blog and user tokens. * - * @deprecated 9.5 Use Automattic\Jetpack\Connection\Tokens->validate_tokens() instead. + * @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Tokens->validate_tokens() instead. * * @param int|null $user_id ID of the user we need to validate token for. Current user's ID by default. * * @return array|false|WP_Error The API response: `array( 'blog_token_is_healthy' => true|false, 'user_token_is_healthy' => true|false )`. */ public function validate_tokens( $user_id = null ) { - _deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Tokens->validate' ); + _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Tokens->validate' ); return $this->get_tokens()->validate( $user_id ); } /** * Verify a Previously Generated Secret. * - * @deprecated 9.5 Use Automattic\Jetpack\Connection\Secrets->verify() instead. + * @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Secrets->verify() instead. * * @param string $action The type of secret to verify. * @param string $secret_1 The secret string to compare to what is stored. @@ -1741,7 +1753,7 @@ public function validate_tokens( $user_id = null ) { * @return \WP_Error|string WP_Error on failure, secret_2 on success. */ public function verify_secrets( $action, $secret_1, $user_id ) { - _deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Secrets->verify' ); + _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Secrets->verify' ); return ( new Secrets() )->verify( $action, $secret_1, $user_id ); } @@ -1784,7 +1796,8 @@ public function get_authorization_url( $user = null, $redirect = null ) { * Filter the URL of the first time the user gets redirected back to your site for connection * data processing. * - * @since 8.0.0 + * @since 1.7.0 + * @since-jetpack 8.0.0 * * @param string $redirect_url Defaults to the site admin URL. */ @@ -1794,7 +1807,8 @@ public function get_authorization_url( $user = null, $redirect = null ) { * Filter the URL to redirect the user back to when the authorization process * is complete. * - * @since 8.0.0 + * @since 1.7.0 + * @since-jetpack 8.0.0 * * @param string $redirect_url Defaults to the site URL. */ @@ -1807,7 +1821,8 @@ public function get_authorization_url( $user = null, $redirect = null ) { * 'calypso' completes authorization on wordpress.com/jetpack/connect * while 'jetpack' ( or any other value ) completes the authorization at jetpack.wordpress.com. * - * @since 4.3.3 + * @since 1.7.0 + * @since-jetpack 4.3.3 * * @param string $auth_type Defaults to 'calypso', can also be 'jetpack'. */ @@ -1816,7 +1831,8 @@ public function get_authorization_url( $user = null, $redirect = null ) { /** * Filters the user connection request data for additional property addition. * - * @since 8.0.0 + * @since 1.7.0 + * @since-jetpack 8.0.0 * * @param array $request_data request data. */ @@ -1870,7 +1886,8 @@ public function authorize( $data = array() ) { /** * Action fired when user authorization starts. * - * @since 8.0.0 + * @since 1.7.0 + * @since-jetpack 8.0.0 */ do_action( 'jetpack_authorize_starting' ); @@ -1928,7 +1945,8 @@ public function authorize( $data = array() ) { /** * Fires after user has successfully received an auth token. * - * @since 3.9.0 + * @since 1.7.0 + * @since-jetpack 3.9.0 */ do_action( 'jetpack_user_authorized' ); @@ -1936,7 +1954,8 @@ public function authorize( $data = array() ) { /** * Action fired when a secondary user has been authorized. * - * @since 8.0.0 + * @since 1.7.0 + * @since-jetpack 8.0.0 */ do_action( 'jetpack_authorize_ending_linked' ); return 'linked'; @@ -1945,7 +1964,8 @@ public function authorize( $data = array() ) { /** * Action fired when the master user has been authorized. * - * @since 8.0.0 + * @since 1.7.0 + * @since-jetpack 8.0.0 * * @param array $data The request data. */ @@ -2042,7 +2062,8 @@ public function is_usable_domain( $domain ) { * * Allows site administrators with domains that fail gethostname-based checks to pass the request to WP.com * - * @since 4.1.0 + * @since 1.7.0 + * @since-jetpack 4.1.0 * * @param bool If the check should be skipped. Default false. */ @@ -2117,7 +2138,7 @@ public function is_usable_domain( $domain ) { /** * Gets the requested token. * - * @deprecated 9.5 Use Automattic\Jetpack\Connection\Tokens->get_access_token() instead. + * @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Tokens->get_access_token() instead. * * @param int|false $user_id false: Return the Blog Token. int: Return that user's User Token. * @param string|false $token_key If provided, check that the token matches the provided input. @@ -2128,7 +2149,7 @@ public function is_usable_domain( $domain ) { * @see $this->get_tokens()->get_access_token() */ public function get_access_token( $user_id = false, $token_key = false, $suppress_errors = true ) { - _deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Tokens->get_access_token' ); + _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Tokens->get_access_token' ); return $this->get_tokens()->get_access_token( $user_id, $token_key, $suppress_errors ); } @@ -2414,13 +2435,13 @@ public function refresh_user_token() { /** * Fetches a signed token. * - * @deprecated 9.5 Use Automattic\Jetpack\Connection\Tokens->get_signed_token() instead. + * @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Tokens->get_signed_token() instead. * * @param object $token the token. * @return WP_Error|string a signed token */ public function get_signed_token( $token ) { - _deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Tokens->get_signed_token' ); + _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Tokens->get_signed_token' ); return $this->get_tokens()->get_signed_token( $token ); } diff --git a/projects/packages/connection/src/class-rest-authentication.php b/projects/packages/connection/src/class-rest-authentication.php index 675fd640ecbfb..c833be5a3c393 100644 --- a/projects/packages/connection/src/class-rest-authentication.php +++ b/projects/packages/connection/src/class-rest-authentication.php @@ -15,7 +15,7 @@ class Rest_Authentication { /** * The rest authentication status. * - * @since 8.9.0 + * @since 1.17.0 * @var boolean */ private $rest_authentication_status = null; @@ -25,7 +25,7 @@ class Rest_Authentication { * Can be either 'user' or 'blog' depending on whether the request * is signed with a user or a blog token. * - * @since 9.9.0 + * @since 1.29.0 * @var string */ private $rest_authentication_type = null; @@ -33,7 +33,7 @@ class Rest_Authentication { /** * The Manager object. * - * @since 8.9.0 + * @since 1.17.0 * @var Object */ private $connection_manager = null; @@ -41,7 +41,7 @@ class Rest_Authentication { /** * Holds the singleton instance of this class * - * @since 8.9.0 + * @since 1.17.0 * @var Object */ private static $instance = false; @@ -49,7 +49,7 @@ class Rest_Authentication { /** * Flag used to avoid determine_current_user filter to enter an infinite loop * - * @since 9.7.0 + * @since 1.26.0 * @var boolean */ private $doing_determine_current_user_filter = false; @@ -208,7 +208,7 @@ public function reset_saved_auth_state() { /** * Whether the request was signed with a blog token. * - * @since 9.9.0 + * @since 1.29.0 * * @return bool True if the request was signed with a valid blog token, false otherwise. */ diff --git a/projects/packages/connection/src/class-rest-connector.php b/projects/packages/connection/src/class-rest-connector.php index 21e6f8aee29cb..fd7335f1a80f0 100644 --- a/projects/packages/connection/src/class-rest-connector.php +++ b/projects/packages/connection/src/class-rest-connector.php @@ -257,7 +257,8 @@ public function __construct( Manager $connection ) { /** * Handles verification that a site is registered. * - * @since 5.4.0 + * @since 1.7.0 + * @since-jetpack 5.4.0 * * @param WP_REST_Request $request The request sent to the WP REST API. * @@ -272,7 +273,8 @@ public function verify_registration( WP_REST_Request $request ) { /** * Handles verification that a site is registered * - * @since 5.4.0 + * @since 1.7.0 + * @since-jetpack 5.4.0 * * @param WP_REST_Request $request The request sent to the WP REST API. * @@ -292,7 +294,8 @@ public static function remote_authorize( $request ) { /** * Get connection status for this Jetpack site. * - * @since 4.3.0 + * @since 1.7.0 + * @since-jetpack 4.3.0 * * @param bool $rest_response Should we return a rest response or a simple array. Default to rest response. * @@ -322,7 +325,7 @@ public static function connection_status( $rest_response = true ) { /** * Filters the connection status data. * - * @since 9.6.0 + * @since 1.25.0 * * @param array An array containing the connection status data. */ @@ -340,7 +343,7 @@ public static function connection_status( $rest_response = true ) { /** * Get plugins connected to the Jetpack. * - * @since 8.6.0 + * @since 1.13.1 * * @return WP_REST_Response|WP_Error Response or error object, depending on the request result. */ @@ -364,7 +367,7 @@ function ( &$data, $slug ) { /** * Verify that user can view Jetpack admin page and can activate plugins. * - * @since 8.8.0 + * @since 1.15.0 * * @return bool|WP_Error Whether user has the capability 'activate_plugins'. */ @@ -540,7 +543,7 @@ public static function is_request_signed_by_jetpack_debugger( $pub_key = null ) /** * Verify that user is allowed to disconnect Jetpack. * - * @since 8.8.0 + * @since 1.15.0 * * @return bool|WP_Error Whether user has the capability 'jetpack_disconnect'. */ @@ -564,7 +567,7 @@ public static function get_user_permissions_error_msg() { /** * The endpoint tried to partially or fully reconnect the website to WP.com. * - * @since 8.8.0 + * @since 1.15.0 * * @return \WP_REST_Response|WP_Error */ @@ -593,7 +596,7 @@ public function connection_reconnect() { /** * Action fired when reconnection has completed successfully. * - * @since 9.0.0 + * @since 1.18.1 */ do_action( 'jetpack_reconnection_completed' ); break; @@ -608,7 +611,7 @@ public function connection_reconnect() { /** * Verify that user is allowed to connect Jetpack. * - * @since 9.7.0 + * @since 1.26.0 * * @return bool|WP_Error Whether user has the capability 'jetpack_connect'. */ @@ -623,7 +626,8 @@ public static function jetpack_register_permission_check() { /** * The endpoint tried to partially or fully reconnect the website to WP.com. * - * @since 7.7.0 + * @since 1.7.0 + * @since-jetpack 7.7.0 * * @param \WP_REST_Request $request The request sent to the WP REST API. * @@ -663,7 +667,7 @@ public function connection_register( $request ) { * Filters the response of jetpack/v4/connection/register endpoint * * @param array $response Array response - * @since 9.8.0 + * @since 1.27.0 */ $response_body = apply_filters( 'jetpack_register_site_rest_response', @@ -682,7 +686,7 @@ public function connection_register( $request ) { /** * Get the authorization URL. * - * @since 9.8.0 + * @since 1.27.0 * * @param \WP_REST_Request $request The request sent to the WP REST API. * @@ -711,7 +715,7 @@ public function connection_authorize_url( $request ) { /** * The endpoint tried to partially or fully reconnect the website to WP.com. * - * @since 9.9.0 + * @since 1.29.0 * * @param \WP_REST_Request $request The request sent to the WP REST API. * @@ -745,7 +749,7 @@ public static function update_user_token( $request ) { /** * Fires when the user token gets successfully replaced. * - * @since 9.9.0 + * @since 1.29.0 * * @param int $user_id User ID. * @param string $token New user token. @@ -784,7 +788,7 @@ public static function disconnect_site() { /** * Verify that the API client is allowed to replace user token. * - * @since 9.9.0 + * @since 1.29.0 * * @return bool|WP_Error. */ @@ -797,7 +801,7 @@ public static function update_user_token_permission_check() { /** * Change the connection owner. * - * @since 9.9.0 + * @since 1.29.0 * * @param WP_REST_Request $request The request sent to the WP REST API. * @@ -822,8 +826,9 @@ public static function set_connection_owner( $request ) { /** * Check that user has permission to change the master user. * - * @since 6.2.0 - * @since 7.7.0 Update so that any user with jetpack_disconnect privs can set owner. + * @since 1.7.0 + * @since-jetpack 6.2.0 + * @since-jetpack 7.7.0 Update so that any user with jetpack_disconnect privs can set owner. * * @return bool|WP_Error True if user is able to change master user. */ diff --git a/projects/packages/connection/src/class-secrets.php b/projects/packages/connection/src/class-secrets.php index 6a9294d40317b..aec3ae155e975 100644 --- a/projects/packages/connection/src/class-secrets.php +++ b/projects/packages/connection/src/class-secrets.php @@ -150,7 +150,8 @@ public function verify( $action, $secret_1, $user_id ) { /** * We've begun verifying the previously generated secret. * - * @since 7.5.0 + * @since 1.7.0 + * @since-jetpack 7.5.0 * * @param string $action The type of secret to verify. * @param \WP_User $user The user object. @@ -161,7 +162,8 @@ public function verify( $action, $secret_1, $user_id ) { /** * Verifying of the previously generated secret has failed. * - * @since 7.5.0 + * @since 1.7.0 + * @since-jetpack 7.5.0 * * @param string $action The type of secret to verify. * @param \WP_User $user The user object. @@ -266,7 +268,8 @@ public function verify( $action, $secret_1, $user_id ) { /** * We've succeeded at verifying the previously generated secret. * - * @since 7.5.0 + * @since 1.7.0 + * @since-jetpack 7.5.0 * * @param string $action The type of secret to verify. * @param \WP_User $user The user object. diff --git a/projects/packages/connection/src/class-tokens.php b/projects/packages/connection/src/class-tokens.php index c20f3c21755e2..0b60b597ff3cd 100644 --- a/projects/packages/connection/src/class-tokens.php +++ b/projects/packages/connection/src/class-tokens.php @@ -131,7 +131,8 @@ public function get( $data, $token_api_url ) { * Filter the URL of the first time the user gets redirected back to your site for connection * data processing. * - * @since 8.0.0 + * @since 1.7.0 + * @since-jetpack 8.0.0 * * @param string $redirect_url Defaults to the site admin URL. */ @@ -143,7 +144,8 @@ public function get( $data, $token_api_url ) { * Filter the URL to redirect the user back to when the authentication process * is complete. * - * @since 8.0.0 + * @since 1.7.0 + * @since-jetpack 8.0.0 * * @param string $redirect_url Defaults to the site URL. */ @@ -164,7 +166,8 @@ public function get( $data, $token_api_url ) { /** * Filters the token request data. * - * @since 8.0.0 + * @since 1.7.0 + * @since-jetpack 8.0.0 * * @param array $request_data request data. */ @@ -498,7 +501,7 @@ public function disconnect_user( $user_id, $can_overwrite_primary_user = false ) * Returns an array of user_id's that have user tokens for communicating with wpcom. * Able to select by specific capability. * - * @deprecated 9.9.1 + * @deprecated 1.30.0 * @see Manager::get_connected_users * * @param string $capability The capability of the user. @@ -506,7 +509,7 @@ public function disconnect_user( $user_id, $can_overwrite_primary_user = false ) * @return array Array of WP_User objects if found. */ public function get_connected_users( $capability = 'any', $limit = null ) { - _deprecated_function( __METHOD__, 'jetpack-9.9.1' ); + _deprecated_function( __METHOD__, '1.30.0' ); return ( new Manager( 'jetpack' ) )->get_connected_users( $capability, $limit ); } @@ -568,7 +571,7 @@ public function get_signed_token( $token ) { /** * Gets the list of user tokens * - * @since 9.9.1 + * @since 1.30.0 * * @return bool|array An array of user tokens where keys are user IDs and values are the tokens. False if no user token is found. */ @@ -579,7 +582,7 @@ public function get_user_tokens() { /** * Updates the option that stores the user tokens * - * @since 9.9.1 + * @since 1.30.0 * * @param array $tokens An array of user tokens where keys are user IDs and values are the tokens. * @return bool Was the option successfully updated? diff --git a/projects/packages/connection/src/class-urls.php b/projects/packages/connection/src/class-urls.php index dd9ea3ecb640d..f9a291760f0d7 100644 --- a/projects/packages/connection/src/class-urls.php +++ b/projects/packages/connection/src/class-urls.php @@ -148,7 +148,8 @@ public static function home_url() { /** * Allows overriding of the home_url value that is synced back to WordPress.com. * - * @since 5.2.0 + * @since 1.7.0 + * @since-jetpack 5.2.0 * * @param string $home_url */ @@ -166,7 +167,8 @@ public static function site_url() { /** * Allows overriding of the site_url value that is synced back to WordPress.com. * - * @since 5.2.0 + * @since 1.7.0 + * @since-jetpack 5.2.0 * * @param string $site_url */ diff --git a/projects/packages/connection/src/class-utils.php b/projects/packages/connection/src/class-utils.php index 6e0ac23de3cf8..d5ca5adbfae3b 100644 --- a/projects/packages/connection/src/class-utils.php +++ b/projects/packages/connection/src/class-utils.php @@ -25,17 +25,17 @@ class Utils { * @param string $url The url. * @return string The exact same url. * - * @deprecated 9.1.0 Jetpack can't function properly on servers that don't support outbound HTTPS requests. + * @deprecated 1.19.2 Jetpack can't function properly on servers that don't support outbound HTTPS requests. */ public static function fix_url_for_bad_hosts( $url ) { - _deprecated_function( __METHOD__, 'jetpack-9.1.0' ); + _deprecated_function( __METHOD__, '1.19.2' ); return $url; } /** * Enters a user token into the user_tokens option * - * @deprecated 9.5 Use Automattic\Jetpack\Connection\Tokens->update_user_token() instead. + * @deprecated 1.24.0 Use Automattic\Jetpack\Connection\Tokens->update_user_token() instead. * * @param int $user_id The user id. * @param string $token The user token. @@ -43,7 +43,7 @@ public static function fix_url_for_bad_hosts( $url ) { * @return bool */ public static function update_user_token( $user_id, $token, $is_master_user ) { - _deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Tokens->update_user_token' ); + _deprecated_function( __METHOD__, '1.24.0', 'Automattic\\Jetpack\\Connection\\Tokens->update_user_token' ); return ( new Tokens() )->update_user_token( $user_id, $token, $is_master_user ); } diff --git a/projects/packages/connection/src/class-webhooks.php b/projects/packages/connection/src/class-webhooks.php index 1de5d97d39c50..72225d195fd16 100644 --- a/projects/packages/connection/src/class-webhooks.php +++ b/projects/packages/connection/src/class-webhooks.php @@ -104,7 +104,8 @@ public function handle_authorize() { * * @param int Jetpack Blog ID. * - * @since 4.2.0 + * @since 1.7.0 + * @since-jetpack 4.2.0 */ do_action( 'jetpack_client_authorized', Jetpack_Options::get_option( 'id' ) ); diff --git a/projects/packages/connection/src/interface-manager.php b/projects/packages/connection/src/interface-manager.php index 176c85239f6ab..804f38481cc9e 100644 --- a/projects/packages/connection/src/interface-manager.php +++ b/projects/packages/connection/src/interface-manager.php @@ -11,7 +11,7 @@ /** * This interface is no longer used and is now deprecated. * - * @deprecated since 7.8 + * @deprecated since jetpack 7.8 */ interface Manager_Interface { }