@@ -945,7 +945,7 @@ discard block |
||
945 | 945 | } |
946 | 946 | /** |
947 | 947 | * Does the network allow admins to add new users. |
948 | - * @return boolian |
|
948 | + * @return boolean |
|
949 | 949 | */ |
950 | 950 | static function network_add_new_users( $option = null ) { |
951 | 951 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1050,7 +1050,7 @@ discard block |
||
1050 | 1050 | * database which could be set to anything as opposed to what this function returns. |
1051 | 1051 | * @param bool $option |
1052 | 1052 | * |
1053 | - * @return boolean |
|
1053 | + * @return string |
|
1054 | 1054 | */ |
1055 | 1055 | public function is_main_network_option( $option ) { |
1056 | 1056 | // return '1' or '' |
@@ -1061,7 +1061,7 @@ discard block |
||
1061 | 1061 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1062 | 1062 | * |
1063 | 1063 | * @param string $option |
1064 | - * @return boolean |
|
1064 | + * @return string |
|
1065 | 1065 | */ |
1066 | 1066 | public function is_multisite( $option ) { |
1067 | 1067 | return (string) (bool) is_multisite(); |
@@ -1123,7 +1123,7 @@ discard block |
||
1123 | 1123 | |
1124 | 1124 | /** |
1125 | 1125 | * Returns true if the site has file write access false otherwise. |
1126 | - * @return string ( '1' | '0' ) |
|
1126 | + * @return integer ( '1' | '0' ) |
|
1127 | 1127 | **/ |
1128 | 1128 | public static function file_system_write_access() { |
1129 | 1129 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -1362,6 +1362,7 @@ discard block |
||
1362 | 1362 | * @access public |
1363 | 1363 | * @static |
1364 | 1364 | * |
1365 | + * @param string $feature |
|
1365 | 1366 | * @return bool True if plan supports feature, false if not |
1366 | 1367 | */ |
1367 | 1368 | public static function active_plan_supports( $feature ) { |
@@ -1861,6 +1862,7 @@ discard block |
||
1861 | 1862 | * Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action |
1862 | 1863 | * Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted |
1863 | 1864 | * $name must be a registered option name. |
1865 | + * @param string $name |
|
1864 | 1866 | */ |
1865 | 1867 | public static function create_nonce( $name ) { |
1866 | 1868 | $secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 ); |
@@ -1918,6 +1920,7 @@ discard block |
||
1918 | 1920 | * @param int $user_id |
1919 | 1921 | * @param string $token |
1920 | 1922 | * return bool |
1923 | + * @param boolean $is_master_user |
|
1921 | 1924 | */ |
1922 | 1925 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
1923 | 1926 | // not designed for concurrent updates |
@@ -2312,6 +2315,7 @@ discard block |
||
2312 | 2315 | |
2313 | 2316 | /** |
2314 | 2317 | * Like core's get_file_data implementation, but caches the result. |
2318 | + * @param string $file |
|
2315 | 2319 | */ |
2316 | 2320 | public static function get_file_data( $file, $headers ) { |
2317 | 2321 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2357,7 +2361,7 @@ discard block |
||
2357 | 2361 | * |
2358 | 2362 | * @param string $tag Tag as it appears in each module heading. |
2359 | 2363 | * |
2360 | - * @return mixed |
|
2364 | + * @return string |
|
2361 | 2365 | */ |
2362 | 2366 | public static function translate_module_tag( $tag ) { |
2363 | 2367 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2370,7 +2374,7 @@ discard block |
||
2370 | 2374 | * |
2371 | 2375 | * @param array $modules |
2372 | 2376 | * |
2373 | - * @return string|void |
|
2377 | + * @return string |
|
2374 | 2378 | */ |
2375 | 2379 | public static function get_translated_modules( $modules ) { |
2376 | 2380 | foreach ( $modules as $index => $module ) { |
@@ -2460,8 +2464,8 @@ discard block |
||
2460 | 2464 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2461 | 2465 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2462 | 2466 | * |
2463 | - * @param $string |
|
2464 | - * @return mixed |
|
2467 | + * @param string $string |
|
2468 | + * @return string|null |
|
2465 | 2469 | */ |
2466 | 2470 | public static function alias_directories( $string ) { |
2467 | 2471 | // ABSPATH has a trailing slash. |
@@ -2716,6 +2720,9 @@ discard block |
||
2716 | 2720 | return self::update_active_modules( $new ); |
2717 | 2721 | } |
2718 | 2722 | |
2723 | + /** |
|
2724 | + * @param string $module |
|
2725 | + */ |
|
2719 | 2726 | public static function enable_module_configurable( $module ) { |
2720 | 2727 | $module = Jetpack::get_module_slug( $module ); |
2721 | 2728 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2726,16 +2733,25 @@ discard block |
||
2726 | 2733 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
2727 | 2734 | } |
2728 | 2735 | |
2736 | + /** |
|
2737 | + * @param string $module |
|
2738 | + */ |
|
2729 | 2739 | public static function module_configuration_load( $module, $method ) { |
2730 | 2740 | $module = Jetpack::get_module_slug( $module ); |
2731 | 2741 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
2732 | 2742 | } |
2733 | 2743 | |
2744 | + /** |
|
2745 | + * @param string $module |
|
2746 | + */ |
|
2734 | 2747 | public static function module_configuration_head( $module, $method ) { |
2735 | 2748 | $module = Jetpack::get_module_slug( $module ); |
2736 | 2749 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
2737 | 2750 | } |
2738 | 2751 | |
2752 | + /** |
|
2753 | + * @param string $module |
|
2754 | + */ |
|
2739 | 2755 | public static function module_configuration_screen( $module, $method ) { |
2740 | 2756 | $module = Jetpack::get_module_slug( $module ); |
2741 | 2757 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
@@ -2748,6 +2764,9 @@ discard block |
||
2748 | 2764 | |
2749 | 2765 | /* Installation */ |
2750 | 2766 | |
2767 | + /** |
|
2768 | + * @param string $message |
|
2769 | + */ |
|
2751 | 2770 | public static function bail_on_activation( $message, $deactivate = true ) { |
2752 | 2771 | ?> |
2753 | 2772 | <!doctype html> |
@@ -3427,7 +3446,7 @@ discard block |
||
3427 | 3446 | * Add help to the Jetpack page |
3428 | 3447 | * |
3429 | 3448 | * @since Jetpack (1.2.3) |
3430 | - * @return false if not the Jetpack page |
|
3449 | + * @return false|null if not the Jetpack page |
|
3431 | 3450 | */ |
3432 | 3451 | function admin_help() { |
3433 | 3452 | $current_screen = get_current_screen(); |
@@ -4277,6 +4296,7 @@ discard block |
||
4277 | 4296 | /** |
4278 | 4297 | * Returns the requested Jetpack API URL |
4279 | 4298 | * |
4299 | + * @param string $relative_url |
|
4280 | 4300 | * @return string |
4281 | 4301 | */ |
4282 | 4302 | public static function api_url( $relative_url ) { |
@@ -4421,7 +4441,8 @@ discard block |
||
4421 | 4441 | * Note these tokens are unique per call, NOT static per site for connecting. |
4422 | 4442 | * |
4423 | 4443 | * @since 2.6 |
4424 | - * @return array |
|
4444 | + * @param string $action |
|
4445 | + * @return string |
|
4425 | 4446 | */ |
4426 | 4447 | public function generate_secrets( $action, $exp = 600 ) { |
4427 | 4448 | $secret = wp_generate_password( 32, false ) // secret_1 |
@@ -4854,7 +4875,6 @@ discard block |
||
4854 | 4875 | /** |
4855 | 4876 | * Report authentication status to the WP REST API. |
4856 | 4877 | * |
4857 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
4858 | 4878 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
4859 | 4879 | */ |
4860 | 4880 | public function wp_rest_authentication_errors( $value ) { |
@@ -4864,6 +4884,10 @@ discard block |
||
4864 | 4884 | return $this->rest_authentication_status; |
4865 | 4885 | } |
4866 | 4886 | |
4887 | + /** |
|
4888 | + * @param integer $timestamp |
|
4889 | + * @param string $nonce |
|
4890 | + */ |
|
4867 | 4891 | function add_nonce( $timestamp, $nonce ) { |
4868 | 4892 | global $wpdb; |
4869 | 4893 | static $nonces_used_this_request = array(); |
@@ -5009,6 +5033,7 @@ discard block |
||
5009 | 5033 | * @param string $key |
5010 | 5034 | * @param string $value |
5011 | 5035 | * @param bool $restate private |
5036 | + * @return string |
|
5012 | 5037 | */ |
5013 | 5038 | public static function state( $key = null, $value = null, $restate = false ) { |
5014 | 5039 | static $state = array(); |
@@ -5065,6 +5090,9 @@ discard block |
||
5065 | 5090 | Jetpack::state( null, null, true ); |
5066 | 5091 | } |
5067 | 5092 | |
5093 | + /** |
|
5094 | + * @param string $file |
|
5095 | + */ |
|
5068 | 5096 | public static function check_privacy( $file ) { |
5069 | 5097 | static $is_site_publicly_accessible = null; |
5070 | 5098 | |
@@ -5797,8 +5825,8 @@ discard block |
||
5797 | 5825 | * - Absolute URLs `http://domain.com/feh.png` |
5798 | 5826 | * - Domain root relative URLs `/feh.png` |
5799 | 5827 | * |
5800 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
5801 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
5828 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
5829 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
5802 | 5830 | * |
5803 | 5831 | * @return mixed|string |
5804 | 5832 | */ |
@@ -6089,7 +6117,7 @@ discard block |
||
6089 | 6117 | * |
6090 | 6118 | * @param string $option_name |
6091 | 6119 | * |
6092 | - * @return bool |
|
6120 | + * @return false|null |
|
6093 | 6121 | */ |
6094 | 6122 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
6095 | 6123 | // Bail if Jump Start has already been dismissed |
@@ -6180,7 +6208,6 @@ discard block |
||
6180 | 6208 | } |
6181 | 6209 | |
6182 | 6210 | /** |
6183 | - * @param mixed $result Value for the user's option |
|
6184 | 6211 | * @return mixed |
6185 | 6212 | */ |
6186 | 6213 | function get_user_option_meta_box_order_dashboard( $sorted ) { |