@@ -951,7 +951,7 @@ discard block |
||
| 951 | 951 | } |
| 952 | 952 | /** |
| 953 | 953 | * Does the network allow admins to add new users. |
| 954 | - * @return boolian |
|
| 954 | + * @return boolean |
|
| 955 | 955 | */ |
| 956 | 956 | static function network_add_new_users( $option = null ) { |
| 957 | 957 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1056,7 +1056,7 @@ discard block |
||
| 1056 | 1056 | * database which could be set to anything as opposed to what this function returns. |
| 1057 | 1057 | * @param bool $option |
| 1058 | 1058 | * |
| 1059 | - * @return boolean |
|
| 1059 | + * @return string |
|
| 1060 | 1060 | */ |
| 1061 | 1061 | public function is_main_network_option( $option ) { |
| 1062 | 1062 | // return '1' or '' |
@@ -1067,7 +1067,7 @@ discard block |
||
| 1067 | 1067 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1068 | 1068 | * |
| 1069 | 1069 | * @param string $option |
| 1070 | - * @return boolean |
|
| 1070 | + * @return string |
|
| 1071 | 1071 | */ |
| 1072 | 1072 | public function is_multisite( $option ) { |
| 1073 | 1073 | return (string) (bool) is_multisite(); |
@@ -1129,7 +1129,7 @@ discard block |
||
| 1129 | 1129 | |
| 1130 | 1130 | /** |
| 1131 | 1131 | * Returns true if the site has file write access false otherwise. |
| 1132 | - * @return string ( '1' | '0' ) |
|
| 1132 | + * @return integer ( '1' | '0' ) |
|
| 1133 | 1133 | **/ |
| 1134 | 1134 | public static function file_system_write_access() { |
| 1135 | 1135 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -1368,6 +1368,7 @@ discard block |
||
| 1368 | 1368 | * @access public |
| 1369 | 1369 | * @static |
| 1370 | 1370 | * |
| 1371 | + * @param string $feature |
|
| 1371 | 1372 | * @return bool True if plan supports feature, false if not |
| 1372 | 1373 | */ |
| 1373 | 1374 | public static function active_plan_supports( $feature ) { |
@@ -1904,6 +1905,7 @@ discard block |
||
| 1904 | 1905 | * @param int $user_id |
| 1905 | 1906 | * @param string $token |
| 1906 | 1907 | * return bool |
| 1908 | + * @param boolean $is_master_user |
|
| 1907 | 1909 | */ |
| 1908 | 1910 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
| 1909 | 1911 | // not designed for concurrent updates |
@@ -2298,6 +2300,7 @@ discard block |
||
| 2298 | 2300 | |
| 2299 | 2301 | /** |
| 2300 | 2302 | * Like core's get_file_data implementation, but caches the result. |
| 2303 | + * @param string $file |
|
| 2301 | 2304 | */ |
| 2302 | 2305 | public static function get_file_data( $file, $headers ) { |
| 2303 | 2306 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2343,7 +2346,7 @@ discard block |
||
| 2343 | 2346 | * |
| 2344 | 2347 | * @param string $tag Tag as it appears in each module heading. |
| 2345 | 2348 | * |
| 2346 | - * @return mixed |
|
| 2349 | + * @return string |
|
| 2347 | 2350 | */ |
| 2348 | 2351 | public static function translate_module_tag( $tag ) { |
| 2349 | 2352 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2356,7 +2359,7 @@ discard block |
||
| 2356 | 2359 | * |
| 2357 | 2360 | * @param array $modules |
| 2358 | 2361 | * |
| 2359 | - * @return string|void |
|
| 2362 | + * @return string |
|
| 2360 | 2363 | */ |
| 2361 | 2364 | public static function get_translated_modules( $modules ) { |
| 2362 | 2365 | foreach ( $modules as $index => $module ) { |
@@ -2446,8 +2449,8 @@ discard block |
||
| 2446 | 2449 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
| 2447 | 2450 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
| 2448 | 2451 | * |
| 2449 | - * @param $string |
|
| 2450 | - * @return mixed |
|
| 2452 | + * @param string $string |
|
| 2453 | + * @return string|null |
|
| 2451 | 2454 | */ |
| 2452 | 2455 | public static function alias_directories( $string ) { |
| 2453 | 2456 | // ABSPATH has a trailing slash. |
@@ -2702,6 +2705,9 @@ discard block |
||
| 2702 | 2705 | return self::update_active_modules( $new ); |
| 2703 | 2706 | } |
| 2704 | 2707 | |
| 2708 | + /** |
|
| 2709 | + * @param string $module |
|
| 2710 | + */ |
|
| 2705 | 2711 | public static function enable_module_configurable( $module ) { |
| 2706 | 2712 | $module = Jetpack::get_module_slug( $module ); |
| 2707 | 2713 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2712,21 +2718,33 @@ discard block |
||
| 2712 | 2718 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
| 2713 | 2719 | } |
| 2714 | 2720 | |
| 2721 | + /** |
|
| 2722 | + * @param string $module |
|
| 2723 | + */ |
|
| 2715 | 2724 | public static function module_configuration_load( $module, $method ) { |
| 2716 | 2725 | $module = Jetpack::get_module_slug( $module ); |
| 2717 | 2726 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
| 2718 | 2727 | } |
| 2719 | 2728 | |
| 2729 | + /** |
|
| 2730 | + * @param string $module |
|
| 2731 | + */ |
|
| 2720 | 2732 | public static function module_configuration_head( $module, $method ) { |
| 2721 | 2733 | $module = Jetpack::get_module_slug( $module ); |
| 2722 | 2734 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
| 2723 | 2735 | } |
| 2724 | 2736 | |
| 2737 | + /** |
|
| 2738 | + * @param string $module |
|
| 2739 | + */ |
|
| 2725 | 2740 | public static function module_configuration_screen( $module, $method ) { |
| 2726 | 2741 | $module = Jetpack::get_module_slug( $module ); |
| 2727 | 2742 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
| 2728 | 2743 | } |
| 2729 | 2744 | |
| 2745 | + /** |
|
| 2746 | + * @param string $module |
|
| 2747 | + */ |
|
| 2730 | 2748 | public static function module_configuration_activation_screen( $module, $method ) { |
| 2731 | 2749 | $module = Jetpack::get_module_slug( $module ); |
| 2732 | 2750 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2734,6 +2752,9 @@ discard block |
||
| 2734 | 2752 | |
| 2735 | 2753 | /* Installation */ |
| 2736 | 2754 | |
| 2755 | + /** |
|
| 2756 | + * @param string $message |
|
| 2757 | + */ |
|
| 2737 | 2758 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 2738 | 2759 | ?> |
| 2739 | 2760 | <!doctype html> |
@@ -3433,7 +3454,7 @@ discard block |
||
| 3433 | 3454 | * Add help to the Jetpack page |
| 3434 | 3455 | * |
| 3435 | 3456 | * @since Jetpack (1.2.3) |
| 3436 | - * @return false if not the Jetpack page |
|
| 3457 | + * @return false|null if not the Jetpack page |
|
| 3437 | 3458 | */ |
| 3438 | 3459 | function admin_help() { |
| 3439 | 3460 | $current_screen = get_current_screen(); |
@@ -4448,6 +4469,7 @@ discard block |
||
| 4448 | 4469 | /** |
| 4449 | 4470 | * Returns the requested Jetpack API URL |
| 4450 | 4471 | * |
| 4472 | + * @param string $relative_url |
|
| 4451 | 4473 | * @return string |
| 4452 | 4474 | */ |
| 4453 | 4475 | public static function api_url( $relative_url ) { |
@@ -4592,7 +4614,8 @@ discard block |
||
| 4592 | 4614 | * Note these tokens are unique per call, NOT static per site for connecting. |
| 4593 | 4615 | * |
| 4594 | 4616 | * @since 2.6 |
| 4595 | - * @return array |
|
| 4617 | + * @param string $action |
|
| 4618 | + * @return boolean |
|
| 4596 | 4619 | */ |
| 4597 | 4620 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
| 4598 | 4621 | if ( ! $user_id ) { |
@@ -5071,7 +5094,6 @@ discard block |
||
| 5071 | 5094 | /** |
| 5072 | 5095 | * Report authentication status to the WP REST API. |
| 5073 | 5096 | * |
| 5074 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
| 5075 | 5097 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
| 5076 | 5098 | */ |
| 5077 | 5099 | public function wp_rest_authentication_errors( $value ) { |
@@ -5081,6 +5103,10 @@ discard block |
||
| 5081 | 5103 | return $this->rest_authentication_status; |
| 5082 | 5104 | } |
| 5083 | 5105 | |
| 5106 | + /** |
|
| 5107 | + * @param integer $timestamp |
|
| 5108 | + * @param string $nonce |
|
| 5109 | + */ |
|
| 5084 | 5110 | function add_nonce( $timestamp, $nonce ) { |
| 5085 | 5111 | global $wpdb; |
| 5086 | 5112 | static $nonces_used_this_request = array(); |
@@ -5226,6 +5252,7 @@ discard block |
||
| 5226 | 5252 | * @param string $key |
| 5227 | 5253 | * @param string $value |
| 5228 | 5254 | * @param bool $restate private |
| 5255 | + * @return string |
|
| 5229 | 5256 | */ |
| 5230 | 5257 | public static function state( $key = null, $value = null, $restate = false ) { |
| 5231 | 5258 | if ( XMLRPC_REQUEST ) { |
@@ -5285,6 +5312,9 @@ discard block |
||
| 5285 | 5312 | Jetpack::state( null, null, true ); |
| 5286 | 5313 | } |
| 5287 | 5314 | |
| 5315 | + /** |
|
| 5316 | + * @param string $file |
|
| 5317 | + */ |
|
| 5288 | 5318 | public static function check_privacy( $file ) { |
| 5289 | 5319 | static $is_site_publicly_accessible = null; |
| 5290 | 5320 | |
@@ -6018,8 +6048,8 @@ discard block |
||
| 6018 | 6048 | * - Absolute URLs `http://domain.com/feh.png` |
| 6019 | 6049 | * - Domain root relative URLs `/feh.png` |
| 6020 | 6050 | * |
| 6021 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 6022 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6051 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 6052 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6023 | 6053 | * |
| 6024 | 6054 | * @return mixed|string |
| 6025 | 6055 | */ |
@@ -6310,7 +6340,7 @@ discard block |
||
| 6310 | 6340 | * |
| 6311 | 6341 | * @param string $option_name |
| 6312 | 6342 | * |
| 6313 | - * @return bool |
|
| 6343 | + * @return false|null |
|
| 6314 | 6344 | */ |
| 6315 | 6345 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
| 6316 | 6346 | // Bail if Jump Start has already been dismissed |
@@ -6401,7 +6431,6 @@ discard block |
||
| 6401 | 6431 | } |
| 6402 | 6432 | |
| 6403 | 6433 | /** |
| 6404 | - * @param mixed $result Value for the user's option |
|
| 6405 | 6434 | * @return mixed |
| 6406 | 6435 | */ |
| 6407 | 6436 | function get_user_option_meta_box_order_dashboard( $sorted ) { |