@@ -904,7 +904,7 @@ discard block |
||
904 | 904 | * This is ported over from the manage module, which has been deprecated and baked in here. |
905 | 905 | * |
906 | 906 | * @param $domains |
907 | - * @return array |
|
907 | + * @return string[] |
|
908 | 908 | */ |
909 | 909 | function allow_wpcom_domain( $domains ) { |
910 | 910 | 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' ) ) { |
@@ -2232,7 +2232,7 @@ discard block |
||
2232 | 2232 | * @param int $user_id The user id. |
2233 | 2233 | * @param string $token The user token. |
2234 | 2234 | * @param bool $is_master_user Whether the user is the master user. |
2235 | - * @return bool |
|
2235 | + * @return boolean|null |
|
2236 | 2236 | */ |
2237 | 2237 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2238 | 2238 | _deprecated_function( __METHOD__, 'jetpack-8.0', 'Automattic\\Jetpack\\Connection\\Utils::update_user_token' ); |
@@ -2677,7 +2677,7 @@ discard block |
||
2677 | 2677 | * |
2678 | 2678 | * @param string $tag Tag as it appears in each module heading. |
2679 | 2679 | * |
2680 | - * @return mixed |
|
2680 | + * @return string |
|
2681 | 2681 | */ |
2682 | 2682 | public static function translate_module_tag( $tag ) { |
2683 | 2683 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2849,8 +2849,8 @@ discard block |
||
2849 | 2849 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2850 | 2850 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2851 | 2851 | * |
2852 | - * @param $string |
|
2853 | - * @return mixed |
|
2852 | + * @param string $string |
|
2853 | + * @return string|null |
|
2854 | 2854 | */ |
2855 | 2855 | public static function alias_directories( $string ) { |
2856 | 2856 | // ABSPATH has a trailing slash. |
@@ -2861,6 +2861,10 @@ discard block |
||
2861 | 2861 | return $string; |
2862 | 2862 | } |
2863 | 2863 | |
2864 | + /** |
|
2865 | + * @param boolean $redirect |
|
2866 | + * @param boolean $send_state_messages |
|
2867 | + */ |
|
2864 | 2868 | public static function activate_default_modules( |
2865 | 2869 | $min_version = false, |
2866 | 2870 | $max_version = false, |
@@ -3144,6 +3148,9 @@ discard block |
||
3144 | 3148 | return self::update_active_modules( $new ); |
3145 | 3149 | } |
3146 | 3150 | |
3151 | + /** |
|
3152 | + * @param string $module |
|
3153 | + */ |
|
3147 | 3154 | public static function enable_module_configurable( $module ) { |
3148 | 3155 | $module = self::get_module_slug( $module ); |
3149 | 3156 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3172,6 +3179,10 @@ discard block |
||
3172 | 3179 | } |
3173 | 3180 | |
3174 | 3181 | /* Installation */ |
3182 | + |
|
3183 | + /** |
|
3184 | + * @param string $message |
|
3185 | + */ |
|
3175 | 3186 | public static function bail_on_activation( $message, $deactivate = true ) { |
3176 | 3187 | ?> |
3177 | 3188 | <!doctype html> |
@@ -3933,7 +3944,7 @@ discard block |
||
3933 | 3944 | * Add help to the Jetpack page |
3934 | 3945 | * |
3935 | 3946 | * @since Jetpack (1.2.3) |
3936 | - * @return false if not the Jetpack page |
|
3947 | + * @return false|null if not the Jetpack page |
|
3937 | 3948 | */ |
3938 | 3949 | function admin_help() { |
3939 | 3950 | $current_screen = get_current_screen(); |
@@ -4971,6 +4982,9 @@ discard block |
||
4971 | 4982 | return $url; |
4972 | 4983 | } |
4973 | 4984 | |
4985 | + /** |
|
4986 | + * @param string $actionurl |
|
4987 | + */ |
|
4974 | 4988 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
4975 | 4989 | $actionurl = str_replace( '&', '&', $actionurl ); |
4976 | 4990 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -5273,7 +5287,7 @@ discard block |
||
5273 | 5287 | * @param String $action The action name. |
5274 | 5288 | * @param Integer $user_id The user identifier. |
5275 | 5289 | * @param Integer $exp Expiration time in seconds. |
5276 | - * @return array |
|
5290 | + * @return boolean |
|
5277 | 5291 | */ |
5278 | 5292 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
5279 | 5293 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5593,7 +5607,6 @@ discard block |
||
5593 | 5607 | /** |
5594 | 5608 | * Report authentication status to the WP REST API. |
5595 | 5609 | * |
5596 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5597 | 5610 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5598 | 5611 | */ |
5599 | 5612 | public function wp_rest_authentication_errors( $value ) { |
@@ -5720,6 +5733,7 @@ discard block |
||
5720 | 5733 | * @param string $key |
5721 | 5734 | * @param string $value |
5722 | 5735 | * @param bool $restate private |
5736 | + * @return string |
|
5723 | 5737 | */ |
5724 | 5738 | public static function state( $key = null, $value = null, $restate = false ) { |
5725 | 5739 | static $state = array(); |
@@ -5801,6 +5815,9 @@ discard block |
||
5801 | 5815 | return true; |
5802 | 5816 | } |
5803 | 5817 | |
5818 | + /** |
|
5819 | + * @param string $file |
|
5820 | + */ |
|
5804 | 5821 | public static function check_privacy( $file ) { |
5805 | 5822 | static $is_site_publicly_accessible = null; |
5806 | 5823 | |
@@ -5881,6 +5898,9 @@ discard block |
||
5881 | 5898 | } |
5882 | 5899 | } |
5883 | 5900 | |
5901 | + /** |
|
5902 | + * @param string $url |
|
5903 | + */ |
|
5884 | 5904 | public static function staticize_subdomain( $url ) { |
5885 | 5905 | |
5886 | 5906 | // Extract hostname from URL |
@@ -6397,9 +6417,7 @@ discard block |
||
6397 | 6417 | * |
6398 | 6418 | * Attached to `style_loader_src` filter. |
6399 | 6419 | * |
6400 | - * @param string $tag The tag that would link to the external asset. |
|
6401 | 6420 | * @param string $handle The registered handle of the script in question. |
6402 | - * @param string $href The url of the asset in question. |
|
6403 | 6421 | */ |
6404 | 6422 | public static function set_suffix_on_min( $src, $handle ) { |
6405 | 6423 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6606,8 +6624,8 @@ discard block |
||
6606 | 6624 | * - Absolute URLs `http://domain.com/feh.png` |
6607 | 6625 | * - Domain root relative URLs `/feh.png` |
6608 | 6626 | * |
6609 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6610 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6627 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6628 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6611 | 6629 | * |
6612 | 6630 | * @return mixed|string |
6613 | 6631 | */ |
@@ -6868,7 +6886,7 @@ discard block |
||
6868 | 6886 | /** |
6869 | 6887 | * Stores and prints out domains to prefetch for page speed optimization. |
6870 | 6888 | * |
6871 | - * @param mixed $new_urls |
|
6889 | + * @param string[] $new_urls |
|
6872 | 6890 | */ |
6873 | 6891 | public static function dns_prefetch( $new_urls = null ) { |
6874 | 6892 | static $prefetch_urls = array(); |
@@ -6925,7 +6943,6 @@ discard block |
||
6925 | 6943 | } |
6926 | 6944 | |
6927 | 6945 | /** |
6928 | - * @param mixed $result Value for the user's option |
|
6929 | 6946 | * @return mixed |
6930 | 6947 | */ |
6931 | 6948 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -100,6 +100,10 @@ discard block |
||
100 | 100 | return $ret; |
101 | 101 | } |
102 | 102 | |
103 | +/** |
|
104 | + * @param string $prefix |
|
105 | + * @param string $sep |
|
106 | + */ |
|
103 | 107 | function _http_build_query( $data, $prefix = null, $sep = null, $key = '', $urlencode = true ) { |
104 | 108 | $ret = array(); |
105 | 109 | |
@@ -139,6 +143,9 @@ discard block |
||
139 | 143 | return _http_build_query( $data, null, '&', '', false ); |
140 | 144 | } |
141 | 145 | |
146 | +/** |
|
147 | + * @param string $callback |
|
148 | + */ |
|
142 | 149 | function map_deep( $value, $callback ) { |
143 | 150 | if ( is_array( $value ) ) { |
144 | 151 | foreach ( $value as $index => $item ) { |
@@ -143,7 +143,7 @@ |
||
143 | 143 | /** |
144 | 144 | * |
145 | 145 | * Return Whether boolean cached threats exist or null if the state is unknown. |
146 | - * * @return boolean or null |
|
146 | + * * @return null|boolean or null |
|
147 | 147 | */ |
148 | 148 | public function has_threats() { |
149 | 149 | $scan_state = get_transient( 'jetpack_scan_state' ); |