@@ -256,7 +256,7 @@ |
||
256 | 256 | |
257 | 257 | /** |
258 | 258 | * Check the reasons to bail before we attempt to insert ads. |
259 | - * @return true if we should bail (don't insert ads) |
|
259 | + * @return boolean if we should bail (don't insert ads) |
|
260 | 260 | * |
261 | 261 | * @since 0.1 |
262 | 262 | */ |
@@ -886,7 +886,7 @@ discard block |
||
886 | 886 | } |
887 | 887 | /** |
888 | 888 | * Does the network allow admins to add new users. |
889 | - * @return boolian |
|
889 | + * @return boolean |
|
890 | 890 | */ |
891 | 891 | static function network_add_new_users( $option = null ) { |
892 | 892 | return (bool) get_site_option( 'add_new_users' ); |
@@ -991,7 +991,7 @@ discard block |
||
991 | 991 | * database which could be set to anything as opposed to what this function returns. |
992 | 992 | * @param bool $option |
993 | 993 | * |
994 | - * @return boolean |
|
994 | + * @return string |
|
995 | 995 | */ |
996 | 996 | public function is_main_network_option( $option ) { |
997 | 997 | // return '1' or '' |
@@ -1002,7 +1002,7 @@ discard block |
||
1002 | 1002 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1003 | 1003 | * |
1004 | 1004 | * @param string $option |
1005 | - * @return boolean |
|
1005 | + * @return string |
|
1006 | 1006 | */ |
1007 | 1007 | public function is_multisite( $option ) { |
1008 | 1008 | return (string) (bool) is_multisite(); |
@@ -1064,7 +1064,7 @@ discard block |
||
1064 | 1064 | |
1065 | 1065 | /** |
1066 | 1066 | * Returns true if the site has file write access false otherwise. |
1067 | - * @return string ( '1' | '0' ) |
|
1067 | + * @return integer ( '1' | '0' ) |
|
1068 | 1068 | **/ |
1069 | 1069 | public static function file_system_write_access() { |
1070 | 1070 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -1273,6 +1273,7 @@ discard block |
||
1273 | 1273 | * @access public |
1274 | 1274 | * @static |
1275 | 1275 | * |
1276 | + * @param string $feature |
|
1276 | 1277 | * @return bool True if plan supports feature, false if not |
1277 | 1278 | */ |
1278 | 1279 | public static function active_plan_supports( $feature ) { |
@@ -1772,6 +1773,7 @@ discard block |
||
1772 | 1773 | * Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action |
1773 | 1774 | * Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted |
1774 | 1775 | * $name must be a registered option name. |
1776 | + * @param string $name |
|
1775 | 1777 | */ |
1776 | 1778 | public static function create_nonce( $name ) { |
1777 | 1779 | $secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 ); |
@@ -1829,6 +1831,7 @@ discard block |
||
1829 | 1831 | * @param int $user_id |
1830 | 1832 | * @param string $token |
1831 | 1833 | * return bool |
1834 | + * @param boolean $is_master_user |
|
1832 | 1835 | */ |
1833 | 1836 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
1834 | 1837 | // not designed for concurrent updates |
@@ -2223,6 +2226,7 @@ discard block |
||
2223 | 2226 | |
2224 | 2227 | /** |
2225 | 2228 | * Like core's get_file_data implementation, but caches the result. |
2229 | + * @param string $file |
|
2226 | 2230 | */ |
2227 | 2231 | public static function get_file_data( $file, $headers ) { |
2228 | 2232 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2251,7 +2255,7 @@ discard block |
||
2251 | 2255 | * |
2252 | 2256 | * @param string $tag Tag as it appears in each module heading. |
2253 | 2257 | * |
2254 | - * @return mixed |
|
2258 | + * @return string |
|
2255 | 2259 | */ |
2256 | 2260 | public static function translate_module_tag( $tag ) { |
2257 | 2261 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2264,7 +2268,7 @@ discard block |
||
2264 | 2268 | * |
2265 | 2269 | * @param array $modules |
2266 | 2270 | * |
2267 | - * @return string|void |
|
2271 | + * @return string |
|
2268 | 2272 | */ |
2269 | 2273 | public static function get_translated_modules( $modules ) { |
2270 | 2274 | foreach ( $modules as $index => $module ) { |
@@ -2590,6 +2594,9 @@ discard block |
||
2590 | 2594 | return self::update_active_modules( $new ); |
2591 | 2595 | } |
2592 | 2596 | |
2597 | + /** |
|
2598 | + * @param string $module |
|
2599 | + */ |
|
2593 | 2600 | public static function enable_module_configurable( $module ) { |
2594 | 2601 | $module = Jetpack::get_module_slug( $module ); |
2595 | 2602 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2600,21 +2607,33 @@ discard block |
||
2600 | 2607 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
2601 | 2608 | } |
2602 | 2609 | |
2610 | + /** |
|
2611 | + * @param string $module |
|
2612 | + */ |
|
2603 | 2613 | public static function module_configuration_load( $module, $method ) { |
2604 | 2614 | $module = Jetpack::get_module_slug( $module ); |
2605 | 2615 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
2606 | 2616 | } |
2607 | 2617 | |
2618 | + /** |
|
2619 | + * @param string $module |
|
2620 | + */ |
|
2608 | 2621 | public static function module_configuration_head( $module, $method ) { |
2609 | 2622 | $module = Jetpack::get_module_slug( $module ); |
2610 | 2623 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
2611 | 2624 | } |
2612 | 2625 | |
2626 | + /** |
|
2627 | + * @param string $module |
|
2628 | + */ |
|
2613 | 2629 | public static function module_configuration_screen( $module, $method ) { |
2614 | 2630 | $module = Jetpack::get_module_slug( $module ); |
2615 | 2631 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
2616 | 2632 | } |
2617 | 2633 | |
2634 | + /** |
|
2635 | + * @param string $module |
|
2636 | + */ |
|
2618 | 2637 | public static function module_configuration_activation_screen( $module, $method ) { |
2619 | 2638 | $module = Jetpack::get_module_slug( $module ); |
2620 | 2639 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2622,6 +2641,9 @@ discard block |
||
2622 | 2641 | |
2623 | 2642 | /* Installation */ |
2624 | 2643 | |
2644 | + /** |
|
2645 | + * @param string $message |
|
2646 | + */ |
|
2625 | 2647 | public static function bail_on_activation( $message, $deactivate = true ) { |
2626 | 2648 | ?> |
2627 | 2649 | <!doctype html> |
@@ -3266,7 +3288,7 @@ discard block |
||
3266 | 3288 | * Add help to the Jetpack page |
3267 | 3289 | * |
3268 | 3290 | * @since Jetpack (1.2.3) |
3269 | - * @return false if not the Jetpack page |
|
3291 | + * @return false|null if not the Jetpack page |
|
3270 | 3292 | */ |
3271 | 3293 | function admin_help() { |
3272 | 3294 | $current_screen = get_current_screen(); |
@@ -4264,6 +4286,7 @@ discard block |
||
4264 | 4286 | /** |
4265 | 4287 | * Returns the requested Jetpack API URL |
4266 | 4288 | * |
4289 | + * @param string $relative_url |
|
4267 | 4290 | * @return string |
4268 | 4291 | */ |
4269 | 4292 | public static function api_url( $relative_url ) { |
@@ -4408,7 +4431,8 @@ discard block |
||
4408 | 4431 | * Note these tokens are unique per call, NOT static per site for connecting. |
4409 | 4432 | * |
4410 | 4433 | * @since 2.6 |
4411 | - * @return array |
|
4434 | + * @param string $action |
|
4435 | + * @return string |
|
4412 | 4436 | */ |
4413 | 4437 | public function generate_secrets( $action, $exp = 600 ) { |
4414 | 4438 | $secret = wp_generate_password( 32, false ) // secret_1 |
@@ -4734,6 +4758,10 @@ discard block |
||
4734 | 4758 | return new WP_User( $token_details['user_id'] ); |
4735 | 4759 | } |
4736 | 4760 | |
4761 | + /** |
|
4762 | + * @param integer $timestamp |
|
4763 | + * @param string $nonce |
|
4764 | + */ |
|
4737 | 4765 | function add_nonce( $timestamp, $nonce ) { |
4738 | 4766 | global $wpdb; |
4739 | 4767 | static $nonces_used_this_request = array(); |
@@ -4879,6 +4907,7 @@ discard block |
||
4879 | 4907 | * @param string $key |
4880 | 4908 | * @param string $value |
4881 | 4909 | * @param bool $restate private |
4910 | + * @return string |
|
4882 | 4911 | */ |
4883 | 4912 | public static function state( $key = null, $value = null, $restate = false ) { |
4884 | 4913 | static $state = array(); |
@@ -4935,6 +4964,9 @@ discard block |
||
4935 | 4964 | Jetpack::state( null, null, true ); |
4936 | 4965 | } |
4937 | 4966 | |
4967 | + /** |
|
4968 | + * @param string $file |
|
4969 | + */ |
|
4938 | 4970 | public static function check_privacy( $file ) { |
4939 | 4971 | static $is_site_publicly_accessible = null; |
4940 | 4972 | |
@@ -5679,8 +5711,8 @@ discard block |
||
5679 | 5711 | * - Absolute URLs `http://domain.com/feh.png` |
5680 | 5712 | * - Domain root relative URLs `/feh.png` |
5681 | 5713 | * |
5682 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
5683 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
5714 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
5715 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
5684 | 5716 | * |
5685 | 5717 | * @return mixed|string |
5686 | 5718 | */ |
@@ -5971,7 +6003,7 @@ discard block |
||
5971 | 6003 | * |
5972 | 6004 | * @param string $option_name |
5973 | 6005 | * |
5974 | - * @return bool |
|
6006 | + * @return false|null |
|
5975 | 6007 | */ |
5976 | 6008 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
5977 | 6009 | // Bail if Jump Start has already been dismissed |
@@ -6062,7 +6094,6 @@ discard block |
||
6062 | 6094 | } |
6063 | 6095 | |
6064 | 6096 | /** |
6065 | - * @param mixed $result Value for the user's option |
|
6066 | 6097 | * @return mixed |
6067 | 6098 | */ |
6068 | 6099 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | /** |
47 | 47 | * Returns status of WordAds approval. |
48 | - * @return boolean true if site is WordAds approved |
|
48 | + * @return string true if site is WordAds approved |
|
49 | 49 | * |
50 | 50 | * @since 4.5.0 |
51 | 51 | */ |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | /** |
61 | 61 | * Returns status of WordAds active. |
62 | - * @return boolean true if ads are active on site |
|
62 | + * @return string true if ads are active on site |
|
63 | 63 | * |
64 | 64 | * @since 4.5.0 |
65 | 65 | */ |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | /** |
75 | 75 | * Returns status of WordAds house ads. |
76 | - * @return boolean true if WP.com house ads should be shown |
|
76 | + * @return string true if WP.com house ads should be shown |
|
77 | 77 | * |
78 | 78 | * @since 4.5.0 |
79 | 79 | */ |