@@ -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 ); |
@@ -5038,7 +5055,8 @@ discard block |
||
5038 | 5055 | * Note these tokens are unique per call, NOT static per site for connecting. |
5039 | 5056 | * |
5040 | 5057 | * @since 2.6 |
5041 | - * @return array |
|
5058 | + * @param string $action |
|
5059 | + * @return boolean |
|
5042 | 5060 | */ |
5043 | 5061 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
5044 | 5062 | if ( false === $user_id ) { |
@@ -5330,7 +5348,6 @@ discard block |
||
5330 | 5348 | /** |
5331 | 5349 | * Report authentication status to the WP REST API. |
5332 | 5350 | * |
5333 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5334 | 5351 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5335 | 5352 | */ |
5336 | 5353 | public function wp_rest_authentication_errors( $value ) { |
@@ -5432,6 +5449,7 @@ discard block |
||
5432 | 5449 | * @param string $key |
5433 | 5450 | * @param string $value |
5434 | 5451 | * @param bool $restate private |
5452 | + * @return string |
|
5435 | 5453 | */ |
5436 | 5454 | public static function state( $key = null, $value = null, $restate = false ) { |
5437 | 5455 | static $state = array(); |
@@ -5490,6 +5508,9 @@ discard block |
||
5490 | 5508 | self::state( null, null, true ); |
5491 | 5509 | } |
5492 | 5510 | |
5511 | + /** |
|
5512 | + * @param string $file |
|
5513 | + */ |
|
5493 | 5514 | public static function check_privacy( $file ) { |
5494 | 5515 | static $is_site_publicly_accessible = null; |
5495 | 5516 | |
@@ -5570,6 +5591,9 @@ discard block |
||
5570 | 5591 | } |
5571 | 5592 | } |
5572 | 5593 | |
5594 | + /** |
|
5595 | + * @param string $url |
|
5596 | + */ |
|
5573 | 5597 | public static function staticize_subdomain( $url ) { |
5574 | 5598 | |
5575 | 5599 | // Extract hostname from URL |
@@ -6139,9 +6163,7 @@ discard block |
||
6139 | 6163 | * |
6140 | 6164 | * Attached to `style_loader_src` filter. |
6141 | 6165 | * |
6142 | - * @param string $tag The tag that would link to the external asset. |
|
6143 | 6166 | * @param string $handle The registered handle of the script in question. |
6144 | - * @param string $href The url of the asset in question. |
|
6145 | 6167 | */ |
6146 | 6168 | public static function set_suffix_on_min( $src, $handle ) { |
6147 | 6169 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6332,8 +6354,8 @@ discard block |
||
6332 | 6354 | * - Absolute URLs `http://domain.com/feh.png` |
6333 | 6355 | * - Domain root relative URLs `/feh.png` |
6334 | 6356 | * |
6335 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6336 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6357 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6358 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6337 | 6359 | * |
6338 | 6360 | * @return mixed|string |
6339 | 6361 | */ |
@@ -6594,7 +6616,7 @@ discard block |
||
6594 | 6616 | /** |
6595 | 6617 | * Stores and prints out domains to prefetch for page speed optimization. |
6596 | 6618 | * |
6597 | - * @param mixed $new_urls |
|
6619 | + * @param string[] $new_urls |
|
6598 | 6620 | */ |
6599 | 6621 | public static function dns_prefetch( $new_urls = null ) { |
6600 | 6622 | static $prefetch_urls = array(); |
@@ -6651,7 +6673,6 @@ discard block |
||
6651 | 6673 | } |
6652 | 6674 | |
6653 | 6675 | /** |
6654 | - * @param mixed $result Value for the user's option |
|
6655 | 6676 | * @return mixed |
6656 | 6677 | */ |
6657 | 6678 | function get_user_option_meta_box_order_dashboard( $sorted ) { |