@@ -1125,7 +1125,7 @@ discard block |
||
1125 | 1125 | } |
1126 | 1126 | /** |
1127 | 1127 | * Does the network allow admins to add new users. |
1128 | - * @return boolian |
|
1128 | + * @return boolean |
|
1129 | 1129 | */ |
1130 | 1130 | static function network_add_new_users( $option = null ) { |
1131 | 1131 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1230,7 +1230,7 @@ discard block |
||
1230 | 1230 | * database which could be set to anything as opposed to what this function returns. |
1231 | 1231 | * @param bool $option |
1232 | 1232 | * |
1233 | - * @return boolean |
|
1233 | + * @return string |
|
1234 | 1234 | */ |
1235 | 1235 | public function is_main_network_option( $option ) { |
1236 | 1236 | // return '1' or '' |
@@ -1241,7 +1241,7 @@ discard block |
||
1241 | 1241 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1242 | 1242 | * |
1243 | 1243 | * @param string $option |
1244 | - * @return boolean |
|
1244 | + * @return string |
|
1245 | 1245 | */ |
1246 | 1246 | public function is_multisite( $option ) { |
1247 | 1247 | return (string) (bool) is_multisite(); |
@@ -1303,7 +1303,7 @@ discard block |
||
1303 | 1303 | |
1304 | 1304 | /** |
1305 | 1305 | * Returns true if the site has file write access false otherwise. |
1306 | - * @return string ( '1' | '0' ) |
|
1306 | + * @return integer ( '1' | '0' ) |
|
1307 | 1307 | **/ |
1308 | 1308 | public static function file_system_write_access() { |
1309 | 1309 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2157,6 +2157,7 @@ discard block |
||
2157 | 2157 | * @param int $user_id |
2158 | 2158 | * @param string $token |
2159 | 2159 | * return bool |
2160 | + * @param boolean $is_master_user |
|
2160 | 2161 | */ |
2161 | 2162 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2162 | 2163 | // not designed for concurrent updates |
@@ -2559,6 +2560,7 @@ discard block |
||
2559 | 2560 | |
2560 | 2561 | /** |
2561 | 2562 | * Like core's get_file_data implementation, but caches the result. |
2563 | + * @param string $file |
|
2562 | 2564 | */ |
2563 | 2565 | public static function get_file_data( $file, $headers ) { |
2564 | 2566 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2595,7 +2597,7 @@ discard block |
||
2595 | 2597 | * |
2596 | 2598 | * @param string $tag Tag as it appears in each module heading. |
2597 | 2599 | * |
2598 | - * @return mixed |
|
2600 | + * @return string |
|
2599 | 2601 | */ |
2600 | 2602 | public static function translate_module_tag( $tag ) { |
2601 | 2603 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2734,8 +2736,8 @@ discard block |
||
2734 | 2736 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2735 | 2737 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2736 | 2738 | * |
2737 | - * @param $string |
|
2738 | - * @return mixed |
|
2739 | + * @param string $string |
|
2740 | + * @return string|null |
|
2739 | 2741 | */ |
2740 | 2742 | public static function alias_directories( $string ) { |
2741 | 2743 | // ABSPATH has a trailing slash. |
@@ -3013,6 +3015,9 @@ discard block |
||
3013 | 3015 | return self::update_active_modules( $new ); |
3014 | 3016 | } |
3015 | 3017 | |
3018 | + /** |
|
3019 | + * @param string $module |
|
3020 | + */ |
|
3016 | 3021 | public static function enable_module_configurable( $module ) { |
3017 | 3022 | $module = Jetpack::get_module_slug( $module ); |
3018 | 3023 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3023,21 +3028,33 @@ discard block |
||
3023 | 3028 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
3024 | 3029 | } |
3025 | 3030 | |
3031 | + /** |
|
3032 | + * @param string $module |
|
3033 | + */ |
|
3026 | 3034 | public static function module_configuration_load( $module, $method ) { |
3027 | 3035 | $module = Jetpack::get_module_slug( $module ); |
3028 | 3036 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
3029 | 3037 | } |
3030 | 3038 | |
3039 | + /** |
|
3040 | + * @param string $module |
|
3041 | + */ |
|
3031 | 3042 | public static function module_configuration_head( $module, $method ) { |
3032 | 3043 | $module = Jetpack::get_module_slug( $module ); |
3033 | 3044 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
3034 | 3045 | } |
3035 | 3046 | |
3047 | + /** |
|
3048 | + * @param string $module |
|
3049 | + */ |
|
3036 | 3050 | public static function module_configuration_screen( $module, $method ) { |
3037 | 3051 | $module = Jetpack::get_module_slug( $module ); |
3038 | 3052 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
3039 | 3053 | } |
3040 | 3054 | |
3055 | + /** |
|
3056 | + * @param string $module |
|
3057 | + */ |
|
3041 | 3058 | public static function module_configuration_activation_screen( $module, $method ) { |
3042 | 3059 | $module = Jetpack::get_module_slug( $module ); |
3043 | 3060 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -3045,6 +3062,9 @@ discard block |
||
3045 | 3062 | |
3046 | 3063 | /* Installation */ |
3047 | 3064 | |
3065 | + /** |
|
3066 | + * @param string $message |
|
3067 | + */ |
|
3048 | 3068 | public static function bail_on_activation( $message, $deactivate = true ) { |
3049 | 3069 | ?> |
3050 | 3070 | <!doctype html> |
@@ -3801,7 +3821,7 @@ discard block |
||
3801 | 3821 | * Add help to the Jetpack page |
3802 | 3822 | * |
3803 | 3823 | * @since Jetpack (1.2.3) |
3804 | - * @return false if not the Jetpack page |
|
3824 | + * @return false|null if not the Jetpack page |
|
3805 | 3825 | */ |
3806 | 3826 | function admin_help() { |
3807 | 3827 | $current_screen = get_current_screen(); |
@@ -4910,6 +4930,7 @@ discard block |
||
4910 | 4930 | /** |
4911 | 4931 | * Returns the requested Jetpack API URL |
4912 | 4932 | * |
4933 | + * @param string $relative_url |
|
4913 | 4934 | * @return string |
4914 | 4935 | */ |
4915 | 4936 | public static function api_url( $relative_url ) { |
@@ -5101,6 +5122,7 @@ discard block |
||
5101 | 5122 | * Note these tokens are unique per call, NOT static per site for connecting. |
5102 | 5123 | * |
5103 | 5124 | * @since 2.6 |
5125 | + * @param string $action |
|
5104 | 5126 | * @return array |
5105 | 5127 | */ |
5106 | 5128 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
@@ -5653,7 +5675,6 @@ discard block |
||
5653 | 5675 | /** |
5654 | 5676 | * Report authentication status to the WP REST API. |
5655 | 5677 | * |
5656 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5657 | 5678 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5658 | 5679 | */ |
5659 | 5680 | public function wp_rest_authentication_errors( $value ) { |
@@ -5663,6 +5684,10 @@ discard block |
||
5663 | 5684 | return $this->rest_authentication_status; |
5664 | 5685 | } |
5665 | 5686 | |
5687 | + /** |
|
5688 | + * @param integer $timestamp |
|
5689 | + * @param string $nonce |
|
5690 | + */ |
|
5666 | 5691 | function add_nonce( $timestamp, $nonce ) { |
5667 | 5692 | global $wpdb; |
5668 | 5693 | static $nonces_used_this_request = array(); |
@@ -5808,6 +5833,7 @@ discard block |
||
5808 | 5833 | * @param string $key |
5809 | 5834 | * @param string $value |
5810 | 5835 | * @param bool $restate private |
5836 | + * @return string |
|
5811 | 5837 | */ |
5812 | 5838 | public static function state( $key = null, $value = null, $restate = false ) { |
5813 | 5839 | static $state = array(); |
@@ -5864,6 +5890,9 @@ discard block |
||
5864 | 5890 | Jetpack::state( null, null, true ); |
5865 | 5891 | } |
5866 | 5892 | |
5893 | + /** |
|
5894 | + * @param string $file |
|
5895 | + */ |
|
5867 | 5896 | public static function check_privacy( $file ) { |
5868 | 5897 | static $is_site_publicly_accessible = null; |
5869 | 5898 | |
@@ -6481,9 +6510,7 @@ discard block |
||
6481 | 6510 | * |
6482 | 6511 | * Attached to `style_loader_src` filter. |
6483 | 6512 | * |
6484 | - * @param string $tag The tag that would link to the external asset. |
|
6485 | 6513 | * @param string $handle The registered handle of the script in question. |
6486 | - * @param string $href The url of the asset in question. |
|
6487 | 6514 | */ |
6488 | 6515 | public static function set_suffix_on_min( $src, $handle ) { |
6489 | 6516 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6662,8 +6689,8 @@ discard block |
||
6662 | 6689 | * - Absolute URLs `http://domain.com/feh.png` |
6663 | 6690 | * - Domain root relative URLs `/feh.png` |
6664 | 6691 | * |
6665 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6666 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6692 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6693 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6667 | 6694 | * |
6668 | 6695 | * @return mixed|string |
6669 | 6696 | */ |
@@ -6892,7 +6919,7 @@ discard block |
||
6892 | 6919 | * |
6893 | 6920 | * @param string $option_name |
6894 | 6921 | * |
6895 | - * @return bool |
|
6922 | + * @return false|null |
|
6896 | 6923 | */ |
6897 | 6924 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
6898 | 6925 | // Bail if Jump Start has already been dismissed |
@@ -6936,6 +6963,10 @@ discard block |
||
6936 | 6963 | * $param string |
6937 | 6964 | * @return string |
6938 | 6965 | */ |
6966 | + |
|
6967 | + /** |
|
6968 | + * @param string $path |
|
6969 | + */ |
|
6939 | 6970 | public static function calyps_url( $path, $from = null ) { |
6940 | 6971 | $host = 'https://wordpress.com'; |
6941 | 6972 | |
@@ -6955,7 +6986,7 @@ discard block |
||
6955 | 6986 | /** |
6956 | 6987 | * Stores and prints out domains to prefetch for page speed optimization. |
6957 | 6988 | * |
6958 | - * @param mixed $new_urls |
|
6989 | + * @param string[] $new_urls |
|
6959 | 6990 | */ |
6960 | 6991 | public static function dns_prefetch( $new_urls = null ) { |
6961 | 6992 | static $prefetch_urls = array(); |
@@ -7001,7 +7032,6 @@ discard block |
||
7001 | 7032 | } |
7002 | 7033 | |
7003 | 7034 | /** |
7004 | - * @param mixed $result Value for the user's option |
|
7005 | 7035 | * @return mixed |
7006 | 7036 | */ |
7007 | 7037 | function get_user_option_meta_box_order_dashboard( $sorted ) { |