@@ -900,7 +900,7 @@ discard block |
||
900 | 900 | * This is ported over from the manage module, which has been deprecated and baked in here. |
901 | 901 | * |
902 | 902 | * @param $domains |
903 | - * @return array |
|
903 | + * @return string[] |
|
904 | 904 | */ |
905 | 905 | function allow_wpcom_domain( $domains ) { |
906 | 906 | if ( empty( $domains ) ) { |
@@ -1330,7 +1330,7 @@ discard block |
||
1330 | 1330 | /** |
1331 | 1331 | * Does the network allow admins to add new users. |
1332 | 1332 | * |
1333 | - * @return boolian |
|
1333 | + * @return boolean |
|
1334 | 1334 | */ |
1335 | 1335 | static function network_add_new_users( $option = null ) { |
1336 | 1336 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1440,7 +1440,7 @@ discard block |
||
1440 | 1440 | * |
1441 | 1441 | * @param bool $option |
1442 | 1442 | * |
1443 | - * @return boolean |
|
1443 | + * @return string |
|
1444 | 1444 | */ |
1445 | 1445 | public function is_main_network_option( $option ) { |
1446 | 1446 | // return '1' or '' |
@@ -1451,7 +1451,7 @@ discard block |
||
1451 | 1451 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1452 | 1452 | * |
1453 | 1453 | * @param string $option |
1454 | - * @return boolean |
|
1454 | + * @return string |
|
1455 | 1455 | */ |
1456 | 1456 | public function is_multisite( $option ) { |
1457 | 1457 | return (string) (bool) is_multisite(); |
@@ -1514,7 +1514,7 @@ discard block |
||
1514 | 1514 | /** |
1515 | 1515 | * Returns true if the site has file write access false otherwise. |
1516 | 1516 | * |
1517 | - * @return string ( '1' | '0' ) |
|
1517 | + * @return integer ( '1' | '0' ) |
|
1518 | 1518 | **/ |
1519 | 1519 | public static function file_system_write_access() { |
1520 | 1520 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2235,7 +2235,7 @@ discard block |
||
2235 | 2235 | * @param int $user_id The user id. |
2236 | 2236 | * @param string $token The user token. |
2237 | 2237 | * @param bool $is_master_user Whether the user is the master user. |
2238 | - * @return bool |
|
2238 | + * @return boolean|null |
|
2239 | 2239 | */ |
2240 | 2240 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2241 | 2241 | _deprecated_function( __METHOD__, 'jetpack-8.0', 'Automattic\\Jetpack\\Connection\\Utils::update_user_token' ); |
@@ -2680,7 +2680,7 @@ discard block |
||
2680 | 2680 | * |
2681 | 2681 | * @param string $tag Tag as it appears in each module heading. |
2682 | 2682 | * |
2683 | - * @return mixed |
|
2683 | + * @return string |
|
2684 | 2684 | */ |
2685 | 2685 | public static function translate_module_tag( $tag ) { |
2686 | 2686 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2852,8 +2852,8 @@ discard block |
||
2852 | 2852 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2853 | 2853 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2854 | 2854 | * |
2855 | - * @param $string |
|
2856 | - * @return mixed |
|
2855 | + * @param string $string |
|
2856 | + * @return string|null |
|
2857 | 2857 | */ |
2858 | 2858 | public static function alias_directories( $string ) { |
2859 | 2859 | // ABSPATH has a trailing slash. |
@@ -2864,6 +2864,10 @@ discard block |
||
2864 | 2864 | return $string; |
2865 | 2865 | } |
2866 | 2866 | |
2867 | + /** |
|
2868 | + * @param boolean $redirect |
|
2869 | + * @param boolean $send_state_messages |
|
2870 | + */ |
|
2867 | 2871 | public static function activate_default_modules( |
2868 | 2872 | $min_version = false, |
2869 | 2873 | $max_version = false, |
@@ -3147,6 +3151,9 @@ discard block |
||
3147 | 3151 | return self::update_active_modules( $new ); |
3148 | 3152 | } |
3149 | 3153 | |
3154 | + /** |
|
3155 | + * @param string $module |
|
3156 | + */ |
|
3150 | 3157 | public static function enable_module_configurable( $module ) { |
3151 | 3158 | $module = self::get_module_slug( $module ); |
3152 | 3159 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3175,6 +3182,10 @@ discard block |
||
3175 | 3182 | } |
3176 | 3183 | |
3177 | 3184 | /* Installation */ |
3185 | + |
|
3186 | + /** |
|
3187 | + * @param string $message |
|
3188 | + */ |
|
3178 | 3189 | public static function bail_on_activation( $message, $deactivate = true ) { |
3179 | 3190 | ?> |
3180 | 3191 | <!doctype html> |
@@ -3943,7 +3954,7 @@ discard block |
||
3943 | 3954 | * Add help to the Jetpack page |
3944 | 3955 | * |
3945 | 3956 | * @since Jetpack (1.2.3) |
3946 | - * @return false if not the Jetpack page |
|
3957 | + * @return false|null if not the Jetpack page |
|
3947 | 3958 | */ |
3948 | 3959 | function admin_help() { |
3949 | 3960 | $current_screen = get_current_screen(); |
@@ -4636,6 +4647,7 @@ discard block |
||
4636 | 4647 | |
4637 | 4648 | /** |
4638 | 4649 | * Record a stat for later output. This will only currently output in the admin_footer. |
4650 | + * @param string $group |
|
4639 | 4651 | */ |
4640 | 4652 | function stat( $group, $detail ) { |
4641 | 4653 | if ( ! isset( $this->stats[ $group ] ) ) { |
@@ -5055,6 +5067,9 @@ discard block |
||
5055 | 5067 | return $url; |
5056 | 5068 | } |
5057 | 5069 | |
5070 | + /** |
|
5071 | + * @param string $actionurl |
|
5072 | + */ |
|
5058 | 5073 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
5059 | 5074 | $actionurl = str_replace( '&', '&', $actionurl ); |
5060 | 5075 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -5357,7 +5372,7 @@ discard block |
||
5357 | 5372 | * @param String $action The action name. |
5358 | 5373 | * @param Integer $user_id The user identifier. |
5359 | 5374 | * @param Integer $exp Expiration time in seconds. |
5360 | - * @return array |
|
5375 | + * @return boolean |
|
5361 | 5376 | */ |
5362 | 5377 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
5363 | 5378 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5677,7 +5692,6 @@ discard block |
||
5677 | 5692 | /** |
5678 | 5693 | * Report authentication status to the WP REST API. |
5679 | 5694 | * |
5680 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5681 | 5695 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5682 | 5696 | */ |
5683 | 5697 | public function wp_rest_authentication_errors( $value ) { |
@@ -5804,6 +5818,7 @@ discard block |
||
5804 | 5818 | * @param string $key |
5805 | 5819 | * @param string $value |
5806 | 5820 | * @param bool $restate private |
5821 | + * @return string |
|
5807 | 5822 | */ |
5808 | 5823 | public static function state( $key = null, $value = null, $restate = false ) { |
5809 | 5824 | static $state = array(); |
@@ -5885,6 +5900,9 @@ discard block |
||
5885 | 5900 | return true; |
5886 | 5901 | } |
5887 | 5902 | |
5903 | + /** |
|
5904 | + * @param string $file |
|
5905 | + */ |
|
5888 | 5906 | public static function check_privacy( $file ) { |
5889 | 5907 | static $is_site_publicly_accessible = null; |
5890 | 5908 | |
@@ -5965,6 +5983,9 @@ discard block |
||
5965 | 5983 | } |
5966 | 5984 | } |
5967 | 5985 | |
5986 | + /** |
|
5987 | + * @param string $url |
|
5988 | + */ |
|
5968 | 5989 | public static function staticize_subdomain( $url ) { |
5969 | 5990 | |
5970 | 5991 | // Extract hostname from URL |
@@ -6481,9 +6502,7 @@ discard block |
||
6481 | 6502 | * |
6482 | 6503 | * Attached to `style_loader_src` filter. |
6483 | 6504 | * |
6484 | - * @param string $tag The tag that would link to the external asset. |
|
6485 | 6505 | * @param string $handle The registered handle of the script in question. |
6486 | - * @param string $href The url of the asset in question. |
|
6487 | 6506 | */ |
6488 | 6507 | public static function set_suffix_on_min( $src, $handle ) { |
6489 | 6508 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6690,8 +6709,8 @@ discard block |
||
6690 | 6709 | * - Absolute URLs `http://domain.com/feh.png` |
6691 | 6710 | * - Domain root relative URLs `/feh.png` |
6692 | 6711 | * |
6693 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6694 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6712 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6713 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6695 | 6714 | * |
6696 | 6715 | * @return mixed|string |
6697 | 6716 | */ |
@@ -6942,7 +6961,7 @@ discard block |
||
6942 | 6961 | /** |
6943 | 6962 | * Stores and prints out domains to prefetch for page speed optimization. |
6944 | 6963 | * |
6945 | - * @param mixed $new_urls |
|
6964 | + * @param string[] $new_urls |
|
6946 | 6965 | */ |
6947 | 6966 | public static function dns_prefetch( $new_urls = null ) { |
6948 | 6967 | static $prefetch_urls = array(); |
@@ -6999,7 +7018,6 @@ discard block |
||
6999 | 7018 | } |
7000 | 7019 | |
7001 | 7020 | /** |
7002 | - * @param mixed $result Value for the user's option |
|
7003 | 7021 | * @return mixed |
7004 | 7022 | */ |
7005 | 7023 | function get_user_option_meta_box_order_dashboard( $sorted ) { |