@@ -900,7 +900,7 @@ discard block |
||
900 | 900 | } |
901 | 901 | /** |
902 | 902 | * Does the network allow admins to add new users. |
903 | - * @return boolian |
|
903 | + * @return boolean |
|
904 | 904 | */ |
905 | 905 | static function network_add_new_users( $option = null ) { |
906 | 906 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1005,7 +1005,7 @@ discard block |
||
1005 | 1005 | * database which could be set to anything as opposed to what this function returns. |
1006 | 1006 | * @param bool $option |
1007 | 1007 | * |
1008 | - * @return boolean |
|
1008 | + * @return string |
|
1009 | 1009 | */ |
1010 | 1010 | public function is_main_network_option( $option ) { |
1011 | 1011 | // return '1' or '' |
@@ -1016,7 +1016,7 @@ discard block |
||
1016 | 1016 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1017 | 1017 | * |
1018 | 1018 | * @param string $option |
1019 | - * @return boolean |
|
1019 | + * @return string |
|
1020 | 1020 | */ |
1021 | 1021 | public function is_multisite( $option ) { |
1022 | 1022 | return (string) (bool) is_multisite(); |
@@ -1078,7 +1078,7 @@ discard block |
||
1078 | 1078 | |
1079 | 1079 | /** |
1080 | 1080 | * Returns true if the site has file write access false otherwise. |
1081 | - * @return string ( '1' | '0' ) |
|
1081 | + * @return integer ( '1' | '0' ) |
|
1082 | 1082 | **/ |
1083 | 1083 | public static function file_system_write_access() { |
1084 | 1084 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -1314,6 +1314,7 @@ discard block |
||
1314 | 1314 | * @access public |
1315 | 1315 | * @static |
1316 | 1316 | * |
1317 | + * @param string $feature |
|
1317 | 1318 | * @return bool True if plan supports feature, false if not |
1318 | 1319 | */ |
1319 | 1320 | public static function active_plan_supports( $feature ) { |
@@ -1812,6 +1813,7 @@ discard block |
||
1812 | 1813 | * Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action |
1813 | 1814 | * Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted |
1814 | 1815 | * $name must be a registered option name. |
1816 | + * @param string $name |
|
1815 | 1817 | */ |
1816 | 1818 | public static function create_nonce( $name ) { |
1817 | 1819 | $secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 ); |
@@ -1869,6 +1871,7 @@ discard block |
||
1869 | 1871 | * @param int $user_id |
1870 | 1872 | * @param string $token |
1871 | 1873 | * return bool |
1874 | + * @param boolean $is_master_user |
|
1872 | 1875 | */ |
1873 | 1876 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
1874 | 1877 | // not designed for concurrent updates |
@@ -2263,6 +2266,7 @@ discard block |
||
2263 | 2266 | |
2264 | 2267 | /** |
2265 | 2268 | * Like core's get_file_data implementation, but caches the result. |
2269 | + * @param string $file |
|
2266 | 2270 | */ |
2267 | 2271 | public static function get_file_data( $file, $headers ) { |
2268 | 2272 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2291,7 +2295,7 @@ discard block |
||
2291 | 2295 | * |
2292 | 2296 | * @param string $tag Tag as it appears in each module heading. |
2293 | 2297 | * |
2294 | - * @return mixed |
|
2298 | + * @return string |
|
2295 | 2299 | */ |
2296 | 2300 | public static function translate_module_tag( $tag ) { |
2297 | 2301 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2304,7 +2308,7 @@ discard block |
||
2304 | 2308 | * |
2305 | 2309 | * @param array $modules |
2306 | 2310 | * |
2307 | - * @return string|void |
|
2311 | + * @return string |
|
2308 | 2312 | */ |
2309 | 2313 | public static function get_translated_modules( $modules ) { |
2310 | 2314 | foreach ( $modules as $index => $module ) { |
@@ -2394,8 +2398,8 @@ discard block |
||
2394 | 2398 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2395 | 2399 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2396 | 2400 | * |
2397 | - * @param $string |
|
2398 | - * @return mixed |
|
2401 | + * @param string $string |
|
2402 | + * @return string|null |
|
2399 | 2403 | */ |
2400 | 2404 | public static function alias_directories( $string ) { |
2401 | 2405 | // ABSPATH has a trailing slash. |
@@ -2650,6 +2654,9 @@ discard block |
||
2650 | 2654 | return self::update_active_modules( $new ); |
2651 | 2655 | } |
2652 | 2656 | |
2657 | + /** |
|
2658 | + * @param string $module |
|
2659 | + */ |
|
2653 | 2660 | public static function enable_module_configurable( $module ) { |
2654 | 2661 | $module = Jetpack::get_module_slug( $module ); |
2655 | 2662 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2660,21 +2667,33 @@ discard block |
||
2660 | 2667 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
2661 | 2668 | } |
2662 | 2669 | |
2670 | + /** |
|
2671 | + * @param string $module |
|
2672 | + */ |
|
2663 | 2673 | public static function module_configuration_load( $module, $method ) { |
2664 | 2674 | $module = Jetpack::get_module_slug( $module ); |
2665 | 2675 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
2666 | 2676 | } |
2667 | 2677 | |
2678 | + /** |
|
2679 | + * @param string $module |
|
2680 | + */ |
|
2668 | 2681 | public static function module_configuration_head( $module, $method ) { |
2669 | 2682 | $module = Jetpack::get_module_slug( $module ); |
2670 | 2683 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
2671 | 2684 | } |
2672 | 2685 | |
2686 | + /** |
|
2687 | + * @param string $module |
|
2688 | + */ |
|
2673 | 2689 | public static function module_configuration_screen( $module, $method ) { |
2674 | 2690 | $module = Jetpack::get_module_slug( $module ); |
2675 | 2691 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
2676 | 2692 | } |
2677 | 2693 | |
2694 | + /** |
|
2695 | + * @param string $module |
|
2696 | + */ |
|
2678 | 2697 | public static function module_configuration_activation_screen( $module, $method ) { |
2679 | 2698 | $module = Jetpack::get_module_slug( $module ); |
2680 | 2699 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2682,6 +2701,9 @@ discard block |
||
2682 | 2701 | |
2683 | 2702 | /* Installation */ |
2684 | 2703 | |
2704 | + /** |
|
2705 | + * @param string $message |
|
2706 | + */ |
|
2685 | 2707 | public static function bail_on_activation( $message, $deactivate = true ) { |
2686 | 2708 | ?> |
2687 | 2709 | <!doctype html> |
@@ -3378,7 +3400,7 @@ discard block |
||
3378 | 3400 | * Add help to the Jetpack page |
3379 | 3401 | * |
3380 | 3402 | * @since Jetpack (1.2.3) |
3381 | - * @return false if not the Jetpack page |
|
3403 | + * @return false|null if not the Jetpack page |
|
3382 | 3404 | */ |
3383 | 3405 | function admin_help() { |
3384 | 3406 | $current_screen = get_current_screen(); |
@@ -4376,6 +4398,7 @@ discard block |
||
4376 | 4398 | /** |
4377 | 4399 | * Returns the requested Jetpack API URL |
4378 | 4400 | * |
4401 | + * @param string $relative_url |
|
4379 | 4402 | * @return string |
4380 | 4403 | */ |
4381 | 4404 | public static function api_url( $relative_url ) { |
@@ -4520,7 +4543,8 @@ discard block |
||
4520 | 4543 | * Note these tokens are unique per call, NOT static per site for connecting. |
4521 | 4544 | * |
4522 | 4545 | * @since 2.6 |
4523 | - * @return array |
|
4546 | + * @param string $action |
|
4547 | + * @return string |
|
4524 | 4548 | */ |
4525 | 4549 | public function generate_secrets( $action, $exp = 600 ) { |
4526 | 4550 | $secret = wp_generate_password( 32, false ) // secret_1 |
@@ -4953,7 +4977,6 @@ discard block |
||
4953 | 4977 | /** |
4954 | 4978 | * Report authentication status to the WP REST API. |
4955 | 4979 | * |
4956 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
4957 | 4980 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
4958 | 4981 | */ |
4959 | 4982 | public function wp_rest_authentication_errors( $value ) { |
@@ -4963,6 +4986,10 @@ discard block |
||
4963 | 4986 | return $this->rest_authentication_status; |
4964 | 4987 | } |
4965 | 4988 | |
4989 | + /** |
|
4990 | + * @param integer $timestamp |
|
4991 | + * @param string $nonce |
|
4992 | + */ |
|
4966 | 4993 | function add_nonce( $timestamp, $nonce ) { |
4967 | 4994 | global $wpdb; |
4968 | 4995 | static $nonces_used_this_request = array(); |
@@ -5108,6 +5135,7 @@ discard block |
||
5108 | 5135 | * @param string $key |
5109 | 5136 | * @param string $value |
5110 | 5137 | * @param bool $restate private |
5138 | + * @return string |
|
5111 | 5139 | */ |
5112 | 5140 | public static function state( $key = null, $value = null, $restate = false ) { |
5113 | 5141 | static $state = array(); |
@@ -5164,6 +5192,9 @@ discard block |
||
5164 | 5192 | Jetpack::state( null, null, true ); |
5165 | 5193 | } |
5166 | 5194 | |
5195 | + /** |
|
5196 | + * @param string $file |
|
5197 | + */ |
|
5167 | 5198 | public static function check_privacy( $file ) { |
5168 | 5199 | static $is_site_publicly_accessible = null; |
5169 | 5200 | |
@@ -5896,8 +5927,8 @@ discard block |
||
5896 | 5927 | * - Absolute URLs `http://domain.com/feh.png` |
5897 | 5928 | * - Domain root relative URLs `/feh.png` |
5898 | 5929 | * |
5899 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
5900 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
5930 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
5931 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
5901 | 5932 | * |
5902 | 5933 | * @return mixed|string |
5903 | 5934 | */ |
@@ -6188,7 +6219,7 @@ discard block |
||
6188 | 6219 | * |
6189 | 6220 | * @param string $option_name |
6190 | 6221 | * |
6191 | - * @return bool |
|
6222 | + * @return false|null |
|
6192 | 6223 | */ |
6193 | 6224 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
6194 | 6225 | // Bail if Jump Start has already been dismissed |
@@ -6279,7 +6310,6 @@ discard block |
||
6279 | 6310 | } |
6280 | 6311 | |
6281 | 6312 | /** |
6282 | - * @param mixed $result Value for the user's option |
|
6283 | 6313 | * @return mixed |
6284 | 6314 | */ |
6285 | 6315 | function get_user_option_meta_box_order_dashboard( $sorted ) { |