@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | * @todo Use $wpdb->prepare for the SQL query. |
| 202 | 202 | * |
| 203 | 203 | * @param array $config Full sync configuration for this sync module. |
| 204 | - * @return array Number of items yet to be enqueued. |
|
| 204 | + * @return integer Number of items yet to be enqueued. |
|
| 205 | 205 | */ |
| 206 | 206 | public function estimate_full_sync_actions( $config ) { |
| 207 | 207 | global $wpdb; |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | * |
| 238 | 238 | * @access public |
| 239 | 239 | * |
| 240 | - * @return array Full sync actions of this module. |
|
| 240 | + * @return string[] Full sync actions of this module. |
|
| 241 | 241 | */ |
| 242 | 242 | public function get_full_sync_actions() { |
| 243 | 243 | return array( 'jetpack_full_sync_posts' ); |
@@ -162,7 +162,7 @@ |
||
| 162 | 162 | * |
| 163 | 163 | * @access public |
| 164 | 164 | * |
| 165 | - * @return array Full sync actions of this module. |
|
| 165 | + * @return string[] Full sync actions of this module. |
|
| 166 | 166 | */ |
| 167 | 167 | public function get_full_sync_actions() { |
| 168 | 168 | return array( 'jetpack_full_sync_terms' ); |
@@ -502,7 +502,7 @@ discard block |
||
| 502 | 502 | * @access public |
| 503 | 503 | * |
| 504 | 504 | * @param array $config Full sync configuration for this sync module. |
| 505 | - * @return array Number of items yet to be enqueued. |
|
| 505 | + * @return integer Number of items yet to be enqueued. |
|
| 506 | 506 | */ |
| 507 | 507 | public function estimate_full_sync_actions( $config ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable |
| 508 | 508 | return 1; |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | * |
| 523 | 523 | * @access public |
| 524 | 524 | * |
| 525 | - * @return array Full sync actions of this module. |
|
| 525 | + * @return string[] Full sync actions of this module. |
|
| 526 | 526 | */ |
| 527 | 527 | public function get_full_sync_actions() { |
| 528 | 528 | return array( 'jetpack_full_sync_theme_data' ); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | * |
| 184 | 184 | * @access public |
| 185 | 185 | * |
| 186 | - * @param \WP_User $user User object. |
|
| 186 | + * @param \WP_User|null $user User object. |
|
| 187 | 187 | * @return \WP_User Expanded user object. |
| 188 | 188 | */ |
| 189 | 189 | public function expand_user( $user ) { |
@@ -614,7 +614,7 @@ discard block |
||
| 614 | 614 | * @todo Refactor to prepare the SQL query before executing it. |
| 615 | 615 | * |
| 616 | 616 | * @param array $config Full sync configuration for this sync module. |
| 617 | - * @return array Number of items yet to be enqueued. |
|
| 617 | + * @return integer Number of items yet to be enqueued. |
|
| 618 | 618 | */ |
| 619 | 619 | public function estimate_full_sync_actions( $config ) { |
| 620 | 620 | global $wpdb; |
@@ -658,7 +658,7 @@ discard block |
||
| 658 | 658 | * |
| 659 | 659 | * @access public |
| 660 | 660 | * |
| 661 | - * @return array Full sync actions of this module. |
|
| 661 | + * @return string[] Full sync actions of this module. |
|
| 662 | 662 | */ |
| 663 | 663 | public function get_full_sync_actions() { |
| 664 | 664 | return array( 'jetpack_full_sync_users' ); |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | * |
| 151 | 151 | * @access public |
| 152 | 152 | * |
| 153 | - * @return array Full sync actions of this module. |
|
| 153 | + * @return string[] Full sync actions of this module. |
|
| 154 | 154 | */ |
| 155 | 155 | public function get_full_sync_actions() { |
| 156 | 156 | return array( 'jetpack_full_sync_woocommerce_order_items' ); |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | * @todo Refactor the SQL query to use $wpdb->prepare(). |
| 247 | 247 | * |
| 248 | 248 | * @param array $config Full sync configuration for this sync module. |
| 249 | - * @return array Number of items yet to be enqueued. |
|
| 249 | + * @return integer Number of items yet to be enqueued. |
|
| 250 | 250 | */ |
| 251 | 251 | public function estimate_full_sync_actions( $config ) { |
| 252 | 252 | global $wpdb; |
@@ -734,6 +734,9 @@ |
||
| 734 | 734 | return floor( $max_exec_time / 3 ); |
| 735 | 735 | } |
| 736 | 736 | |
| 737 | + /** |
|
| 738 | + * @param string $setting |
|
| 739 | + */ |
|
| 737 | 740 | static function get_default_setting( $setting ) { |
| 738 | 741 | $default_name = "default_$setting"; // e.g. default_dequeue_max_bytes |
| 739 | 742 | return self::$$default_name; |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | * |
| 65 | 65 | * @access public |
| 66 | 66 | * |
| 67 | - * @param Automattic\Jetpack\Sync\Codec_Interface $codec Codec instance. |
|
| 67 | + * @param Codec_Interface $codec Codec instance. |
|
| 68 | 68 | */ |
| 69 | 69 | public function set_codec( Codec_Interface $codec ) { |
| 70 | 70 | $this->codec = $codec; |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | * @access public |
| 337 | 337 | * @static |
| 338 | 338 | * |
| 339 | - * @return bool|null False if sync is not allowed. |
|
| 339 | + * @return false|null False if sync is not allowed. |
|
| 340 | 340 | */ |
| 341 | 341 | public static function do_initial_sync() { |
| 342 | 342 | // Lets not sync if we are not suppose to. |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | * @static |
| 507 | 507 | * |
| 508 | 508 | * @param array $sync_modules The list of sync modules declared prior to this filter. |
| 509 | - * @return array A list of sync modules that now includes Woo's modules. |
|
| 509 | + * @return string[] A list of sync modules that now includes Woo's modules. |
|
| 510 | 510 | */ |
| 511 | 511 | public static function add_woocommerce_sync_module( $sync_modules ) { |
| 512 | 512 | $sync_modules[] = 'Automattic\\Jetpack\\Sync\\Modules\\WooCommerce'; |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | * @static |
| 534 | 534 | * |
| 535 | 535 | * @param array $sync_modules The list of sync modules declared prior to this filer. |
| 536 | - * @return array A list of sync modules that now includes WP Super Cache's modules. |
|
| 536 | + * @return string[] A list of sync modules that now includes WP Super Cache's modules. |
|
| 537 | 537 | */ |
| 538 | 538 | public static function add_wp_super_cache_sync_module( $sync_modules ) { |
| 539 | 539 | $sync_modules[] = 'Automattic\\Jetpack\\Sync\\Modules\\WP_Super_Cache'; |
@@ -700,7 +700,7 @@ discard block |
||
| 700 | 700 | * This is ported over from the manage module, which has been deprecated and baked in here. |
| 701 | 701 | * |
| 702 | 702 | * @param $domains |
| 703 | - * @return array |
|
| 703 | + * @return string[] |
|
| 704 | 704 | */ |
| 705 | 705 | function allow_wpcom_domain( $domains ) { |
| 706 | 706 | if ( empty( $domains ) ) { |
@@ -1116,7 +1116,7 @@ discard block |
||
| 1116 | 1116 | } |
| 1117 | 1117 | /** |
| 1118 | 1118 | * Does the network allow admins to add new users. |
| 1119 | - * @return boolian |
|
| 1119 | + * @return boolean |
|
| 1120 | 1120 | */ |
| 1121 | 1121 | static function network_add_new_users( $option = null ) { |
| 1122 | 1122 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1221,7 +1221,7 @@ discard block |
||
| 1221 | 1221 | * database which could be set to anything as opposed to what this function returns. |
| 1222 | 1222 | * @param bool $option |
| 1223 | 1223 | * |
| 1224 | - * @return boolean |
|
| 1224 | + * @return string |
|
| 1225 | 1225 | */ |
| 1226 | 1226 | public function is_main_network_option( $option ) { |
| 1227 | 1227 | // return '1' or '' |
@@ -1232,7 +1232,7 @@ discard block |
||
| 1232 | 1232 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1233 | 1233 | * |
| 1234 | 1234 | * @param string $option |
| 1235 | - * @return boolean |
|
| 1235 | + * @return string |
|
| 1236 | 1236 | */ |
| 1237 | 1237 | public function is_multisite( $option ) { |
| 1238 | 1238 | return (string) (bool) is_multisite(); |
@@ -1294,7 +1294,7 @@ discard block |
||
| 1294 | 1294 | |
| 1295 | 1295 | /** |
| 1296 | 1296 | * Returns true if the site has file write access false otherwise. |
| 1297 | - * @return string ( '1' | '0' ) |
|
| 1297 | + * @return integer ( '1' | '0' ) |
|
| 1298 | 1298 | **/ |
| 1299 | 1299 | public static function file_system_write_access() { |
| 1300 | 1300 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2021,6 +2021,7 @@ discard block |
||
| 2021 | 2021 | * @param int $user_id |
| 2022 | 2022 | * @param string $token |
| 2023 | 2023 | * return bool |
| 2024 | + * @param boolean $is_master_user |
|
| 2024 | 2025 | */ |
| 2025 | 2026 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
| 2026 | 2027 | // not designed for concurrent updates |
@@ -2465,7 +2466,7 @@ discard block |
||
| 2465 | 2466 | * |
| 2466 | 2467 | * @param string $tag Tag as it appears in each module heading. |
| 2467 | 2468 | * |
| 2468 | - * @return mixed |
|
| 2469 | + * @return string |
|
| 2469 | 2470 | */ |
| 2470 | 2471 | public static function translate_module_tag( $tag ) { |
| 2471 | 2472 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2637,8 +2638,8 @@ discard block |
||
| 2637 | 2638 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
| 2638 | 2639 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
| 2639 | 2640 | * |
| 2640 | - * @param $string |
|
| 2641 | - * @return mixed |
|
| 2641 | + * @param string $string |
|
| 2642 | + * @return string|null |
|
| 2642 | 2643 | */ |
| 2643 | 2644 | public static function alias_directories( $string ) { |
| 2644 | 2645 | // ABSPATH has a trailing slash. |
@@ -2898,6 +2899,9 @@ discard block |
||
| 2898 | 2899 | return self::update_active_modules( $new ); |
| 2899 | 2900 | } |
| 2900 | 2901 | |
| 2902 | + /** |
|
| 2903 | + * @param string $module |
|
| 2904 | + */ |
|
| 2901 | 2905 | public static function enable_module_configurable( $module ) { |
| 2902 | 2906 | $module = Jetpack::get_module_slug( $module ); |
| 2903 | 2907 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2926,6 +2930,9 @@ discard block |
||
| 2926 | 2930 | } |
| 2927 | 2931 | |
| 2928 | 2932 | /* Installation */ |
| 2933 | + /** |
|
| 2934 | + * @param string $message |
|
| 2935 | + */ |
|
| 2929 | 2936 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 2930 | 2937 | ?> |
| 2931 | 2938 | <!doctype html> |
@@ -3662,7 +3669,7 @@ discard block |
||
| 3662 | 3669 | * Add help to the Jetpack page |
| 3663 | 3670 | * |
| 3664 | 3671 | * @since Jetpack (1.2.3) |
| 3665 | - * @return false if not the Jetpack page |
|
| 3672 | + * @return false|null if not the Jetpack page |
|
| 3666 | 3673 | */ |
| 3667 | 3674 | function admin_help() { |
| 3668 | 3675 | $current_screen = get_current_screen(); |
@@ -4499,6 +4506,9 @@ discard block |
||
| 4499 | 4506 | return $url; |
| 4500 | 4507 | } |
| 4501 | 4508 | |
| 4509 | + /** |
|
| 4510 | + * @return string |
|
| 4511 | + */ |
|
| 4502 | 4512 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
| 4503 | 4513 | $actionurl = str_replace( '&', '&', $actionurl ); |
| 4504 | 4514 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -4559,6 +4569,7 @@ discard block |
||
| 4559 | 4569 | * Returns the requested Jetpack API URL |
| 4560 | 4570 | * |
| 4561 | 4571 | * @deprecated since 7.6 |
| 4572 | + * @param string $relative_url |
|
| 4562 | 4573 | * @return string |
| 4563 | 4574 | */ |
| 4564 | 4575 | public static function api_url( $relative_url ) { |
@@ -4802,6 +4813,7 @@ discard block |
||
| 4802 | 4813 | * Note these tokens are unique per call, NOT static per site for connecting. |
| 4803 | 4814 | * |
| 4804 | 4815 | * @since 2.6 |
| 4816 | + * @param string $action |
|
| 4805 | 4817 | * @return array |
| 4806 | 4818 | */ |
| 4807 | 4819 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
@@ -5035,7 +5047,6 @@ discard block |
||
| 5035 | 5047 | /** |
| 5036 | 5048 | * Report authentication status to the WP REST API. |
| 5037 | 5049 | * |
| 5038 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
| 5039 | 5050 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
| 5040 | 5051 | */ |
| 5041 | 5052 | public function wp_rest_authentication_errors( $value ) { |
@@ -5053,6 +5064,7 @@ discard block |
||
| 5053 | 5064 | * @param string $key |
| 5054 | 5065 | * @param string $value |
| 5055 | 5066 | * @param bool $restate private |
| 5067 | + * @return string |
|
| 5056 | 5068 | */ |
| 5057 | 5069 | public static function state( $key = null, $value = null, $restate = false ) { |
| 5058 | 5070 | static $state = array(); |
@@ -5109,6 +5121,9 @@ discard block |
||
| 5109 | 5121 | Jetpack::state( null, null, true ); |
| 5110 | 5122 | } |
| 5111 | 5123 | |
| 5124 | + /** |
|
| 5125 | + * @param string $file |
|
| 5126 | + */ |
|
| 5112 | 5127 | public static function check_privacy( $file ) { |
| 5113 | 5128 | static $is_site_publicly_accessible = null; |
| 5114 | 5129 | |
@@ -5191,6 +5206,9 @@ discard block |
||
| 5191 | 5206 | } |
| 5192 | 5207 | } |
| 5193 | 5208 | |
| 5209 | + /** |
|
| 5210 | + * @param string $url |
|
| 5211 | + */ |
|
| 5194 | 5212 | public static function staticize_subdomain( $url ) { |
| 5195 | 5213 | |
| 5196 | 5214 | // Extract hostname from URL |
@@ -5746,9 +5764,7 @@ discard block |
||
| 5746 | 5764 | * |
| 5747 | 5765 | * Attached to `style_loader_src` filter. |
| 5748 | 5766 | * |
| 5749 | - * @param string $tag The tag that would link to the external asset. |
|
| 5750 | 5767 | * @param string $handle The registered handle of the script in question. |
| 5751 | - * @param string $href The url of the asset in question. |
|
| 5752 | 5768 | */ |
| 5753 | 5769 | public static function set_suffix_on_min( $src, $handle ) { |
| 5754 | 5770 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -5935,8 +5951,8 @@ discard block |
||
| 5935 | 5951 | * - Absolute URLs `http://domain.com/feh.png` |
| 5936 | 5952 | * - Domain root relative URLs `/feh.png` |
| 5937 | 5953 | * |
| 5938 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 5939 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 5954 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 5955 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 5940 | 5956 | * |
| 5941 | 5957 | * @return mixed|string |
| 5942 | 5958 | */ |
@@ -6179,7 +6195,7 @@ discard block |
||
| 6179 | 6195 | /** |
| 6180 | 6196 | * Stores and prints out domains to prefetch for page speed optimization. |
| 6181 | 6197 | * |
| 6182 | - * @param mixed $new_urls |
|
| 6198 | + * @param string[] $new_urls |
|
| 6183 | 6199 | */ |
| 6184 | 6200 | public static function dns_prefetch( $new_urls = null ) { |
| 6185 | 6201 | static $prefetch_urls = array(); |
@@ -6235,7 +6251,6 @@ discard block |
||
| 6235 | 6251 | } |
| 6236 | 6252 | |
| 6237 | 6253 | /** |
| 6238 | - * @param mixed $result Value for the user's option |
|
| 6239 | 6254 | * @return mixed |
| 6240 | 6255 | */ |
| 6241 | 6256 | function get_user_option_meta_box_order_dashboard( $sorted ) { |