@@ -893,7 +893,7 @@ discard block |
||
893 | 893 | * This is ported over from the manage module, which has been deprecated and baked in here. |
894 | 894 | * |
895 | 895 | * @param $domains |
896 | - * @return array |
|
896 | + * @return string[] |
|
897 | 897 | */ |
898 | 898 | function allow_wpcom_domain( $domains ) { |
899 | 899 | if ( empty( $domains ) ) { |
@@ -1319,7 +1319,7 @@ discard block |
||
1319 | 1319 | /** |
1320 | 1320 | * Does the network allow admins to add new users. |
1321 | 1321 | * |
1322 | - * @return boolian |
|
1322 | + * @return boolean |
|
1323 | 1323 | */ |
1324 | 1324 | static function network_add_new_users( $option = null ) { |
1325 | 1325 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1429,7 +1429,7 @@ discard block |
||
1429 | 1429 | * |
1430 | 1430 | * @param bool $option |
1431 | 1431 | * |
1432 | - * @return boolean |
|
1432 | + * @return string |
|
1433 | 1433 | */ |
1434 | 1434 | public function is_main_network_option( $option ) { |
1435 | 1435 | // return '1' or '' |
@@ -1440,7 +1440,7 @@ discard block |
||
1440 | 1440 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1441 | 1441 | * |
1442 | 1442 | * @param string $option |
1443 | - * @return boolean |
|
1443 | + * @return string |
|
1444 | 1444 | */ |
1445 | 1445 | public function is_multisite( $option ) { |
1446 | 1446 | return (string) (bool) is_multisite(); |
@@ -1503,7 +1503,7 @@ discard block |
||
1503 | 1503 | /** |
1504 | 1504 | * Returns true if the site has file write access false otherwise. |
1505 | 1505 | * |
1506 | - * @return string ( '1' | '0' ) |
|
1506 | + * @return integer ( '1' | '0' ) |
|
1507 | 1507 | **/ |
1508 | 1508 | public static function file_system_write_access() { |
1509 | 1509 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2225,7 +2225,7 @@ discard block |
||
2225 | 2225 | * @param int $user_id The user id. |
2226 | 2226 | * @param string $token The user token. |
2227 | 2227 | * @param bool $is_master_user Whether the user is the master user. |
2228 | - * @return bool |
|
2228 | + * @return boolean|null |
|
2229 | 2229 | */ |
2230 | 2230 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2231 | 2231 | _deprecated_function( __METHOD__, 'jetpack-8.0', 'Automattic\\Jetpack\\Connection\\Utils::update_user_token' ); |
@@ -2669,7 +2669,7 @@ discard block |
||
2669 | 2669 | * |
2670 | 2670 | * @param string $tag Tag as it appears in each module heading. |
2671 | 2671 | * |
2672 | - * @return mixed |
|
2672 | + * @return string |
|
2673 | 2673 | */ |
2674 | 2674 | public static function translate_module_tag( $tag ) { |
2675 | 2675 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2841,8 +2841,8 @@ discard block |
||
2841 | 2841 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2842 | 2842 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2843 | 2843 | * |
2844 | - * @param $string |
|
2845 | - * @return mixed |
|
2844 | + * @param string $string |
|
2845 | + * @return string|null |
|
2846 | 2846 | */ |
2847 | 2847 | public static function alias_directories( $string ) { |
2848 | 2848 | // ABSPATH has a trailing slash. |
@@ -2853,6 +2853,10 @@ discard block |
||
2853 | 2853 | return $string; |
2854 | 2854 | } |
2855 | 2855 | |
2856 | + /** |
|
2857 | + * @param boolean $redirect |
|
2858 | + * @param boolean $send_state_messages |
|
2859 | + */ |
|
2856 | 2860 | public static function activate_default_modules( |
2857 | 2861 | $min_version = false, |
2858 | 2862 | $max_version = false, |
@@ -3136,6 +3140,9 @@ discard block |
||
3136 | 3140 | return self::update_active_modules( $new ); |
3137 | 3141 | } |
3138 | 3142 | |
3143 | + /** |
|
3144 | + * @param string $module |
|
3145 | + */ |
|
3139 | 3146 | public static function enable_module_configurable( $module ) { |
3140 | 3147 | $module = self::get_module_slug( $module ); |
3141 | 3148 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3164,6 +3171,10 @@ discard block |
||
3164 | 3171 | } |
3165 | 3172 | |
3166 | 3173 | /* Installation */ |
3174 | + |
|
3175 | + /** |
|
3176 | + * @param string $message |
|
3177 | + */ |
|
3167 | 3178 | public static function bail_on_activation( $message, $deactivate = true ) { |
3168 | 3179 | ?> |
3169 | 3180 | <!doctype html> |
@@ -3919,7 +3930,7 @@ discard block |
||
3919 | 3930 | * Add help to the Jetpack page |
3920 | 3931 | * |
3921 | 3932 | * @since Jetpack (1.2.3) |
3922 | - * @return false if not the Jetpack page |
|
3933 | + * @return false|null if not the Jetpack page |
|
3923 | 3934 | */ |
3924 | 3935 | function admin_help() { |
3925 | 3936 | $current_screen = get_current_screen(); |
@@ -5216,7 +5227,7 @@ discard block |
||
5216 | 5227 | * @param String $action The action name. |
5217 | 5228 | * @param Integer $user_id The user identifier. |
5218 | 5229 | * @param Integer $exp Expiration time in seconds. |
5219 | - * @return array |
|
5230 | + * @return boolean |
|
5220 | 5231 | */ |
5221 | 5232 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
5222 | 5233 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5536,7 +5547,6 @@ discard block |
||
5536 | 5547 | /** |
5537 | 5548 | * Report authentication status to the WP REST API. |
5538 | 5549 | * |
5539 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5540 | 5550 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5541 | 5551 | */ |
5542 | 5552 | public function wp_rest_authentication_errors( $value ) { |
@@ -5663,6 +5673,7 @@ discard block |
||
5663 | 5673 | * @param string $key |
5664 | 5674 | * @param string $value |
5665 | 5675 | * @param bool $restate private |
5676 | + * @return string |
|
5666 | 5677 | */ |
5667 | 5678 | public static function state( $key = null, $value = null, $restate = false ) { |
5668 | 5679 | static $state = array(); |
@@ -5723,6 +5734,9 @@ discard block |
||
5723 | 5734 | self::state( null, null, true ); |
5724 | 5735 | } |
5725 | 5736 | |
5737 | + /** |
|
5738 | + * @param string $file |
|
5739 | + */ |
|
5726 | 5740 | public static function check_privacy( $file ) { |
5727 | 5741 | static $is_site_publicly_accessible = null; |
5728 | 5742 | |
@@ -5803,6 +5817,9 @@ discard block |
||
5803 | 5817 | } |
5804 | 5818 | } |
5805 | 5819 | |
5820 | + /** |
|
5821 | + * @param string $url |
|
5822 | + */ |
|
5806 | 5823 | public static function staticize_subdomain( $url ) { |
5807 | 5824 | |
5808 | 5825 | // Extract hostname from URL |
@@ -6320,9 +6337,7 @@ discard block |
||
6320 | 6337 | * |
6321 | 6338 | * Attached to `style_loader_src` filter. |
6322 | 6339 | * |
6323 | - * @param string $tag The tag that would link to the external asset. |
|
6324 | 6340 | * @param string $handle The registered handle of the script in question. |
6325 | - * @param string $href The url of the asset in question. |
|
6326 | 6341 | */ |
6327 | 6342 | public static function set_suffix_on_min( $src, $handle ) { |
6328 | 6343 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6529,8 +6544,8 @@ discard block |
||
6529 | 6544 | * - Absolute URLs `http://domain.com/feh.png` |
6530 | 6545 | * - Domain root relative URLs `/feh.png` |
6531 | 6546 | * |
6532 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6533 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6547 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6548 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6534 | 6549 | * |
6535 | 6550 | * @return mixed|string |
6536 | 6551 | */ |
@@ -6796,12 +6811,6 @@ discard block |
||
6796 | 6811 | * |
6797 | 6812 | * Additional arguments to build the url |
6798 | 6813 | * |
6799 | - * @param string $site URL of the current site |
|
6800 | - * @param string $path Additional path to be appended to the URL |
|
6801 | - * @param string $query Query parameters to be added to the URL |
|
6802 | - * @param string $anchor Anchor to be added to the URL |
|
6803 | - |
|
6804 | - * } |
|
6805 | 6814 | * |
6806 | 6815 | * |
6807 | 6816 | * @return void |
@@ -6837,7 +6846,7 @@ discard block |
||
6837 | 6846 | /** |
6838 | 6847 | * Stores and prints out domains to prefetch for page speed optimization. |
6839 | 6848 | * |
6840 | - * @param mixed $new_urls |
|
6849 | + * @param string[] $new_urls |
|
6841 | 6850 | */ |
6842 | 6851 | public static function dns_prefetch( $new_urls = null ) { |
6843 | 6852 | static $prefetch_urls = array(); |
@@ -6894,7 +6903,6 @@ discard block |
||
6894 | 6903 | } |
6895 | 6904 | |
6896 | 6905 | /** |
6897 | - * @param mixed $result Value for the user's option |
|
6898 | 6906 | * @return mixed |
6899 | 6907 | */ |
6900 | 6908 | function get_user_option_meta_box_order_dashboard( $sorted ) { |