@@ -1223,7 +1223,7 @@ discard block |
||
1223 | 1223 | } |
1224 | 1224 | /** |
1225 | 1225 | * Does the network allow admins to add new users. |
1226 | - * @return boolian |
|
1226 | + * @return boolean |
|
1227 | 1227 | */ |
1228 | 1228 | static function network_add_new_users( $option = null ) { |
1229 | 1229 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1328,7 +1328,7 @@ discard block |
||
1328 | 1328 | * database which could be set to anything as opposed to what this function returns. |
1329 | 1329 | * @param bool $option |
1330 | 1330 | * |
1331 | - * @return boolean |
|
1331 | + * @return string |
|
1332 | 1332 | */ |
1333 | 1333 | public function is_main_network_option( $option ) { |
1334 | 1334 | // return '1' or '' |
@@ -1339,7 +1339,7 @@ discard block |
||
1339 | 1339 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1340 | 1340 | * |
1341 | 1341 | * @param string $option |
1342 | - * @return boolean |
|
1342 | + * @return string |
|
1343 | 1343 | */ |
1344 | 1344 | public function is_multisite( $option ) { |
1345 | 1345 | return (string) (bool) is_multisite(); |
@@ -1401,7 +1401,7 @@ discard block |
||
1401 | 1401 | |
1402 | 1402 | /** |
1403 | 1403 | * Returns true if the site has file write access false otherwise. |
1404 | - * @return string ( '1' | '0' ) |
|
1404 | + * @return integer ( '1' | '0' ) |
|
1405 | 1405 | **/ |
1406 | 1406 | public static function file_system_write_access() { |
1407 | 1407 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2132,6 +2132,7 @@ discard block |
||
2132 | 2132 | * @param int $user_id |
2133 | 2133 | * @param string $token |
2134 | 2134 | * return bool |
2135 | + * @param boolean $is_master_user |
|
2135 | 2136 | */ |
2136 | 2137 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2137 | 2138 | // not designed for concurrent updates |
@@ -2534,6 +2535,7 @@ discard block |
||
2534 | 2535 | |
2535 | 2536 | /** |
2536 | 2537 | * Like core's get_file_data implementation, but caches the result. |
2538 | + * @param string $file |
|
2537 | 2539 | */ |
2538 | 2540 | public static function get_file_data( $file, $headers ) { |
2539 | 2541 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2570,7 +2572,7 @@ discard block |
||
2570 | 2572 | * |
2571 | 2573 | * @param string $tag Tag as it appears in each module heading. |
2572 | 2574 | * |
2573 | - * @return mixed |
|
2575 | + * @return string |
|
2574 | 2576 | */ |
2575 | 2577 | public static function translate_module_tag( $tag ) { |
2576 | 2578 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2747,8 +2749,8 @@ discard block |
||
2747 | 2749 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2748 | 2750 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2749 | 2751 | * |
2750 | - * @param $string |
|
2751 | - * @return mixed |
|
2752 | + * @param string $string |
|
2753 | + * @return string|null |
|
2752 | 2754 | */ |
2753 | 2755 | public static function alias_directories( $string ) { |
2754 | 2756 | // ABSPATH has a trailing slash. |
@@ -3028,6 +3030,9 @@ discard block |
||
3028 | 3030 | return self::update_active_modules( $new ); |
3029 | 3031 | } |
3030 | 3032 | |
3033 | + /** |
|
3034 | + * @param string $module |
|
3035 | + */ |
|
3031 | 3036 | public static function enable_module_configurable( $module ) { |
3032 | 3037 | $module = Jetpack::get_module_slug( $module ); |
3033 | 3038 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3055,21 +3060,33 @@ discard block |
||
3055 | 3060 | return $url; |
3056 | 3061 | } |
3057 | 3062 | |
3063 | + /** |
|
3064 | + * @param string $module |
|
3065 | + */ |
|
3058 | 3066 | public static function module_configuration_load( $module, $method ) { |
3059 | 3067 | $module = Jetpack::get_module_slug( $module ); |
3060 | 3068 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
3061 | 3069 | } |
3062 | 3070 | |
3071 | + /** |
|
3072 | + * @param string $module |
|
3073 | + */ |
|
3063 | 3074 | public static function module_configuration_head( $module, $method ) { |
3064 | 3075 | $module = Jetpack::get_module_slug( $module ); |
3065 | 3076 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
3066 | 3077 | } |
3067 | 3078 | |
3079 | + /** |
|
3080 | + * @param string $module |
|
3081 | + */ |
|
3068 | 3082 | public static function module_configuration_screen( $module, $method ) { |
3069 | 3083 | $module = Jetpack::get_module_slug( $module ); |
3070 | 3084 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
3071 | 3085 | } |
3072 | 3086 | |
3087 | + /** |
|
3088 | + * @param string $module |
|
3089 | + */ |
|
3073 | 3090 | public static function module_configuration_activation_screen( $module, $method ) { |
3074 | 3091 | $module = Jetpack::get_module_slug( $module ); |
3075 | 3092 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -3077,6 +3094,9 @@ discard block |
||
3077 | 3094 | |
3078 | 3095 | /* Installation */ |
3079 | 3096 | |
3097 | + /** |
|
3098 | + * @param string $message |
|
3099 | + */ |
|
3080 | 3100 | public static function bail_on_activation( $message, $deactivate = true ) { |
3081 | 3101 | ?> |
3082 | 3102 | <!doctype html> |
@@ -3837,7 +3857,7 @@ discard block |
||
3837 | 3857 | * Add help to the Jetpack page |
3838 | 3858 | * |
3839 | 3859 | * @since Jetpack (1.2.3) |
3840 | - * @return false if not the Jetpack page |
|
3860 | + * @return false|null if not the Jetpack page |
|
3841 | 3861 | */ |
3842 | 3862 | function admin_help() { |
3843 | 3863 | $current_screen = get_current_screen(); |
@@ -4768,6 +4788,9 @@ discard block |
||
4768 | 4788 | return $url; |
4769 | 4789 | } |
4770 | 4790 | |
4791 | + /** |
|
4792 | + * @return string |
|
4793 | + */ |
|
4771 | 4794 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
4772 | 4795 | $actionurl = str_replace( '&', '&', $actionurl ); |
4773 | 4796 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -4979,6 +5002,7 @@ discard block |
||
4979 | 5002 | /** |
4980 | 5003 | * Returns the requested Jetpack API URL |
4981 | 5004 | * |
5005 | + * @param string $relative_url |
|
4982 | 5006 | * @return string |
4983 | 5007 | */ |
4984 | 5008 | public static function api_url( $relative_url ) { |
@@ -5170,6 +5194,7 @@ discard block |
||
5170 | 5194 | * Note these tokens are unique per call, NOT static per site for connecting. |
5171 | 5195 | * |
5172 | 5196 | * @since 2.6 |
5197 | + * @param string $action |
|
5173 | 5198 | * @return array |
5174 | 5199 | */ |
5175 | 5200 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
@@ -5706,7 +5731,6 @@ discard block |
||
5706 | 5731 | /** |
5707 | 5732 | * Report authentication status to the WP REST API. |
5708 | 5733 | * |
5709 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5710 | 5734 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5711 | 5735 | */ |
5712 | 5736 | public function wp_rest_authentication_errors( $value ) { |
@@ -5861,6 +5885,7 @@ discard block |
||
5861 | 5885 | * @param string $key |
5862 | 5886 | * @param string $value |
5863 | 5887 | * @param bool $restate private |
5888 | + * @return string |
|
5864 | 5889 | */ |
5865 | 5890 | public static function state( $key = null, $value = null, $restate = false ) { |
5866 | 5891 | static $state = array(); |
@@ -5917,6 +5942,9 @@ discard block |
||
5917 | 5942 | Jetpack::state( null, null, true ); |
5918 | 5943 | } |
5919 | 5944 | |
5945 | + /** |
|
5946 | + * @param string $file |
|
5947 | + */ |
|
5920 | 5948 | public static function check_privacy( $file ) { |
5921 | 5949 | static $is_site_publicly_accessible = null; |
5922 | 5950 | |
@@ -6549,9 +6577,7 @@ discard block |
||
6549 | 6577 | * |
6550 | 6578 | * Attached to `style_loader_src` filter. |
6551 | 6579 | * |
6552 | - * @param string $tag The tag that would link to the external asset. |
|
6553 | 6580 | * @param string $handle The registered handle of the script in question. |
6554 | - * @param string $href The url of the asset in question. |
|
6555 | 6581 | */ |
6556 | 6582 | public static function set_suffix_on_min( $src, $handle ) { |
6557 | 6583 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6732,8 +6758,8 @@ discard block |
||
6732 | 6758 | * - Absolute URLs `http://domain.com/feh.png` |
6733 | 6759 | * - Domain root relative URLs `/feh.png` |
6734 | 6760 | * |
6735 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6736 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6761 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6762 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6737 | 6763 | * |
6738 | 6764 | * @return mixed|string |
6739 | 6765 | */ |
@@ -6967,7 +6993,7 @@ discard block |
||
6967 | 6993 | * |
6968 | 6994 | * @param string $option_name |
6969 | 6995 | * |
6970 | - * @return bool |
|
6996 | + * @return false|null |
|
6971 | 6997 | */ |
6972 | 6998 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
6973 | 6999 | // Bail if Jump Start has already been dismissed |
@@ -7008,7 +7034,7 @@ discard block |
||
7008 | 7034 | /** |
7009 | 7035 | * Stores and prints out domains to prefetch for page speed optimization. |
7010 | 7036 | * |
7011 | - * @param mixed $new_urls |
|
7037 | + * @param string[] $new_urls |
|
7012 | 7038 | */ |
7013 | 7039 | public static function dns_prefetch( $new_urls = null ) { |
7014 | 7040 | static $prefetch_urls = array(); |
@@ -7063,7 +7089,6 @@ discard block |
||
7063 | 7089 | } |
7064 | 7090 | |
7065 | 7091 | /** |
7066 | - * @param mixed $result Value for the user's option |
|
7067 | 7092 | * @return mixed |
7068 | 7093 | */ |
7069 | 7094 | function get_user_option_meta_box_order_dashboard( $sorted ) { |