@@ -979,7 +979,7 @@ discard block |
||
| 979 | 979 | } |
| 980 | 980 | /** |
| 981 | 981 | * Does the network allow admins to add new users. |
| 982 | - * @return boolian |
|
| 982 | + * @return boolean |
|
| 983 | 983 | */ |
| 984 | 984 | static function network_add_new_users( $option = null ) { |
| 985 | 985 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1084,7 +1084,7 @@ discard block |
||
| 1084 | 1084 | * database which could be set to anything as opposed to what this function returns. |
| 1085 | 1085 | * @param bool $option |
| 1086 | 1086 | * |
| 1087 | - * @return boolean |
|
| 1087 | + * @return string |
|
| 1088 | 1088 | */ |
| 1089 | 1089 | public function is_main_network_option( $option ) { |
| 1090 | 1090 | // return '1' or '' |
@@ -1095,7 +1095,7 @@ discard block |
||
| 1095 | 1095 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1096 | 1096 | * |
| 1097 | 1097 | * @param string $option |
| 1098 | - * @return boolean |
|
| 1098 | + * @return string |
|
| 1099 | 1099 | */ |
| 1100 | 1100 | public function is_multisite( $option ) { |
| 1101 | 1101 | return (string) (bool) is_multisite(); |
@@ -1157,7 +1157,7 @@ discard block |
||
| 1157 | 1157 | |
| 1158 | 1158 | /** |
| 1159 | 1159 | * Returns true if the site has file write access false otherwise. |
| 1160 | - * @return string ( '1' | '0' ) |
|
| 1160 | + * @return integer ( '1' | '0' ) |
|
| 1161 | 1161 | **/ |
| 1162 | 1162 | public static function file_system_write_access() { |
| 1163 | 1163 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -1393,6 +1393,7 @@ discard block |
||
| 1393 | 1393 | * @access public |
| 1394 | 1394 | * @static |
| 1395 | 1395 | * |
| 1396 | + * @param string $feature |
|
| 1396 | 1397 | * @return bool True if plan supports feature, false if not |
| 1397 | 1398 | */ |
| 1398 | 1399 | public static function active_plan_supports( $feature ) { |
@@ -1891,6 +1892,7 @@ discard block |
||
| 1891 | 1892 | * Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action |
| 1892 | 1893 | * Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted |
| 1893 | 1894 | * $name must be a registered option name. |
| 1895 | + * @param string $name |
|
| 1894 | 1896 | */ |
| 1895 | 1897 | public static function create_nonce( $name ) { |
| 1896 | 1898 | $secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 ); |
@@ -1948,6 +1950,7 @@ discard block |
||
| 1948 | 1950 | * @param int $user_id |
| 1949 | 1951 | * @param string $token |
| 1950 | 1952 | * return bool |
| 1953 | + * @param boolean $is_master_user |
|
| 1951 | 1954 | */ |
| 1952 | 1955 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
| 1953 | 1956 | // not designed for concurrent updates |
@@ -2342,6 +2345,7 @@ discard block |
||
| 2342 | 2345 | |
| 2343 | 2346 | /** |
| 2344 | 2347 | * Like core's get_file_data implementation, but caches the result. |
| 2348 | + * @param string $file |
|
| 2345 | 2349 | */ |
| 2346 | 2350 | public static function get_file_data( $file, $headers ) { |
| 2347 | 2351 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2370,7 +2374,7 @@ discard block |
||
| 2370 | 2374 | * |
| 2371 | 2375 | * @param string $tag Tag as it appears in each module heading. |
| 2372 | 2376 | * |
| 2373 | - * @return mixed |
|
| 2377 | + * @return string |
|
| 2374 | 2378 | */ |
| 2375 | 2379 | public static function translate_module_tag( $tag ) { |
| 2376 | 2380 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2383,7 +2387,7 @@ discard block |
||
| 2383 | 2387 | * |
| 2384 | 2388 | * @param array $modules |
| 2385 | 2389 | * |
| 2386 | - * @return string|void |
|
| 2390 | + * @return string |
|
| 2387 | 2391 | */ |
| 2388 | 2392 | public static function get_translated_modules( $modules ) { |
| 2389 | 2393 | foreach ( $modules as $index => $module ) { |
@@ -2473,8 +2477,8 @@ discard block |
||
| 2473 | 2477 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
| 2474 | 2478 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
| 2475 | 2479 | * |
| 2476 | - * @param $string |
|
| 2477 | - * @return mixed |
|
| 2480 | + * @param string $string |
|
| 2481 | + * @return string|null |
|
| 2478 | 2482 | */ |
| 2479 | 2483 | public static function alias_directories( $string ) { |
| 2480 | 2484 | // ABSPATH has a trailing slash. |
@@ -2729,6 +2733,9 @@ discard block |
||
| 2729 | 2733 | return self::update_active_modules( $new ); |
| 2730 | 2734 | } |
| 2731 | 2735 | |
| 2736 | + /** |
|
| 2737 | + * @param string $module |
|
| 2738 | + */ |
|
| 2732 | 2739 | public static function enable_module_configurable( $module ) { |
| 2733 | 2740 | $module = Jetpack::get_module_slug( $module ); |
| 2734 | 2741 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2739,21 +2746,33 @@ discard block |
||
| 2739 | 2746 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
| 2740 | 2747 | } |
| 2741 | 2748 | |
| 2749 | + /** |
|
| 2750 | + * @param string $module |
|
| 2751 | + */ |
|
| 2742 | 2752 | public static function module_configuration_load( $module, $method ) { |
| 2743 | 2753 | $module = Jetpack::get_module_slug( $module ); |
| 2744 | 2754 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
| 2745 | 2755 | } |
| 2746 | 2756 | |
| 2757 | + /** |
|
| 2758 | + * @param string $module |
|
| 2759 | + */ |
|
| 2747 | 2760 | public static function module_configuration_head( $module, $method ) { |
| 2748 | 2761 | $module = Jetpack::get_module_slug( $module ); |
| 2749 | 2762 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
| 2750 | 2763 | } |
| 2751 | 2764 | |
| 2765 | + /** |
|
| 2766 | + * @param string $module |
|
| 2767 | + */ |
|
| 2752 | 2768 | public static function module_configuration_screen( $module, $method ) { |
| 2753 | 2769 | $module = Jetpack::get_module_slug( $module ); |
| 2754 | 2770 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
| 2755 | 2771 | } |
| 2756 | 2772 | |
| 2773 | + /** |
|
| 2774 | + * @param string $module |
|
| 2775 | + */ |
|
| 2757 | 2776 | public static function module_configuration_activation_screen( $module, $method ) { |
| 2758 | 2777 | $module = Jetpack::get_module_slug( $module ); |
| 2759 | 2778 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2761,6 +2780,9 @@ discard block |
||
| 2761 | 2780 | |
| 2762 | 2781 | /* Installation */ |
| 2763 | 2782 | |
| 2783 | + /** |
|
| 2784 | + * @param string $message |
|
| 2785 | + */ |
|
| 2764 | 2786 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 2765 | 2787 | ?> |
| 2766 | 2788 | <!doctype html> |
@@ -3457,7 +3479,7 @@ discard block |
||
| 3457 | 3479 | * Add help to the Jetpack page |
| 3458 | 3480 | * |
| 3459 | 3481 | * @since Jetpack (1.2.3) |
| 3460 | - * @return false if not the Jetpack page |
|
| 3482 | + * @return false|null if not the Jetpack page |
|
| 3461 | 3483 | */ |
| 3462 | 3484 | function admin_help() { |
| 3463 | 3485 | $current_screen = get_current_screen(); |
@@ -4455,6 +4477,7 @@ discard block |
||
| 4455 | 4477 | /** |
| 4456 | 4478 | * Returns the requested Jetpack API URL |
| 4457 | 4479 | * |
| 4480 | + * @param string $relative_url |
|
| 4458 | 4481 | * @return string |
| 4459 | 4482 | */ |
| 4460 | 4483 | public static function api_url( $relative_url ) { |
@@ -4599,7 +4622,8 @@ discard block |
||
| 4599 | 4622 | * Note these tokens are unique per call, NOT static per site for connecting. |
| 4600 | 4623 | * |
| 4601 | 4624 | * @since 2.6 |
| 4602 | - * @return array |
|
| 4625 | + * @param string $action |
|
| 4626 | + * @return string |
|
| 4603 | 4627 | */ |
| 4604 | 4628 | public function generate_secrets( $action, $exp = 600 ) { |
| 4605 | 4629 | $secret = wp_generate_password( 32, false ) // secret_1 |
@@ -5032,7 +5056,6 @@ discard block |
||
| 5032 | 5056 | /** |
| 5033 | 5057 | * Report authentication status to the WP REST API. |
| 5034 | 5058 | * |
| 5035 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
| 5036 | 5059 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
| 5037 | 5060 | */ |
| 5038 | 5061 | public function wp_rest_authentication_errors( $value ) { |
@@ -5042,6 +5065,10 @@ discard block |
||
| 5042 | 5065 | return $this->rest_authentication_status; |
| 5043 | 5066 | } |
| 5044 | 5067 | |
| 5068 | + /** |
|
| 5069 | + * @param integer $timestamp |
|
| 5070 | + * @param string $nonce |
|
| 5071 | + */ |
|
| 5045 | 5072 | function add_nonce( $timestamp, $nonce ) { |
| 5046 | 5073 | global $wpdb; |
| 5047 | 5074 | static $nonces_used_this_request = array(); |
@@ -5187,6 +5214,7 @@ discard block |
||
| 5187 | 5214 | * @param string $key |
| 5188 | 5215 | * @param string $value |
| 5189 | 5216 | * @param bool $restate private |
| 5217 | + * @return string |
|
| 5190 | 5218 | */ |
| 5191 | 5219 | public static function state( $key = null, $value = null, $restate = false ) { |
| 5192 | 5220 | static $state = array(); |
@@ -5243,6 +5271,9 @@ discard block |
||
| 5243 | 5271 | Jetpack::state( null, null, true ); |
| 5244 | 5272 | } |
| 5245 | 5273 | |
| 5274 | + /** |
|
| 5275 | + * @param string $file |
|
| 5276 | + */ |
|
| 5246 | 5277 | public static function check_privacy( $file ) { |
| 5247 | 5278 | static $is_site_publicly_accessible = null; |
| 5248 | 5279 | |
@@ -5975,8 +6006,8 @@ discard block |
||
| 5975 | 6006 | * - Absolute URLs `http://domain.com/feh.png` |
| 5976 | 6007 | * - Domain root relative URLs `/feh.png` |
| 5977 | 6008 | * |
| 5978 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 5979 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6009 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 6010 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 5980 | 6011 | * |
| 5981 | 6012 | * @return mixed|string |
| 5982 | 6013 | */ |
@@ -6267,7 +6298,7 @@ discard block |
||
| 6267 | 6298 | * |
| 6268 | 6299 | * @param string $option_name |
| 6269 | 6300 | * |
| 6270 | - * @return bool |
|
| 6301 | + * @return false|null |
|
| 6271 | 6302 | */ |
| 6272 | 6303 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
| 6273 | 6304 | // Bail if Jump Start has already been dismissed |
@@ -6358,7 +6389,6 @@ discard block |
||
| 6358 | 6389 | } |
| 6359 | 6390 | |
| 6360 | 6391 | /** |
| 6361 | - * @param mixed $result Value for the user's option |
|
| 6362 | 6392 | * @return mixed |
| 6363 | 6393 | */ |
| 6364 | 6394 | function get_user_option_meta_box_order_dashboard( $sorted ) { |