@@ -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' ) ) { |
@@ -1544,6 +1544,7 @@ discard block |
||
1544 | 1544 | * Determine whether the active plan supports a particular feature |
1545 | 1545 | * |
1546 | 1546 | * @deprecated 7.2.0 Use Jetpack_Plan::supports. |
1547 | + * @param string $feature |
|
1547 | 1548 | * @return bool True if plan supports feature, false if not. |
1548 | 1549 | */ |
1549 | 1550 | public static function active_plan_supports( $feature ) { |
@@ -2128,6 +2129,7 @@ discard block |
||
2128 | 2129 | * @param int $user_id |
2129 | 2130 | * @param string $token |
2130 | 2131 | * return bool |
2132 | + * @param boolean $is_master_user |
|
2131 | 2133 | */ |
2132 | 2134 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2133 | 2135 | // not designed for concurrent updates |
@@ -2581,7 +2583,7 @@ discard block |
||
2581 | 2583 | * |
2582 | 2584 | * @param string $tag Tag as it appears in each module heading. |
2583 | 2585 | * |
2584 | - * @return mixed |
|
2586 | + * @return string |
|
2585 | 2587 | */ |
2586 | 2588 | public static function translate_module_tag( $tag ) { |
2587 | 2589 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2753,8 +2755,8 @@ discard block |
||
2753 | 2755 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2754 | 2756 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2755 | 2757 | * |
2756 | - * @param $string |
|
2757 | - * @return mixed |
|
2758 | + * @param string $string |
|
2759 | + * @return string|null |
|
2758 | 2760 | */ |
2759 | 2761 | public static function alias_directories( $string ) { |
2760 | 2762 | // ABSPATH has a trailing slash. |
@@ -2765,6 +2767,10 @@ discard block |
||
2765 | 2767 | return $string; |
2766 | 2768 | } |
2767 | 2769 | |
2770 | + /** |
|
2771 | + * @param boolean $redirect |
|
2772 | + * @param boolean $send_state_messages |
|
2773 | + */ |
|
2768 | 2774 | public static function activate_default_modules( |
2769 | 2775 | $min_version = false, |
2770 | 2776 | $max_version = false, |
@@ -3048,6 +3054,9 @@ discard block |
||
3048 | 3054 | return self::update_active_modules( $new ); |
3049 | 3055 | } |
3050 | 3056 | |
3057 | + /** |
|
3058 | + * @param string $module |
|
3059 | + */ |
|
3051 | 3060 | public static function enable_module_configurable( $module ) { |
3052 | 3061 | $module = self::get_module_slug( $module ); |
3053 | 3062 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3076,6 +3085,10 @@ discard block |
||
3076 | 3085 | } |
3077 | 3086 | |
3078 | 3087 | /* Installation */ |
3088 | + |
|
3089 | + /** |
|
3090 | + * @param string $message |
|
3091 | + */ |
|
3079 | 3092 | public static function bail_on_activation( $message, $deactivate = true ) { |
3080 | 3093 | ?> |
3081 | 3094 | <!doctype html> |
@@ -3841,7 +3854,7 @@ discard block |
||
3841 | 3854 | * Add help to the Jetpack page |
3842 | 3855 | * |
3843 | 3856 | * @since Jetpack (1.2.3) |
3844 | - * @return false if not the Jetpack page |
|
3857 | + * @return false|null if not the Jetpack page |
|
3845 | 3858 | */ |
3846 | 3859 | function admin_help() { |
3847 | 3860 | $current_screen = get_current_screen(); |
@@ -4638,6 +4651,9 @@ discard block |
||
4638 | 4651 | return $raw ? esc_url_raw( $url ) : esc_url( $url ); |
4639 | 4652 | } |
4640 | 4653 | |
4654 | + /** |
|
4655 | + * @return string |
|
4656 | + */ |
|
4641 | 4657 | public static function build_authorize_url( $redirect = false, $iframe = false ) { |
4642 | 4658 | if ( defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) && include_once JETPACK__GLOTPRESS_LOCALES_PATH ) { |
4643 | 4659 | $gp_locale = GP_Locales::by_field( 'wp_locale', get_locale() ); |
@@ -4760,6 +4776,9 @@ discard block |
||
4760 | 4776 | return $url; |
4761 | 4777 | } |
4762 | 4778 | |
4779 | + /** |
|
4780 | + * @return string |
|
4781 | + */ |
|
4763 | 4782 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
4764 | 4783 | $actionurl = str_replace( '&', '&', $actionurl ); |
4765 | 4784 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -5046,7 +5065,8 @@ discard block |
||
5046 | 5065 | * Note these tokens are unique per call, NOT static per site for connecting. |
5047 | 5066 | * |
5048 | 5067 | * @since 2.6 |
5049 | - * @return array |
|
5068 | + * @param string $action |
|
5069 | + * @return boolean |
|
5050 | 5070 | */ |
5051 | 5071 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
5052 | 5072 | if ( false === $user_id ) { |
@@ -5338,7 +5358,6 @@ discard block |
||
5338 | 5358 | /** |
5339 | 5359 | * Report authentication status to the WP REST API. |
5340 | 5360 | * |
5341 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5342 | 5361 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5343 | 5362 | */ |
5344 | 5363 | public function wp_rest_authentication_errors( $value ) { |
@@ -5440,6 +5459,7 @@ discard block |
||
5440 | 5459 | * @param string $key |
5441 | 5460 | * @param string $value |
5442 | 5461 | * @param bool $restate private |
5462 | + * @return string |
|
5443 | 5463 | */ |
5444 | 5464 | public static function state( $key = null, $value = null, $restate = false ) { |
5445 | 5465 | static $state = array(); |
@@ -5498,6 +5518,9 @@ discard block |
||
5498 | 5518 | self::state( null, null, true ); |
5499 | 5519 | } |
5500 | 5520 | |
5521 | + /** |
|
5522 | + * @param string $file |
|
5523 | + */ |
|
5501 | 5524 | public static function check_privacy( $file ) { |
5502 | 5525 | static $is_site_publicly_accessible = null; |
5503 | 5526 | |
@@ -5578,6 +5601,9 @@ discard block |
||
5578 | 5601 | } |
5579 | 5602 | } |
5580 | 5603 | |
5604 | + /** |
|
5605 | + * @param string $url |
|
5606 | + */ |
|
5581 | 5607 | public static function staticize_subdomain( $url ) { |
5582 | 5608 | |
5583 | 5609 | // Extract hostname from URL |
@@ -6147,9 +6173,7 @@ discard block |
||
6147 | 6173 | * |
6148 | 6174 | * Attached to `style_loader_src` filter. |
6149 | 6175 | * |
6150 | - * @param string $tag The tag that would link to the external asset. |
|
6151 | 6176 | * @param string $handle The registered handle of the script in question. |
6152 | - * @param string $href The url of the asset in question. |
|
6153 | 6177 | */ |
6154 | 6178 | public static function set_suffix_on_min( $src, $handle ) { |
6155 | 6179 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6340,8 +6364,8 @@ discard block |
||
6340 | 6364 | * - Absolute URLs `http://domain.com/feh.png` |
6341 | 6365 | * - Domain root relative URLs `/feh.png` |
6342 | 6366 | * |
6343 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6344 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6367 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6368 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6345 | 6369 | * |
6346 | 6370 | * @return mixed|string |
6347 | 6371 | */ |
@@ -6602,7 +6626,7 @@ discard block |
||
6602 | 6626 | /** |
6603 | 6627 | * Stores and prints out domains to prefetch for page speed optimization. |
6604 | 6628 | * |
6605 | - * @param mixed $new_urls |
|
6629 | + * @param string[] $new_urls |
|
6606 | 6630 | */ |
6607 | 6631 | public static function dns_prefetch( $new_urls = null ) { |
6608 | 6632 | static $prefetch_urls = array(); |
@@ -6659,7 +6683,6 @@ discard block |
||
6659 | 6683 | } |
6660 | 6684 | |
6661 | 6685 | /** |
6662 | - * @param mixed $result Value for the user's option |
|
6663 | 6686 | * @return mixed |
6664 | 6687 | */ |
6665 | 6688 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -298,7 +298,6 @@ |
||
298 | 298 | * Get the version number to use when loading the file. Allows us to bypass cache when developing. |
299 | 299 | * |
300 | 300 | * @since 6.0 |
301 | - * @param string $file Path of the file we are looking for. |
|
302 | 301 | * @return string $script_version Version number. |
303 | 302 | */ |
304 | 303 | public function has_vip_index() { |