@@ -1099,7 +1099,7 @@ discard block |
||
1099 | 1099 | } |
1100 | 1100 | /** |
1101 | 1101 | * Does the network allow admins to add new users. |
1102 | - * @return boolian |
|
1102 | + * @return boolean |
|
1103 | 1103 | */ |
1104 | 1104 | static function network_add_new_users( $option = null ) { |
1105 | 1105 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1147,7 +1147,7 @@ discard block |
||
1147 | 1147 | * database which could be set to anything as opposed to what this function returns. |
1148 | 1148 | * @param bool $option |
1149 | 1149 | * |
1150 | - * @return boolean |
|
1150 | + * @return string |
|
1151 | 1151 | */ |
1152 | 1152 | public function is_main_network_option( $option ) { |
1153 | 1153 | // return '1' or '' |
@@ -1158,7 +1158,7 @@ discard block |
||
1158 | 1158 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1159 | 1159 | * |
1160 | 1160 | * @param string $option |
1161 | - * @return boolean |
|
1161 | + * @return string |
|
1162 | 1162 | */ |
1163 | 1163 | public function is_multisite( $option ) { |
1164 | 1164 | return (string) (bool) is_multisite(); |
@@ -1256,7 +1256,7 @@ discard block |
||
1256 | 1256 | |
1257 | 1257 | /** |
1258 | 1258 | * Returns true if the site has file write access false otherwise. |
1259 | - * @return string ( '1' | '0' ) |
|
1259 | + * @return integer ( '1' | '0' ) |
|
1260 | 1260 | **/ |
1261 | 1261 | public static function file_system_write_access() { |
1262 | 1262 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2053,7 +2053,7 @@ discard block |
||
2053 | 2053 | * Returns the requested option. Looks in jetpack_options or jetpack_$name as appropriate. |
2054 | 2054 | * |
2055 | 2055 | * @param string $name Option name |
2056 | - * @param mixed $default (optional) |
|
2056 | + * @param boolean $default (optional) |
|
2057 | 2057 | */ |
2058 | 2058 | public static function get_option( $name, $default = false ) { |
2059 | 2059 | return Jetpack_Options::get_option( $name, $default ); |
@@ -2063,6 +2063,7 @@ discard block |
||
2063 | 2063 | * Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action |
2064 | 2064 | * Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted |
2065 | 2065 | * $name must be a registered option name. |
2066 | + * @param string $name |
|
2066 | 2067 | */ |
2067 | 2068 | public static function create_nonce( $name ) { |
2068 | 2069 | $secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 ); |
@@ -2120,6 +2121,7 @@ discard block |
||
2120 | 2121 | * @param int $user_id |
2121 | 2122 | * @param string $token |
2122 | 2123 | * return bool |
2124 | + * @param boolean $is_master_user |
|
2123 | 2125 | */ |
2124 | 2126 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2125 | 2127 | // not designed for concurrent updates |
@@ -2514,6 +2516,7 @@ discard block |
||
2514 | 2516 | |
2515 | 2517 | /** |
2516 | 2518 | * Like core's get_file_data implementation, but caches the result. |
2519 | + * @param string $file |
|
2517 | 2520 | */ |
2518 | 2521 | public static function get_file_data( $file, $headers ) { |
2519 | 2522 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2857,6 +2860,9 @@ discard block |
||
2857 | 2860 | $this->sync->sync_all_module_options( $module ); |
2858 | 2861 | } |
2859 | 2862 | |
2863 | + /** |
|
2864 | + * @return string |
|
2865 | + */ |
|
2860 | 2866 | public static function deactivate_module( $module ) { |
2861 | 2867 | /** |
2862 | 2868 | * Fires when a module is deactivated. |
@@ -2895,6 +2901,9 @@ discard block |
||
2895 | 2901 | return Jetpack_Options::update_option( 'active_modules', array_unique( $new ) ); |
2896 | 2902 | } |
2897 | 2903 | |
2904 | + /** |
|
2905 | + * @param string $module |
|
2906 | + */ |
|
2898 | 2907 | public static function enable_module_configurable( $module ) { |
2899 | 2908 | $module = Jetpack::get_module_slug( $module ); |
2900 | 2909 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2905,21 +2914,33 @@ discard block |
||
2905 | 2914 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
2906 | 2915 | } |
2907 | 2916 | |
2917 | + /** |
|
2918 | + * @param string $module |
|
2919 | + */ |
|
2908 | 2920 | public static function module_configuration_load( $module, $method ) { |
2909 | 2921 | $module = Jetpack::get_module_slug( $module ); |
2910 | 2922 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
2911 | 2923 | } |
2912 | 2924 | |
2925 | + /** |
|
2926 | + * @param string $module |
|
2927 | + */ |
|
2913 | 2928 | public static function module_configuration_head( $module, $method ) { |
2914 | 2929 | $module = Jetpack::get_module_slug( $module ); |
2915 | 2930 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
2916 | 2931 | } |
2917 | 2932 | |
2933 | + /** |
|
2934 | + * @param string $module |
|
2935 | + */ |
|
2918 | 2936 | public static function module_configuration_screen( $module, $method ) { |
2919 | 2937 | $module = Jetpack::get_module_slug( $module ); |
2920 | 2938 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
2921 | 2939 | } |
2922 | 2940 | |
2941 | + /** |
|
2942 | + * @param string $module |
|
2943 | + */ |
|
2923 | 2944 | public static function module_configuration_activation_screen( $module, $method ) { |
2924 | 2945 | $module = Jetpack::get_module_slug( $module ); |
2925 | 2946 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2927,6 +2948,9 @@ discard block |
||
2927 | 2948 | |
2928 | 2949 | /* Installation */ |
2929 | 2950 | |
2951 | + /** |
|
2952 | + * @param string $message |
|
2953 | + */ |
|
2930 | 2954 | public static function bail_on_activation( $message, $deactivate = true ) { |
2931 | 2955 | ?> |
2932 | 2956 | <!doctype html> |
@@ -3540,7 +3564,7 @@ discard block |
||
3540 | 3564 | * Add help to the Jetpack page |
3541 | 3565 | * |
3542 | 3566 | * @since Jetpack (1.2.3) |
3543 | - * @return false if not the Jetpack page |
|
3567 | + * @return false|null if not the Jetpack page |
|
3544 | 3568 | */ |
3545 | 3569 | function admin_help() { |
3546 | 3570 | $current_screen = get_current_screen(); |
@@ -4830,6 +4854,7 @@ discard block |
||
4830 | 4854 | /** |
4831 | 4855 | * Returns the requested Jetpack API URL |
4832 | 4856 | * |
4857 | + * @param string $relative_url |
|
4833 | 4858 | * @return string |
4834 | 4859 | */ |
4835 | 4860 | public static function api_url( $relative_url ) { |
@@ -5254,6 +5279,10 @@ discard block |
||
5254 | 5279 | return new WP_User( $token_details['user_id'] ); |
5255 | 5280 | } |
5256 | 5281 | |
5282 | + /** |
|
5283 | + * @param integer $timestamp |
|
5284 | + * @param string $nonce |
|
5285 | + */ |
|
5257 | 5286 | function add_nonce( $timestamp, $nonce ) { |
5258 | 5287 | global $wpdb; |
5259 | 5288 | static $nonces_used_this_request = array(); |
@@ -5459,6 +5488,9 @@ discard block |
||
5459 | 5488 | Jetpack::state( null, null, true ); |
5460 | 5489 | } |
5461 | 5490 | |
5491 | + /** |
|
5492 | + * @param string $file |
|
5493 | + */ |
|
5462 | 5494 | public static function check_privacy( $file ) { |
5463 | 5495 | static $is_site_publicly_accessible = null; |
5464 | 5496 | |
@@ -6487,8 +6519,8 @@ discard block |
||
6487 | 6519 | * - Absolute URLs `http://domain.com/feh.png` |
6488 | 6520 | * - Domain root relative URLs `/feh.png` |
6489 | 6521 | * |
6490 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6491 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6522 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6523 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6492 | 6524 | * |
6493 | 6525 | * @return mixed|string |
6494 | 6526 | */ |
@@ -6884,7 +6916,6 @@ discard block |
||
6884 | 6916 | } |
6885 | 6917 | |
6886 | 6918 | /** |
6887 | - * @param mixed $result Value for the user's option |
|
6888 | 6919 | * @return mixed |
6889 | 6920 | */ |
6890 | 6921 | function get_user_option_meta_box_order_dashboard( $sorted ) { |