@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | * This is ported over from the manage module, which has been deprecated and baked in here. |
796 | 796 | * |
797 | 797 | * @param $domains |
798 | - * @return array |
|
798 | + * @return string[] |
|
799 | 799 | */ |
800 | 800 | function allow_wpcom_domain( $domains ) { |
801 | 801 | if ( empty( $domains ) ) { |
@@ -1210,7 +1210,7 @@ discard block |
||
1210 | 1210 | /** |
1211 | 1211 | * Does the network allow admins to add new users. |
1212 | 1212 | * |
1213 | - * @return boolian |
|
1213 | + * @return boolean |
|
1214 | 1214 | */ |
1215 | 1215 | static function network_add_new_users( $option = null ) { |
1216 | 1216 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1320,7 +1320,7 @@ discard block |
||
1320 | 1320 | * |
1321 | 1321 | * @param bool $option |
1322 | 1322 | * |
1323 | - * @return boolean |
|
1323 | + * @return string |
|
1324 | 1324 | */ |
1325 | 1325 | public function is_main_network_option( $option ) { |
1326 | 1326 | // return '1' or '' |
@@ -1331,7 +1331,7 @@ discard block |
||
1331 | 1331 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1332 | 1332 | * |
1333 | 1333 | * @param string $option |
1334 | - * @return boolean |
|
1334 | + * @return string |
|
1335 | 1335 | */ |
1336 | 1336 | public function is_multisite( $option ) { |
1337 | 1337 | return (string) (bool) is_multisite(); |
@@ -1394,7 +1394,7 @@ discard block |
||
1394 | 1394 | /** |
1395 | 1395 | * Returns true if the site has file write access false otherwise. |
1396 | 1396 | * |
1397 | - * @return string ( '1' | '0' ) |
|
1397 | + * @return integer ( '1' | '0' ) |
|
1398 | 1398 | **/ |
1399 | 1399 | public static function file_system_write_access() { |
1400 | 1400 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2130,7 +2130,7 @@ discard block |
||
2130 | 2130 | * @param int $user_id The user id. |
2131 | 2131 | * @param string $token The user token. |
2132 | 2132 | * @param bool $is_master_user Whether the user is the master user. |
2133 | - * @return bool |
|
2133 | + * @return boolean|null |
|
2134 | 2134 | */ |
2135 | 2135 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2136 | 2136 | _deprecated_function( __METHOD__, 'jetpack-8.0', 'Automattic\\Jetpack\\Connection\\Utils::update_user_token' ); |
@@ -2573,7 +2573,7 @@ discard block |
||
2573 | 2573 | * |
2574 | 2574 | * @param string $tag Tag as it appears in each module heading. |
2575 | 2575 | * |
2576 | - * @return mixed |
|
2576 | + * @return string |
|
2577 | 2577 | */ |
2578 | 2578 | public static function translate_module_tag( $tag ) { |
2579 | 2579 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2745,8 +2745,8 @@ discard block |
||
2745 | 2745 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2746 | 2746 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2747 | 2747 | * |
2748 | - * @param $string |
|
2749 | - * @return mixed |
|
2748 | + * @param string $string |
|
2749 | + * @return string|null |
|
2750 | 2750 | */ |
2751 | 2751 | public static function alias_directories( $string ) { |
2752 | 2752 | // ABSPATH has a trailing slash. |
@@ -2757,6 +2757,10 @@ discard block |
||
2757 | 2757 | return $string; |
2758 | 2758 | } |
2759 | 2759 | |
2760 | + /** |
|
2761 | + * @param boolean $redirect |
|
2762 | + * @param boolean $send_state_messages |
|
2763 | + */ |
|
2760 | 2764 | public static function activate_default_modules( |
2761 | 2765 | $min_version = false, |
2762 | 2766 | $max_version = false, |
@@ -3040,6 +3044,9 @@ discard block |
||
3040 | 3044 | return self::update_active_modules( $new ); |
3041 | 3045 | } |
3042 | 3046 | |
3047 | + /** |
|
3048 | + * @param string $module |
|
3049 | + */ |
|
3043 | 3050 | public static function enable_module_configurable( $module ) { |
3044 | 3051 | $module = self::get_module_slug( $module ); |
3045 | 3052 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3068,6 +3075,10 @@ discard block |
||
3068 | 3075 | } |
3069 | 3076 | |
3070 | 3077 | /* Installation */ |
3078 | + |
|
3079 | + /** |
|
3080 | + * @param string $message |
|
3081 | + */ |
|
3071 | 3082 | public static function bail_on_activation( $message, $deactivate = true ) { |
3072 | 3083 | ?> |
3073 | 3084 | <!doctype html> |
@@ -3833,7 +3844,7 @@ discard block |
||
3833 | 3844 | * Add help to the Jetpack page |
3834 | 3845 | * |
3835 | 3846 | * @since Jetpack (1.2.3) |
3836 | - * @return false if not the Jetpack page |
|
3847 | + * @return false|null if not the Jetpack page |
|
3837 | 3848 | */ |
3838 | 3849 | function admin_help() { |
3839 | 3850 | $current_screen = get_current_screen(); |
@@ -4630,6 +4641,9 @@ discard block |
||
4630 | 4641 | return $raw ? esc_url_raw( $url ) : esc_url( $url ); |
4631 | 4642 | } |
4632 | 4643 | |
4644 | + /** |
|
4645 | + * @return string |
|
4646 | + */ |
|
4633 | 4647 | public static function build_authorize_url( $redirect = false, $iframe = false ) { |
4634 | 4648 | if ( defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) && include_once JETPACK__GLOTPRESS_LOCALES_PATH ) { |
4635 | 4649 | $gp_locale = GP_Locales::by_field( 'wp_locale', get_locale() ); |
@@ -4752,6 +4766,9 @@ discard block |
||
4752 | 4766 | return $url; |
4753 | 4767 | } |
4754 | 4768 | |
4769 | + /** |
|
4770 | + * @return string |
|
4771 | + */ |
|
4755 | 4772 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
4756 | 4773 | $actionurl = str_replace( '&', '&', $actionurl ); |
4757 | 4774 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -5041,7 +5058,7 @@ discard block |
||
5041 | 5058 | * @param String $action The action name. |
5042 | 5059 | * @param Integer $user_id The user identifier. |
5043 | 5060 | * @param Integer $exp Expiration time in seconds. |
5044 | - * @return array |
|
5061 | + * @return boolean |
|
5045 | 5062 | */ |
5046 | 5063 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
5047 | 5064 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5329,7 +5346,6 @@ discard block |
||
5329 | 5346 | /** |
5330 | 5347 | * Report authentication status to the WP REST API. |
5331 | 5348 | * |
5332 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5333 | 5349 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5334 | 5350 | */ |
5335 | 5351 | public function wp_rest_authentication_errors( $value ) { |
@@ -5431,6 +5447,7 @@ discard block |
||
5431 | 5447 | * @param string $key |
5432 | 5448 | * @param string $value |
5433 | 5449 | * @param bool $restate private |
5450 | + * @return string |
|
5434 | 5451 | */ |
5435 | 5452 | public static function state( $key = null, $value = null, $restate = false ) { |
5436 | 5453 | static $state = array(); |
@@ -5489,6 +5506,9 @@ discard block |
||
5489 | 5506 | self::state( null, null, true ); |
5490 | 5507 | } |
5491 | 5508 | |
5509 | + /** |
|
5510 | + * @param string $file |
|
5511 | + */ |
|
5492 | 5512 | public static function check_privacy( $file ) { |
5493 | 5513 | static $is_site_publicly_accessible = null; |
5494 | 5514 | |
@@ -5569,6 +5589,9 @@ discard block |
||
5569 | 5589 | } |
5570 | 5590 | } |
5571 | 5591 | |
5592 | + /** |
|
5593 | + * @param string $url |
|
5594 | + */ |
|
5572 | 5595 | public static function staticize_subdomain( $url ) { |
5573 | 5596 | |
5574 | 5597 | // Extract hostname from URL |
@@ -6138,9 +6161,7 @@ discard block |
||
6138 | 6161 | * |
6139 | 6162 | * Attached to `style_loader_src` filter. |
6140 | 6163 | * |
6141 | - * @param string $tag The tag that would link to the external asset. |
|
6142 | 6164 | * @param string $handle The registered handle of the script in question. |
6143 | - * @param string $href The url of the asset in question. |
|
6144 | 6165 | */ |
6145 | 6166 | public static function set_suffix_on_min( $src, $handle ) { |
6146 | 6167 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6331,8 +6352,8 @@ discard block |
||
6331 | 6352 | * - Absolute URLs `http://domain.com/feh.png` |
6332 | 6353 | * - Domain root relative URLs `/feh.png` |
6333 | 6354 | * |
6334 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6335 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6355 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6356 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6336 | 6357 | * |
6337 | 6358 | * @return mixed|string |
6338 | 6359 | */ |
@@ -6593,7 +6614,7 @@ discard block |
||
6593 | 6614 | /** |
6594 | 6615 | * Stores and prints out domains to prefetch for page speed optimization. |
6595 | 6616 | * |
6596 | - * @param mixed $new_urls |
|
6617 | + * @param string[] $new_urls |
|
6597 | 6618 | */ |
6598 | 6619 | public static function dns_prefetch( $new_urls = null ) { |
6599 | 6620 | static $prefetch_urls = array(); |
@@ -6650,7 +6671,6 @@ discard block |
||
6650 | 6671 | } |
6651 | 6672 | |
6652 | 6673 | /** |
6653 | - * @param mixed $result Value for the user's option |
|
6654 | 6674 | * @return mixed |
6655 | 6675 | */ |
6656 | 6676 | function get_user_option_meta_box_order_dashboard( $sorted ) { |