@@ -281,7 +281,7 @@ |
||
281 | 281 | * @param string $password the password. |
282 | 282 | * @param array $test_data the current test data. |
283 | 283 | * |
284 | - * @return bool does the test pass? |
|
284 | + * @return integer does the test pass? |
|
285 | 285 | */ |
286 | 286 | protected function test_preg_match( $password, $test_data ) { |
287 | 287 | return preg_match( $test_data['pattern'], $password ); |
@@ -980,7 +980,7 @@ discard block |
||
980 | 980 | * This is ported over from the manage module, which has been deprecated and baked in here. |
981 | 981 | * |
982 | 982 | * @param $domains |
983 | - * @return array |
|
983 | + * @return string[] |
|
984 | 984 | */ |
985 | 985 | function allow_wpcom_domain( $domains ) { |
986 | 986 | if ( empty( $domains ) ) { |
@@ -1381,7 +1381,7 @@ discard block |
||
1381 | 1381 | /** |
1382 | 1382 | * Does the network allow admins to add new users. |
1383 | 1383 | * |
1384 | - * @return boolian |
|
1384 | + * @return boolean |
|
1385 | 1385 | */ |
1386 | 1386 | static function network_add_new_users( $option = null ) { |
1387 | 1387 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1491,7 +1491,7 @@ discard block |
||
1491 | 1491 | * |
1492 | 1492 | * @param bool $option |
1493 | 1493 | * |
1494 | - * @return boolean |
|
1494 | + * @return string |
|
1495 | 1495 | */ |
1496 | 1496 | public function is_main_network_option( $option ) { |
1497 | 1497 | // return '1' or '' |
@@ -1502,7 +1502,7 @@ discard block |
||
1502 | 1502 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1503 | 1503 | * |
1504 | 1504 | * @param string $option |
1505 | - * @return boolean |
|
1505 | + * @return string |
|
1506 | 1506 | */ |
1507 | 1507 | public function is_multisite( $option ) { |
1508 | 1508 | return (string) (bool) is_multisite(); |
@@ -1565,7 +1565,7 @@ discard block |
||
1565 | 1565 | /** |
1566 | 1566 | * Returns true if the site has file write access false otherwise. |
1567 | 1567 | * |
1568 | - * @return string ( '1' | '0' ) |
|
1568 | + * @return integer ( '1' | '0' ) |
|
1569 | 1569 | **/ |
1570 | 1570 | public static function file_system_write_access() { |
1571 | 1571 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2273,7 +2273,7 @@ discard block |
||
2273 | 2273 | * @param int $user_id The user id. |
2274 | 2274 | * @param string $token The user token. |
2275 | 2275 | * @param bool $is_master_user Whether the user is the master user. |
2276 | - * @return bool |
|
2276 | + * @return boolean|null |
|
2277 | 2277 | */ |
2278 | 2278 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2279 | 2279 | _deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Tokens->update_user_token' ); |
@@ -2756,7 +2756,7 @@ discard block |
||
2756 | 2756 | * |
2757 | 2757 | * @param string $tag Tag as it appears in each module heading. |
2758 | 2758 | * |
2759 | - * @return mixed |
|
2759 | + * @return string |
|
2760 | 2760 | */ |
2761 | 2761 | public static function translate_module_tag( $tag ) { |
2762 | 2762 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2871,8 +2871,8 @@ discard block |
||
2871 | 2871 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2872 | 2872 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2873 | 2873 | * |
2874 | - * @param $string |
|
2875 | - * @return mixed |
|
2874 | + * @param string $string |
|
2875 | + * @return string|null |
|
2876 | 2876 | */ |
2877 | 2877 | public static function alias_directories( $string ) { |
2878 | 2878 | // ABSPATH has a trailing slash. |
@@ -2883,6 +2883,11 @@ discard block |
||
2883 | 2883 | return $string; |
2884 | 2884 | } |
2885 | 2885 | |
2886 | + /** |
|
2887 | + * @param boolean $redirect |
|
2888 | + * @param boolean $send_state_messages |
|
2889 | + * @param boolean $requires_user_connection |
|
2890 | + */ |
|
2886 | 2891 | public static function activate_default_modules( |
2887 | 2892 | $min_version = false, |
2888 | 2893 | $max_version = false, |
@@ -3172,6 +3177,9 @@ discard block |
||
3172 | 3177 | return self::update_active_modules( $new ); |
3173 | 3178 | } |
3174 | 3179 | |
3180 | + /** |
|
3181 | + * @param string $module |
|
3182 | + */ |
|
3175 | 3183 | public static function enable_module_configurable( $module ) { |
3176 | 3184 | $module = self::get_module_slug( $module ); |
3177 | 3185 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3200,6 +3208,10 @@ discard block |
||
3200 | 3208 | } |
3201 | 3209 | |
3202 | 3210 | /* Installation */ |
3211 | + |
|
3212 | + /** |
|
3213 | + * @param string $message |
|
3214 | + */ |
|
3203 | 3215 | public static function bail_on_activation( $message, $deactivate = true ) { |
3204 | 3216 | ?> |
3205 | 3217 | <!doctype html> |
@@ -3245,6 +3257,7 @@ discard block |
||
3245 | 3257 | * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook() |
3246 | 3258 | * |
3247 | 3259 | * @static |
3260 | + * @param boolean $network_wide |
|
3248 | 3261 | */ |
3249 | 3262 | public static function plugin_activation( $network_wide ) { |
3250 | 3263 | Jetpack_Options::update_option( 'activated', 1 ); |
@@ -3961,7 +3974,7 @@ discard block |
||
3961 | 3974 | * Add help to the Jetpack page |
3962 | 3975 | * |
3963 | 3976 | * @since Jetpack (1.2.3) |
3964 | - * @return false if not the Jetpack page |
|
3977 | + * @return false|null if not the Jetpack page |
|
3965 | 3978 | */ |
3966 | 3979 | function admin_help() { |
3967 | 3980 | $current_screen = get_current_screen(); |
@@ -4702,6 +4715,7 @@ discard block |
||
4702 | 4715 | |
4703 | 4716 | /** |
4704 | 4717 | * Record a stat for later output. This will only currently output in the admin_footer. |
4718 | + * @param string $group |
|
4705 | 4719 | */ |
4706 | 4720 | function stat( $group, $detail ) { |
4707 | 4721 | $this->initialize_stats(); |
@@ -5064,6 +5078,9 @@ discard block |
||
5064 | 5078 | return $url; |
5065 | 5079 | } |
5066 | 5080 | |
5081 | + /** |
|
5082 | + * @param string $actionurl |
|
5083 | + */ |
|
5067 | 5084 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
5068 | 5085 | $actionurl = str_replace( '&', '&', $actionurl ); |
5069 | 5086 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -5603,7 +5620,6 @@ discard block |
||
5603 | 5620 | * @deprecated since 8.9.0 |
5604 | 5621 | * @see Automattic\Jetpack\Connection\Rest_Authentication::wp_rest_authentication_errors() |
5605 | 5622 | * |
5606 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5607 | 5623 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5608 | 5624 | */ |
5609 | 5625 | public function wp_rest_authentication_errors( $value ) { |
@@ -5696,6 +5712,7 @@ discard block |
||
5696 | 5712 | * @param string $key |
5697 | 5713 | * @param string $value |
5698 | 5714 | * @param bool $restate private |
5715 | + * @return string |
|
5699 | 5716 | */ |
5700 | 5717 | public static function state( $key = null, $value = null, $restate = false ) { |
5701 | 5718 | static $state = array(); |
@@ -5777,6 +5794,9 @@ discard block |
||
5777 | 5794 | return true; |
5778 | 5795 | } |
5779 | 5796 | |
5797 | + /** |
|
5798 | + * @param string $file |
|
5799 | + */ |
|
5780 | 5800 | public static function check_privacy( $file ) { |
5781 | 5801 | static $is_site_publicly_accessible = null; |
5782 | 5802 | |
@@ -6350,9 +6370,7 @@ discard block |
||
6350 | 6370 | * |
6351 | 6371 | * Attached to `style_loader_src` filter. |
6352 | 6372 | * |
6353 | - * @param string $tag The tag that would link to the external asset. |
|
6354 | 6373 | * @param string $handle The registered handle of the script in question. |
6355 | - * @param string $href The url of the asset in question. |
|
6356 | 6374 | */ |
6357 | 6375 | public static function set_suffix_on_min( $src, $handle ) { |
6358 | 6376 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6728,8 +6746,8 @@ discard block |
||
6728 | 6746 | * - Absolute URLs `http://domain.com/feh.png` |
6729 | 6747 | * - Domain root relative URLs `/feh.png` |
6730 | 6748 | * |
6731 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6732 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6749 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6750 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6733 | 6751 | * |
6734 | 6752 | * @return mixed|string |
6735 | 6753 | */ |
@@ -7031,7 +7049,6 @@ discard block |
||
7031 | 7049 | } |
7032 | 7050 | |
7033 | 7051 | /** |
7034 | - * @param mixed $result Value for the user's option |
|
7035 | 7052 | * @return mixed |
7036 | 7053 | */ |
7037 | 7054 | function get_user_option_meta_box_order_dashboard( $sorted ) { |