@@ -1113,7 +1113,7 @@ discard block |
||
1113 | 1113 | } |
1114 | 1114 | /** |
1115 | 1115 | * Does the network allow admins to add new users. |
1116 | - * @return boolian |
|
1116 | + * @return boolean |
|
1117 | 1117 | */ |
1118 | 1118 | static function network_add_new_users( $option = null ) { |
1119 | 1119 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1161,7 +1161,7 @@ discard block |
||
1161 | 1161 | * database which could be set to anything as opposed to what this function returns. |
1162 | 1162 | * @param bool $option |
1163 | 1163 | * |
1164 | - * @return boolean |
|
1164 | + * @return string |
|
1165 | 1165 | */ |
1166 | 1166 | public function is_main_network_option( $option ) { |
1167 | 1167 | // return '1' or '' |
@@ -1172,7 +1172,7 @@ discard block |
||
1172 | 1172 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1173 | 1173 | * |
1174 | 1174 | * @param string $option |
1175 | - * @return boolean |
|
1175 | + * @return string |
|
1176 | 1176 | */ |
1177 | 1177 | public function is_multisite( $option ) { |
1178 | 1178 | return (string) (bool) is_multisite(); |
@@ -1270,7 +1270,7 @@ discard block |
||
1270 | 1270 | |
1271 | 1271 | /** |
1272 | 1272 | * Returns true if the site has file write access false otherwise. |
1273 | - * @return string ( '1' | '0' ) |
|
1273 | + * @return integer ( '1' | '0' ) |
|
1274 | 1274 | **/ |
1275 | 1275 | public static function file_system_write_access() { |
1276 | 1276 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2080,7 +2080,7 @@ discard block |
||
2080 | 2080 | * Returns the requested option. Looks in jetpack_options or jetpack_$name as appropriate. |
2081 | 2081 | * |
2082 | 2082 | * @param string $name Option name |
2083 | - * @param mixed $default (optional) |
|
2083 | + * @param boolean $default (optional) |
|
2084 | 2084 | */ |
2085 | 2085 | public static function get_option( $name, $default = false ) { |
2086 | 2086 | return Jetpack_Options::get_option( $name, $default ); |
@@ -2090,6 +2090,7 @@ discard block |
||
2090 | 2090 | * Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action |
2091 | 2091 | * Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted |
2092 | 2092 | * $name must be a registered option name. |
2093 | + * @param string $name |
|
2093 | 2094 | */ |
2094 | 2095 | public static function create_nonce( $name ) { |
2095 | 2096 | $secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 ); |
@@ -2147,6 +2148,7 @@ discard block |
||
2147 | 2148 | * @param int $user_id |
2148 | 2149 | * @param string $token |
2149 | 2150 | * return bool |
2151 | + * @param boolean $is_master_user |
|
2150 | 2152 | */ |
2151 | 2153 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2152 | 2154 | // not designed for concurrent updates |
@@ -2541,6 +2543,7 @@ discard block |
||
2541 | 2543 | |
2542 | 2544 | /** |
2543 | 2545 | * Like core's get_file_data implementation, but caches the result. |
2546 | + * @param string $file |
|
2544 | 2547 | */ |
2545 | 2548 | public static function get_file_data( $file, $headers ) { |
2546 | 2549 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2569,7 +2572,7 @@ discard block |
||
2569 | 2572 | * |
2570 | 2573 | * @param string $tag Tag as it appears in each module heading. |
2571 | 2574 | * |
2572 | - * @return mixed |
|
2575 | + * @return string |
|
2573 | 2576 | */ |
2574 | 2577 | public static function translate_module_tag( $tag ) { |
2575 | 2578 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2887,6 +2890,9 @@ discard block |
||
2887 | 2890 | $this->sync->sync_all_module_options( $module ); |
2888 | 2891 | } |
2889 | 2892 | |
2893 | + /** |
|
2894 | + * @return string |
|
2895 | + */ |
|
2890 | 2896 | public static function deactivate_module( $module ) { |
2891 | 2897 | /** |
2892 | 2898 | * Fires when a module is deactivated. |
@@ -2925,6 +2931,9 @@ discard block |
||
2925 | 2931 | return Jetpack_Options::update_option( 'active_modules', array_unique( $new ) ); |
2926 | 2932 | } |
2927 | 2933 | |
2934 | + /** |
|
2935 | + * @param string $module |
|
2936 | + */ |
|
2928 | 2937 | public static function enable_module_configurable( $module ) { |
2929 | 2938 | $module = Jetpack::get_module_slug( $module ); |
2930 | 2939 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2935,21 +2944,33 @@ discard block |
||
2935 | 2944 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
2936 | 2945 | } |
2937 | 2946 | |
2947 | + /** |
|
2948 | + * @param string $module |
|
2949 | + */ |
|
2938 | 2950 | public static function module_configuration_load( $module, $method ) { |
2939 | 2951 | $module = Jetpack::get_module_slug( $module ); |
2940 | 2952 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
2941 | 2953 | } |
2942 | 2954 | |
2955 | + /** |
|
2956 | + * @param string $module |
|
2957 | + */ |
|
2943 | 2958 | public static function module_configuration_head( $module, $method ) { |
2944 | 2959 | $module = Jetpack::get_module_slug( $module ); |
2945 | 2960 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
2946 | 2961 | } |
2947 | 2962 | |
2963 | + /** |
|
2964 | + * @param string $module |
|
2965 | + */ |
|
2948 | 2966 | public static function module_configuration_screen( $module, $method ) { |
2949 | 2967 | $module = Jetpack::get_module_slug( $module ); |
2950 | 2968 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
2951 | 2969 | } |
2952 | 2970 | |
2971 | + /** |
|
2972 | + * @param string $module |
|
2973 | + */ |
|
2953 | 2974 | public static function module_configuration_activation_screen( $module, $method ) { |
2954 | 2975 | $module = Jetpack::get_module_slug( $module ); |
2955 | 2976 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2957,6 +2978,9 @@ discard block |
||
2957 | 2978 | |
2958 | 2979 | /* Installation */ |
2959 | 2980 | |
2981 | + /** |
|
2982 | + * @param string $message |
|
2983 | + */ |
|
2960 | 2984 | public static function bail_on_activation( $message, $deactivate = true ) { |
2961 | 2985 | ?> |
2962 | 2986 | <!doctype html> |
@@ -3570,7 +3594,7 @@ discard block |
||
3570 | 3594 | * Add help to the Jetpack page |
3571 | 3595 | * |
3572 | 3596 | * @since Jetpack (1.2.3) |
3573 | - * @return false if not the Jetpack page |
|
3597 | + * @return false|null if not the Jetpack page |
|
3574 | 3598 | */ |
3575 | 3599 | function admin_help() { |
3576 | 3600 | $current_screen = get_current_screen(); |
@@ -4886,6 +4910,7 @@ discard block |
||
4886 | 4910 | /** |
4887 | 4911 | * Returns the requested Jetpack API URL |
4888 | 4912 | * |
4913 | + * @param string $relative_url |
|
4889 | 4914 | * @return string |
4890 | 4915 | */ |
4891 | 4916 | public static function api_url( $relative_url ) { |
@@ -4988,7 +5013,8 @@ discard block |
||
4988 | 5013 | * Note these tokens are unique per call, NOT static per site for connecting. |
4989 | 5014 | * |
4990 | 5015 | * @since 2.6 |
4991 | - * @return array |
|
5016 | + * @param string $action |
|
5017 | + * @return string |
|
4992 | 5018 | */ |
4993 | 5019 | public function generate_secrets( $action ) { |
4994 | 5020 | $secret = wp_generate_password( 32, false ) // secret_1 |
@@ -5309,6 +5335,10 @@ discard block |
||
5309 | 5335 | return new WP_User( $token_details['user_id'] ); |
5310 | 5336 | } |
5311 | 5337 | |
5338 | + /** |
|
5339 | + * @param integer $timestamp |
|
5340 | + * @param string $nonce |
|
5341 | + */ |
|
5312 | 5342 | function add_nonce( $timestamp, $nonce ) { |
5313 | 5343 | global $wpdb; |
5314 | 5344 | static $nonces_used_this_request = array(); |
@@ -5514,6 +5544,9 @@ discard block |
||
5514 | 5544 | Jetpack::state( null, null, true ); |
5515 | 5545 | } |
5516 | 5546 | |
5547 | + /** |
|
5548 | + * @param string $file |
|
5549 | + */ |
|
5517 | 5550 | public static function check_privacy( $file ) { |
5518 | 5551 | static $is_site_publicly_accessible = null; |
5519 | 5552 | |
@@ -5841,7 +5874,7 @@ discard block |
||
5841 | 5874 | /** |
5842 | 5875 | * Pings the WordPress.com Mirror Site for the specified options. |
5843 | 5876 | * |
5844 | - * @param string|array $option_names The option names to request from the WordPress.com Mirror Site |
|
5877 | + * @param string[] $option_names The option names to request from the WordPress.com Mirror Site |
|
5845 | 5878 | * |
5846 | 5879 | * @return array An associative array of the option values as stored in the WordPress.com Mirror Site |
5847 | 5880 | */ |
@@ -5865,7 +5898,7 @@ discard block |
||
5865 | 5898 | /** |
5866 | 5899 | * Fetch the filtered array of options that we should compare to determine an identity crisis. |
5867 | 5900 | * |
5868 | - * @return array An array of options to check. |
|
5901 | + * @return string[] An array of options to check. |
|
5869 | 5902 | */ |
5870 | 5903 | public static function identity_crisis_options_to_check() { |
5871 | 5904 | return array( |
@@ -6536,8 +6569,8 @@ discard block |
||
6536 | 6569 | * - Absolute URLs `http://domain.com/feh.png` |
6537 | 6570 | * - Domain root relative URLs `/feh.png` |
6538 | 6571 | * |
6539 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6540 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6572 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6573 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6541 | 6574 | * |
6542 | 6575 | * @return mixed|string |
6543 | 6576 | */ |
@@ -6933,7 +6966,6 @@ discard block |
||
6933 | 6966 | } |
6934 | 6967 | |
6935 | 6968 | /** |
6936 | - * @param mixed $result Value for the user's option |
|
6937 | 6969 | * @return mixed |
6938 | 6970 | */ |
6939 | 6971 | function get_user_option_meta_box_order_dashboard( $sorted ) { |