@@ -829,7 +829,7 @@ discard block |
||
829 | 829 | * This is ported over from the manage module, which has been deprecated and baked in here. |
830 | 830 | * |
831 | 831 | * @param $domains |
832 | - * @return array |
|
832 | + * @return string[] |
|
833 | 833 | */ |
834 | 834 | function allow_wpcom_domain( $domains ) { |
835 | 835 | if ( empty( $domains ) ) { |
@@ -1234,7 +1234,7 @@ discard block |
||
1234 | 1234 | /** |
1235 | 1235 | * Does the network allow admins to add new users. |
1236 | 1236 | * |
1237 | - * @return boolian |
|
1237 | + * @return boolean |
|
1238 | 1238 | */ |
1239 | 1239 | static function network_add_new_users( $option = null ) { |
1240 | 1240 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1344,7 +1344,7 @@ discard block |
||
1344 | 1344 | * |
1345 | 1345 | * @param bool $option |
1346 | 1346 | * |
1347 | - * @return boolean |
|
1347 | + * @return string |
|
1348 | 1348 | */ |
1349 | 1349 | public function is_main_network_option( $option ) { |
1350 | 1350 | // return '1' or '' |
@@ -1355,7 +1355,7 @@ discard block |
||
1355 | 1355 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1356 | 1356 | * |
1357 | 1357 | * @param string $option |
1358 | - * @return boolean |
|
1358 | + * @return string |
|
1359 | 1359 | */ |
1360 | 1360 | public function is_multisite( $option ) { |
1361 | 1361 | return (string) (bool) is_multisite(); |
@@ -1418,7 +1418,7 @@ discard block |
||
1418 | 1418 | /** |
1419 | 1419 | * Returns true if the site has file write access false otherwise. |
1420 | 1420 | * |
1421 | - * @return string ( '1' | '0' ) |
|
1421 | + * @return integer ( '1' | '0' ) |
|
1422 | 1422 | **/ |
1423 | 1423 | public static function file_system_write_access() { |
1424 | 1424 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2154,7 +2154,7 @@ discard block |
||
2154 | 2154 | * @param int $user_id The user id. |
2155 | 2155 | * @param string $token The user token. |
2156 | 2156 | * @param bool $is_master_user Whether the user is the master user. |
2157 | - * @return bool |
|
2157 | + * @return boolean|null |
|
2158 | 2158 | */ |
2159 | 2159 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2160 | 2160 | _deprecated_function( __METHOD__, 'jetpack-8.0', 'Automattic\\Jetpack\\Connection\\Utils::update_user_token' ); |
@@ -2597,7 +2597,7 @@ discard block |
||
2597 | 2597 | * |
2598 | 2598 | * @param string $tag Tag as it appears in each module heading. |
2599 | 2599 | * |
2600 | - * @return mixed |
|
2600 | + * @return string |
|
2601 | 2601 | */ |
2602 | 2602 | public static function translate_module_tag( $tag ) { |
2603 | 2603 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2769,8 +2769,8 @@ discard block |
||
2769 | 2769 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2770 | 2770 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2771 | 2771 | * |
2772 | - * @param $string |
|
2773 | - * @return mixed |
|
2772 | + * @param string $string |
|
2773 | + * @return string|null |
|
2774 | 2774 | */ |
2775 | 2775 | public static function alias_directories( $string ) { |
2776 | 2776 | // ABSPATH has a trailing slash. |
@@ -2781,6 +2781,10 @@ discard block |
||
2781 | 2781 | return $string; |
2782 | 2782 | } |
2783 | 2783 | |
2784 | + /** |
|
2785 | + * @param boolean $redirect |
|
2786 | + * @param boolean $send_state_messages |
|
2787 | + */ |
|
2784 | 2788 | public static function activate_default_modules( |
2785 | 2789 | $min_version = false, |
2786 | 2790 | $max_version = false, |
@@ -3064,6 +3068,9 @@ discard block |
||
3064 | 3068 | return self::update_active_modules( $new ); |
3065 | 3069 | } |
3066 | 3070 | |
3071 | + /** |
|
3072 | + * @param string $module |
|
3073 | + */ |
|
3067 | 3074 | public static function enable_module_configurable( $module ) { |
3068 | 3075 | $module = self::get_module_slug( $module ); |
3069 | 3076 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3092,6 +3099,10 @@ discard block |
||
3092 | 3099 | } |
3093 | 3100 | |
3094 | 3101 | /* Installation */ |
3102 | + |
|
3103 | + /** |
|
3104 | + * @param string $message |
|
3105 | + */ |
|
3095 | 3106 | public static function bail_on_activation( $message, $deactivate = true ) { |
3096 | 3107 | ?> |
3097 | 3108 | <!doctype html> |
@@ -3841,7 +3852,7 @@ discard block |
||
3841 | 3852 | * Add help to the Jetpack page |
3842 | 3853 | * |
3843 | 3854 | * @since Jetpack (1.2.3) |
3844 | - * @return false if not the Jetpack page |
|
3855 | + * @return false|null if not the Jetpack page |
|
3845 | 3856 | */ |
3846 | 3857 | function admin_help() { |
3847 | 3858 | $current_screen = get_current_screen(); |
@@ -4263,7 +4274,7 @@ discard block |
||
4263 | 4274 | /** |
4264 | 4275 | * Converts an error_code into a user friendly string for admin notices |
4265 | 4276 | * |
4266 | - * @param $error |
|
4277 | + * @param string $error |
|
4267 | 4278 | * |
4268 | 4279 | * @return string |
4269 | 4280 | */ |
@@ -5271,7 +5282,7 @@ discard block |
||
5271 | 5282 | * @param String $action The action name. |
5272 | 5283 | * @param Integer $user_id The user identifier. |
5273 | 5284 | * @param Integer $exp Expiration time in seconds. |
5274 | - * @return array |
|
5285 | + * @return boolean |
|
5275 | 5286 | */ |
5276 | 5287 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
5277 | 5288 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5577,7 +5588,6 @@ discard block |
||
5577 | 5588 | /** |
5578 | 5589 | * Report authentication status to the WP REST API. |
5579 | 5590 | * |
5580 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5581 | 5591 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5582 | 5592 | */ |
5583 | 5593 | public function wp_rest_authentication_errors( $value ) { |
@@ -5679,6 +5689,7 @@ discard block |
||
5679 | 5689 | * @param string $key |
5680 | 5690 | * @param string $value |
5681 | 5691 | * @param bool $restate private |
5692 | + * @return string |
|
5682 | 5693 | */ |
5683 | 5694 | public static function state( $key = null, $value = null, $restate = false ) { |
5684 | 5695 | static $state = array(); |
@@ -5739,6 +5750,9 @@ discard block |
||
5739 | 5750 | self::state( null, null, true ); |
5740 | 5751 | } |
5741 | 5752 | |
5753 | + /** |
|
5754 | + * @param string $file |
|
5755 | + */ |
|
5742 | 5756 | public static function check_privacy( $file ) { |
5743 | 5757 | static $is_site_publicly_accessible = null; |
5744 | 5758 | |
@@ -5819,6 +5833,9 @@ discard block |
||
5819 | 5833 | } |
5820 | 5834 | } |
5821 | 5835 | |
5836 | + /** |
|
5837 | + * @param string $url |
|
5838 | + */ |
|
5822 | 5839 | public static function staticize_subdomain( $url ) { |
5823 | 5840 | |
5824 | 5841 | // Extract hostname from URL |
@@ -6332,9 +6349,7 @@ discard block |
||
6332 | 6349 | * |
6333 | 6350 | * Attached to `style_loader_src` filter. |
6334 | 6351 | * |
6335 | - * @param string $tag The tag that would link to the external asset. |
|
6336 | 6352 | * @param string $handle The registered handle of the script in question. |
6337 | - * @param string $href The url of the asset in question. |
|
6338 | 6353 | */ |
6339 | 6354 | public static function set_suffix_on_min( $src, $handle ) { |
6340 | 6355 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6525,8 +6540,8 @@ discard block |
||
6525 | 6540 | * - Absolute URLs `http://domain.com/feh.png` |
6526 | 6541 | * - Domain root relative URLs `/feh.png` |
6527 | 6542 | * |
6528 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6529 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6543 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6544 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6530 | 6545 | * |
6531 | 6546 | * @return mixed|string |
6532 | 6547 | */ |
@@ -6787,7 +6802,7 @@ discard block |
||
6787 | 6802 | /** |
6788 | 6803 | * Stores and prints out domains to prefetch for page speed optimization. |
6789 | 6804 | * |
6790 | - * @param mixed $new_urls |
|
6805 | + * @param string[] $new_urls |
|
6791 | 6806 | */ |
6792 | 6807 | public static function dns_prefetch( $new_urls = null ) { |
6793 | 6808 | static $prefetch_urls = array(); |
@@ -6844,7 +6859,6 @@ discard block |
||
6844 | 6859 | } |
6845 | 6860 | |
6846 | 6861 | /** |
6847 | - * @param mixed $result Value for the user's option |
|
6848 | 6862 | * @return mixed |
6849 | 6863 | */ |
6850 | 6864 | function get_user_option_meta_box_order_dashboard( $sorted ) { |