@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | * This is ported over from the manage module, which has been deprecated and baked in here. |
751 | 751 | * |
752 | 752 | * @param $domains |
753 | - * @return array |
|
753 | + * @return string[] |
|
754 | 754 | */ |
755 | 755 | function allow_wpcom_domain( $domains ) { |
756 | 756 | if ( empty( $domains ) ) { |
@@ -1208,7 +1208,7 @@ discard block |
||
1208 | 1208 | } |
1209 | 1209 | /** |
1210 | 1210 | * Does the network allow admins to add new users. |
1211 | - * @return boolian |
|
1211 | + * @return boolean |
|
1212 | 1212 | */ |
1213 | 1213 | static function network_add_new_users( $option = null ) { |
1214 | 1214 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1313,7 +1313,7 @@ discard block |
||
1313 | 1313 | * database which could be set to anything as opposed to what this function returns. |
1314 | 1314 | * @param bool $option |
1315 | 1315 | * |
1316 | - * @return boolean |
|
1316 | + * @return string |
|
1317 | 1317 | */ |
1318 | 1318 | public function is_main_network_option( $option ) { |
1319 | 1319 | // return '1' or '' |
@@ -1324,7 +1324,7 @@ discard block |
||
1324 | 1324 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1325 | 1325 | * |
1326 | 1326 | * @param string $option |
1327 | - * @return boolean |
|
1327 | + * @return string |
|
1328 | 1328 | */ |
1329 | 1329 | public function is_multisite( $option ) { |
1330 | 1330 | return (string) (bool) is_multisite(); |
@@ -1386,7 +1386,7 @@ discard block |
||
1386 | 1386 | |
1387 | 1387 | /** |
1388 | 1388 | * Returns true if the site has file write access false otherwise. |
1389 | - * @return string ( '1' | '0' ) |
|
1389 | + * @return integer ( '1' | '0' ) |
|
1390 | 1390 | **/ |
1391 | 1391 | public static function file_system_write_access() { |
1392 | 1392 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2121,6 +2121,7 @@ discard block |
||
2121 | 2121 | * @param int $user_id |
2122 | 2122 | * @param string $token |
2123 | 2123 | * return bool |
2124 | + * @param boolean $is_master_user |
|
2124 | 2125 | */ |
2125 | 2126 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2126 | 2127 | // not designed for concurrent updates |
@@ -2565,7 +2566,7 @@ discard block |
||
2565 | 2566 | * |
2566 | 2567 | * @param string $tag Tag as it appears in each module heading. |
2567 | 2568 | * |
2568 | - * @return mixed |
|
2569 | + * @return string |
|
2569 | 2570 | */ |
2570 | 2571 | public static function translate_module_tag( $tag ) { |
2571 | 2572 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2737,8 +2738,8 @@ discard block |
||
2737 | 2738 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2738 | 2739 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2739 | 2740 | * |
2740 | - * @param $string |
|
2741 | - * @return mixed |
|
2741 | + * @param string $string |
|
2742 | + * @return string|null |
|
2742 | 2743 | */ |
2743 | 2744 | public static function alias_directories( $string ) { |
2744 | 2745 | // ABSPATH has a trailing slash. |
@@ -2998,6 +2999,9 @@ discard block |
||
2998 | 2999 | return self::update_active_modules( $new ); |
2999 | 3000 | } |
3000 | 3001 | |
3002 | + /** |
|
3003 | + * @param string $module |
|
3004 | + */ |
|
3001 | 3005 | public static function enable_module_configurable( $module ) { |
3002 | 3006 | $module = Jetpack::get_module_slug( $module ); |
3003 | 3007 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3026,6 +3030,9 @@ discard block |
||
3026 | 3030 | } |
3027 | 3031 | |
3028 | 3032 | /* Installation */ |
3033 | + /** |
|
3034 | + * @param string $message |
|
3035 | + */ |
|
3029 | 3036 | public static function bail_on_activation( $message, $deactivate = true ) { |
3030 | 3037 | ?> |
3031 | 3038 | <!doctype html> |
@@ -3762,7 +3769,7 @@ discard block |
||
3762 | 3769 | * Add help to the Jetpack page |
3763 | 3770 | * |
3764 | 3771 | * @since Jetpack (1.2.3) |
3765 | - * @return false if not the Jetpack page |
|
3772 | + * @return false|null if not the Jetpack page |
|
3766 | 3773 | */ |
3767 | 3774 | function admin_help() { |
3768 | 3775 | $current_screen = get_current_screen(); |
@@ -4625,6 +4632,9 @@ discard block |
||
4625 | 4632 | return $url; |
4626 | 4633 | } |
4627 | 4634 | |
4635 | + /** |
|
4636 | + * @return string |
|
4637 | + */ |
|
4628 | 4638 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
4629 | 4639 | $actionurl = str_replace( '&', '&', $actionurl ); |
4630 | 4640 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -4928,6 +4938,7 @@ discard block |
||
4928 | 4938 | * Note these tokens are unique per call, NOT static per site for connecting. |
4929 | 4939 | * |
4930 | 4940 | * @since 2.6 |
4941 | + * @param string $action |
|
4931 | 4942 | * @return array |
4932 | 4943 | */ |
4933 | 4944 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
@@ -5217,7 +5228,6 @@ discard block |
||
5217 | 5228 | /** |
5218 | 5229 | * Report authentication status to the WP REST API. |
5219 | 5230 | * |
5220 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5221 | 5231 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5222 | 5232 | */ |
5223 | 5233 | public function wp_rest_authentication_errors( $value ) { |
@@ -5319,6 +5329,7 @@ discard block |
||
5319 | 5329 | * @param string $key |
5320 | 5330 | * @param string $value |
5321 | 5331 | * @param bool $restate private |
5332 | + * @return string |
|
5322 | 5333 | */ |
5323 | 5334 | public static function state( $key = null, $value = null, $restate = false ) { |
5324 | 5335 | static $state = array(); |
@@ -5375,6 +5386,9 @@ discard block |
||
5375 | 5386 | Jetpack::state( null, null, true ); |
5376 | 5387 | } |
5377 | 5388 | |
5389 | + /** |
|
5390 | + * @param string $file |
|
5391 | + */ |
|
5378 | 5392 | public static function check_privacy( $file ) { |
5379 | 5393 | static $is_site_publicly_accessible = null; |
5380 | 5394 | |
@@ -5457,6 +5471,9 @@ discard block |
||
5457 | 5471 | } |
5458 | 5472 | } |
5459 | 5473 | |
5474 | + /** |
|
5475 | + * @param string $url |
|
5476 | + */ |
|
5460 | 5477 | public static function staticize_subdomain( $url ) { |
5461 | 5478 | |
5462 | 5479 | // Extract hostname from URL |
@@ -5554,7 +5571,7 @@ discard block |
||
5554 | 5571 | * @see Automattic\Jetpack\Connection\Manager::allow_wpcom_public_api_domain() |
5555 | 5572 | * |
5556 | 5573 | * @param array $domains An array of allowed hosts. |
5557 | - * @return array Array of allowed hosts, with the WP.com API domain included. |
|
5574 | + * @return string[] Array of allowed hosts, with the WP.com API domain included. |
|
5558 | 5575 | */ |
5559 | 5576 | public function allow_wpcom_public_api_domain( $domains ) { |
5560 | 5577 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::allow_wpcom_public_api_domain' ); |
@@ -5584,7 +5601,7 @@ discard block |
||
5584 | 5601 | * @see Automattic\Jetpack\Connection\Manager::allow_wpcom_environments() |
5585 | 5602 | * |
5586 | 5603 | * @param array $domains An array of allowed hosts. |
5587 | - * @return array Array of allowed hosts, with the WP.com API domain included. |
|
5604 | + * @return string[] Array of allowed hosts, with the WP.com API domain included. |
|
5588 | 5605 | */ |
5589 | 5606 | public function allow_wpcom_environments( $domains ) { |
5590 | 5607 | _deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::allow_wpcom_environments' ); |
@@ -5952,9 +5969,7 @@ discard block |
||
5952 | 5969 | * |
5953 | 5970 | * Attached to `style_loader_src` filter. |
5954 | 5971 | * |
5955 | - * @param string $tag The tag that would link to the external asset. |
|
5956 | 5972 | * @param string $handle The registered handle of the script in question. |
5957 | - * @param string $href The url of the asset in question. |
|
5958 | 5973 | */ |
5959 | 5974 | public static function set_suffix_on_min( $src, $handle ) { |
5960 | 5975 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6141,8 +6156,8 @@ discard block |
||
6141 | 6156 | * - Absolute URLs `http://domain.com/feh.png` |
6142 | 6157 | * - Domain root relative URLs `/feh.png` |
6143 | 6158 | * |
6144 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6145 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6159 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6160 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6146 | 6161 | * |
6147 | 6162 | * @return mixed|string |
6148 | 6163 | */ |
@@ -6385,7 +6400,7 @@ discard block |
||
6385 | 6400 | /** |
6386 | 6401 | * Stores and prints out domains to prefetch for page speed optimization. |
6387 | 6402 | * |
6388 | - * @param mixed $new_urls |
|
6403 | + * @param string[] $new_urls |
|
6389 | 6404 | */ |
6390 | 6405 | public static function dns_prefetch( $new_urls = null ) { |
6391 | 6406 | static $prefetch_urls = array(); |
@@ -6441,7 +6456,6 @@ discard block |
||
6441 | 6456 | } |
6442 | 6457 | |
6443 | 6458 | /** |
6444 | - * @param mixed $result Value for the user's option |
|
6445 | 6459 | * @return mixed |
6446 | 6460 | */ |
6447 | 6461 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | /** |
291 | 291 | * Verifies the signature of the current request. |
292 | 292 | * |
293 | - * @return false|array |
|
293 | + * @return boolean |
|
294 | 294 | */ |
295 | 295 | public function verify_xml_rpc_signature() { |
296 | 296 | if ( is_null( $this->xmlrpc_verification ) ) { |
@@ -1409,7 +1409,7 @@ discard block |
||
1409 | 1409 | * |
1410 | 1410 | * @param int|false $user_id false: Return the Blog Token. int: Return that user's User Token. |
1411 | 1411 | * @param string|false $token_key If provided, check that the token matches the provided input. |
1412 | - * @param bool|true $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found. |
|
1412 | + * @param boolean $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found. |
|
1413 | 1413 | * |
1414 | 1414 | * @return object|false |
1415 | 1415 | */ |
@@ -1678,7 +1678,7 @@ discard block |
||
1678 | 1678 | * Add public-api.wordpress.com to the safe redirect whitelist - only added when someone allows API access. |
1679 | 1679 | * |
1680 | 1680 | * @param array $domains An array of allowed hosts. |
1681 | - * @return array Array of allowed hosts, with the WP.com API domain included. |
|
1681 | + * @return string[] Array of allowed hosts, with the WP.com API domain included. |
|
1682 | 1682 | */ |
1683 | 1683 | public function allow_wpcom_public_api_domain( $domains ) { |
1684 | 1684 | $domains[] = 'public-api.wordpress.com'; |
@@ -1699,7 +1699,7 @@ discard block |
||
1699 | 1699 | * Add all wordpress.com environments to the safe redirect whitelist. |
1700 | 1700 | * |
1701 | 1701 | * @param array $domains An array of allowed hosts. |
1702 | - * @return array Array of allowed hosts, with the WP.com API domain included. |
|
1702 | + * @return string[] Array of allowed hosts, with the WP.com API domain included. |
|
1703 | 1703 | */ |
1704 | 1704 | public function allow_wpcom_environments( $domains ) { |
1705 | 1705 | $domains[] = 'wordpress.com'; |