@@ -890,7 +890,7 @@ discard block |
||
| 890 | 890 | * This is ported over from the manage module, which has been deprecated and baked in here. |
| 891 | 891 | * |
| 892 | 892 | * @param $domains |
| 893 | - * @return array |
|
| 893 | + * @return string[] |
|
| 894 | 894 | */ |
| 895 | 895 | function allow_wpcom_domain( $domains ) { |
| 896 | 896 | if ( empty( $domains ) ) { |
@@ -1310,7 +1310,7 @@ discard block |
||
| 1310 | 1310 | /** |
| 1311 | 1311 | * Does the network allow admins to add new users. |
| 1312 | 1312 | * |
| 1313 | - * @return boolian |
|
| 1313 | + * @return boolean |
|
| 1314 | 1314 | */ |
| 1315 | 1315 | static function network_add_new_users( $option = null ) { |
| 1316 | 1316 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1420,7 +1420,7 @@ discard block |
||
| 1420 | 1420 | * |
| 1421 | 1421 | * @param bool $option |
| 1422 | 1422 | * |
| 1423 | - * @return boolean |
|
| 1423 | + * @return string |
|
| 1424 | 1424 | */ |
| 1425 | 1425 | public function is_main_network_option( $option ) { |
| 1426 | 1426 | // return '1' or '' |
@@ -1431,7 +1431,7 @@ discard block |
||
| 1431 | 1431 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1432 | 1432 | * |
| 1433 | 1433 | * @param string $option |
| 1434 | - * @return boolean |
|
| 1434 | + * @return string |
|
| 1435 | 1435 | */ |
| 1436 | 1436 | public function is_multisite( $option ) { |
| 1437 | 1437 | return (string) (bool) is_multisite(); |
@@ -1494,7 +1494,7 @@ discard block |
||
| 1494 | 1494 | /** |
| 1495 | 1495 | * Returns true if the site has file write access false otherwise. |
| 1496 | 1496 | * |
| 1497 | - * @return string ( '1' | '0' ) |
|
| 1497 | + * @return integer ( '1' | '0' ) |
|
| 1498 | 1498 | **/ |
| 1499 | 1499 | public static function file_system_write_access() { |
| 1500 | 1500 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2230,7 +2230,7 @@ discard block |
||
| 2230 | 2230 | * @param int $user_id The user id. |
| 2231 | 2231 | * @param string $token The user token. |
| 2232 | 2232 | * @param bool $is_master_user Whether the user is the master user. |
| 2233 | - * @return bool |
|
| 2233 | + * @return boolean|null |
|
| 2234 | 2234 | */ |
| 2235 | 2235 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
| 2236 | 2236 | _deprecated_function( __METHOD__, 'jetpack-8.0', 'Automattic\\Jetpack\\Connection\\Utils::update_user_token' ); |
@@ -2674,7 +2674,7 @@ discard block |
||
| 2674 | 2674 | * |
| 2675 | 2675 | * @param string $tag Tag as it appears in each module heading. |
| 2676 | 2676 | * |
| 2677 | - * @return mixed |
|
| 2677 | + * @return string |
|
| 2678 | 2678 | */ |
| 2679 | 2679 | public static function translate_module_tag( $tag ) { |
| 2680 | 2680 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2846,8 +2846,8 @@ discard block |
||
| 2846 | 2846 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
| 2847 | 2847 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
| 2848 | 2848 | * |
| 2849 | - * @param $string |
|
| 2850 | - * @return mixed |
|
| 2849 | + * @param string $string |
|
| 2850 | + * @return string|null |
|
| 2851 | 2851 | */ |
| 2852 | 2852 | public static function alias_directories( $string ) { |
| 2853 | 2853 | // ABSPATH has a trailing slash. |
@@ -2858,6 +2858,10 @@ discard block |
||
| 2858 | 2858 | return $string; |
| 2859 | 2859 | } |
| 2860 | 2860 | |
| 2861 | + /** |
|
| 2862 | + * @param boolean $redirect |
|
| 2863 | + * @param boolean $send_state_messages |
|
| 2864 | + */ |
|
| 2861 | 2865 | public static function activate_default_modules( |
| 2862 | 2866 | $min_version = false, |
| 2863 | 2867 | $max_version = false, |
@@ -3141,6 +3145,9 @@ discard block |
||
| 3141 | 3145 | return self::update_active_modules( $new ); |
| 3142 | 3146 | } |
| 3143 | 3147 | |
| 3148 | + /** |
|
| 3149 | + * @param string $module |
|
| 3150 | + */ |
|
| 3144 | 3151 | public static function enable_module_configurable( $module ) { |
| 3145 | 3152 | $module = self::get_module_slug( $module ); |
| 3146 | 3153 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3169,6 +3176,10 @@ discard block |
||
| 3169 | 3176 | } |
| 3170 | 3177 | |
| 3171 | 3178 | /* Installation */ |
| 3179 | + |
|
| 3180 | + /** |
|
| 3181 | + * @param string $message |
|
| 3182 | + */ |
|
| 3172 | 3183 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 3173 | 3184 | ?> |
| 3174 | 3185 | <!doctype html> |
@@ -3924,7 +3935,7 @@ discard block |
||
| 3924 | 3935 | * Add help to the Jetpack page |
| 3925 | 3936 | * |
| 3926 | 3937 | * @since Jetpack (1.2.3) |
| 3927 | - * @return false if not the Jetpack page |
|
| 3938 | + * @return false|null if not the Jetpack page |
|
| 3928 | 3939 | */ |
| 3929 | 3940 | function admin_help() { |
| 3930 | 3941 | $current_screen = get_current_screen(); |
@@ -5221,7 +5232,7 @@ discard block |
||
| 5221 | 5232 | * @param String $action The action name. |
| 5222 | 5233 | * @param Integer $user_id The user identifier. |
| 5223 | 5234 | * @param Integer $exp Expiration time in seconds. |
| 5224 | - * @return array |
|
| 5235 | + * @return boolean |
|
| 5225 | 5236 | */ |
| 5226 | 5237 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
| 5227 | 5238 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5541,7 +5552,6 @@ discard block |
||
| 5541 | 5552 | /** |
| 5542 | 5553 | * Report authentication status to the WP REST API. |
| 5543 | 5554 | * |
| 5544 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
| 5545 | 5555 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
| 5546 | 5556 | */ |
| 5547 | 5557 | public function wp_rest_authentication_errors( $value ) { |
@@ -5668,6 +5678,7 @@ discard block |
||
| 5668 | 5678 | * @param string $key |
| 5669 | 5679 | * @param string $value |
| 5670 | 5680 | * @param bool $restate private |
| 5681 | + * @return string |
|
| 5671 | 5682 | */ |
| 5672 | 5683 | public static function state( $key = null, $value = null, $restate = false ) { |
| 5673 | 5684 | static $state = array(); |
@@ -5728,6 +5739,9 @@ discard block |
||
| 5728 | 5739 | self::state( null, null, true ); |
| 5729 | 5740 | } |
| 5730 | 5741 | |
| 5742 | + /** |
|
| 5743 | + * @param string $file |
|
| 5744 | + */ |
|
| 5731 | 5745 | public static function check_privacy( $file ) { |
| 5732 | 5746 | static $is_site_publicly_accessible = null; |
| 5733 | 5747 | |
@@ -5808,6 +5822,9 @@ discard block |
||
| 5808 | 5822 | } |
| 5809 | 5823 | } |
| 5810 | 5824 | |
| 5825 | + /** |
|
| 5826 | + * @param string $url |
|
| 5827 | + */ |
|
| 5811 | 5828 | public static function staticize_subdomain( $url ) { |
| 5812 | 5829 | |
| 5813 | 5830 | // Extract hostname from URL |
@@ -6080,7 +6097,7 @@ discard block |
||
| 6080 | 6097 | /** |
| 6081 | 6098 | * Pings the WordPress.com Mirror Site for the specified options. |
| 6082 | 6099 | * |
| 6083 | - * @param string|array $option_names The option names to request from the WordPress.com Mirror Site |
|
| 6100 | + * @param string[] $option_names The option names to request from the WordPress.com Mirror Site |
|
| 6084 | 6101 | * |
| 6085 | 6102 | * @return array An associative array of the option values as stored in the WordPress.com Mirror Site |
| 6086 | 6103 | */ |
@@ -6325,9 +6342,7 @@ discard block |
||
| 6325 | 6342 | * |
| 6326 | 6343 | * Attached to `style_loader_src` filter. |
| 6327 | 6344 | * |
| 6328 | - * @param string $tag The tag that would link to the external asset. |
|
| 6329 | 6345 | * @param string $handle The registered handle of the script in question. |
| 6330 | - * @param string $href The url of the asset in question. |
|
| 6331 | 6346 | */ |
| 6332 | 6347 | public static function set_suffix_on_min( $src, $handle ) { |
| 6333 | 6348 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6534,8 +6549,8 @@ discard block |
||
| 6534 | 6549 | * - Absolute URLs `http://domain.com/feh.png` |
| 6535 | 6550 | * - Domain root relative URLs `/feh.png` |
| 6536 | 6551 | * |
| 6537 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 6538 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6552 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 6553 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6539 | 6554 | * |
| 6540 | 6555 | * @return mixed|string |
| 6541 | 6556 | */ |
@@ -6796,7 +6811,7 @@ discard block |
||
| 6796 | 6811 | /** |
| 6797 | 6812 | * Stores and prints out domains to prefetch for page speed optimization. |
| 6798 | 6813 | * |
| 6799 | - * @param mixed $new_urls |
|
| 6814 | + * @param string[] $new_urls |
|
| 6800 | 6815 | */ |
| 6801 | 6816 | public static function dns_prefetch( $new_urls = null ) { |
| 6802 | 6817 | static $prefetch_urls = array(); |
@@ -6853,7 +6868,6 @@ discard block |
||
| 6853 | 6868 | } |
| 6854 | 6869 | |
| 6855 | 6870 | /** |
| 6856 | - * @param mixed $result Value for the user's option |
|
| 6857 | 6871 | * @return mixed |
| 6858 | 6872 | */ |
| 6859 | 6873 | function get_user_option_meta_box_order_dashboard( $sorted ) { |