@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | } |
877 | 877 | /** |
878 | 878 | * Does the network allow admins to add new users. |
879 | - * @return boolian |
|
879 | + * @return boolean |
|
880 | 880 | */ |
881 | 881 | static function network_add_new_users( $option = null ) { |
882 | 882 | return (bool) get_site_option( 'add_new_users' ); |
@@ -976,7 +976,7 @@ discard block |
||
976 | 976 | * database which could be set to anything as opposed to what this function returns. |
977 | 977 | * @param bool $option |
978 | 978 | * |
979 | - * @return boolean |
|
979 | + * @return string |
|
980 | 980 | */ |
981 | 981 | public function is_main_network_option( $option ) { |
982 | 982 | // return '1' or '' |
@@ -987,7 +987,7 @@ discard block |
||
987 | 987 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
988 | 988 | * |
989 | 989 | * @param string $option |
990 | - * @return boolean |
|
990 | + * @return string |
|
991 | 991 | */ |
992 | 992 | public function is_multisite( $option ) { |
993 | 993 | return (string) (bool) is_multisite(); |
@@ -1045,7 +1045,7 @@ discard block |
||
1045 | 1045 | |
1046 | 1046 | /** |
1047 | 1047 | * Returns true if the site has file write access false otherwise. |
1048 | - * @return string ( '1' | '0' ) |
|
1048 | + * @return integer ( '1' | '0' ) |
|
1049 | 1049 | **/ |
1050 | 1050 | public static function file_system_write_access() { |
1051 | 1051 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -1619,7 +1619,7 @@ discard block |
||
1619 | 1619 | * Returns the requested option. Looks in jetpack_options or jetpack_$name as appropriate. |
1620 | 1620 | * |
1621 | 1621 | * @param string $name Option name |
1622 | - * @param mixed $default (optional) |
|
1622 | + * @param boolean $default (optional) |
|
1623 | 1623 | */ |
1624 | 1624 | public static function get_option( $name, $default = false ) { |
1625 | 1625 | return Jetpack_Options::get_option( $name, $default ); |
@@ -1629,6 +1629,7 @@ discard block |
||
1629 | 1629 | * Stores two secrets and a timestamp so WordPress.com can make a request back and verify an action |
1630 | 1630 | * Does some extra verification so urls (such as those to public-api, register, etc) can't just be crafted |
1631 | 1631 | * $name must be a registered option name. |
1632 | + * @param string $name |
|
1632 | 1633 | */ |
1633 | 1634 | public static function create_nonce( $name ) { |
1634 | 1635 | $secret = wp_generate_password( 32, false ) . ':' . wp_generate_password( 32, false ) . ':' . ( time() + 600 ); |
@@ -1686,6 +1687,7 @@ discard block |
||
1686 | 1687 | * @param int $user_id |
1687 | 1688 | * @param string $token |
1688 | 1689 | * return bool |
1690 | + * @param boolean $is_master_user |
|
1689 | 1691 | */ |
1690 | 1692 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
1691 | 1693 | // not designed for concurrent updates |
@@ -2080,6 +2082,7 @@ discard block |
||
2080 | 2082 | |
2081 | 2083 | /** |
2082 | 2084 | * Like core's get_file_data implementation, but caches the result. |
2085 | + * @param string $file |
|
2083 | 2086 | */ |
2084 | 2087 | public static function get_file_data( $file, $headers ) { |
2085 | 2088 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2108,7 +2111,7 @@ discard block |
||
2108 | 2111 | * |
2109 | 2112 | * @param string $tag Tag as it appears in each module heading. |
2110 | 2113 | * |
2111 | - * @return mixed |
|
2114 | + * @return string |
|
2112 | 2115 | */ |
2113 | 2116 | public static function translate_module_tag( $tag ) { |
2114 | 2117 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2121,7 +2124,7 @@ discard block |
||
2121 | 2124 | * |
2122 | 2125 | * @param array $modules |
2123 | 2126 | * |
2124 | - * @return string|void |
|
2127 | + * @return string |
|
2125 | 2128 | */ |
2126 | 2129 | public static function get_translated_modules( $modules ) { |
2127 | 2130 | foreach ( $modules as $index => $module ) { |
@@ -2409,6 +2412,9 @@ discard block |
||
2409 | 2412 | _deprecated_function( __METHOD__, 'jeptack-4.2' ); |
2410 | 2413 | } |
2411 | 2414 | |
2415 | + /** |
|
2416 | + * @return string |
|
2417 | + */ |
|
2412 | 2418 | public static function deactivate_module( $module ) { |
2413 | 2419 | /** |
2414 | 2420 | * Fires when a module is deactivated. |
@@ -2437,6 +2443,9 @@ discard block |
||
2437 | 2443 | return self::update_active_modules( $new ); |
2438 | 2444 | } |
2439 | 2445 | |
2446 | + /** |
|
2447 | + * @param string $module |
|
2448 | + */ |
|
2440 | 2449 | public static function enable_module_configurable( $module ) { |
2441 | 2450 | $module = Jetpack::get_module_slug( $module ); |
2442 | 2451 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2447,21 +2456,33 @@ discard block |
||
2447 | 2456 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
2448 | 2457 | } |
2449 | 2458 | |
2459 | + /** |
|
2460 | + * @param string $module |
|
2461 | + */ |
|
2450 | 2462 | public static function module_configuration_load( $module, $method ) { |
2451 | 2463 | $module = Jetpack::get_module_slug( $module ); |
2452 | 2464 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
2453 | 2465 | } |
2454 | 2466 | |
2467 | + /** |
|
2468 | + * @param string $module |
|
2469 | + */ |
|
2455 | 2470 | public static function module_configuration_head( $module, $method ) { |
2456 | 2471 | $module = Jetpack::get_module_slug( $module ); |
2457 | 2472 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
2458 | 2473 | } |
2459 | 2474 | |
2475 | + /** |
|
2476 | + * @param string $module |
|
2477 | + */ |
|
2460 | 2478 | public static function module_configuration_screen( $module, $method ) { |
2461 | 2479 | $module = Jetpack::get_module_slug( $module ); |
2462 | 2480 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
2463 | 2481 | } |
2464 | 2482 | |
2483 | + /** |
|
2484 | + * @param string $module |
|
2485 | + */ |
|
2465 | 2486 | public static function module_configuration_activation_screen( $module, $method ) { |
2466 | 2487 | $module = Jetpack::get_module_slug( $module ); |
2467 | 2488 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2469,6 +2490,9 @@ discard block |
||
2469 | 2490 | |
2470 | 2491 | /* Installation */ |
2471 | 2492 | |
2493 | + /** |
|
2494 | + * @param string $message |
|
2495 | + */ |
|
2472 | 2496 | public static function bail_on_activation( $message, $deactivate = true ) { |
2473 | 2497 | ?> |
2474 | 2498 | <!doctype html> |
@@ -3102,7 +3126,7 @@ discard block |
||
3102 | 3126 | * Add help to the Jetpack page |
3103 | 3127 | * |
3104 | 3128 | * @since Jetpack (1.2.3) |
3105 | - * @return false if not the Jetpack page |
|
3129 | + * @return false|null if not the Jetpack page |
|
3106 | 3130 | */ |
3107 | 3131 | function admin_help() { |
3108 | 3132 | $current_screen = get_current_screen(); |
@@ -4137,6 +4161,7 @@ discard block |
||
4137 | 4161 | /** |
4138 | 4162 | * Returns the requested Jetpack API URL |
4139 | 4163 | * |
4164 | + * @param string $relative_url |
|
4140 | 4165 | * @return string |
4141 | 4166 | */ |
4142 | 4167 | public static function api_url( $relative_url ) { |
@@ -4281,7 +4306,8 @@ discard block |
||
4281 | 4306 | * Note these tokens are unique per call, NOT static per site for connecting. |
4282 | 4307 | * |
4283 | 4308 | * @since 2.6 |
4284 | - * @return array |
|
4309 | + * @param string $action |
|
4310 | + * @return string |
|
4285 | 4311 | */ |
4286 | 4312 | public function generate_secrets( $action, $exp = 600 ) { |
4287 | 4313 | $secret = wp_generate_password( 32, false ) // secret_1 |
@@ -4607,6 +4633,10 @@ discard block |
||
4607 | 4633 | return new WP_User( $token_details['user_id'] ); |
4608 | 4634 | } |
4609 | 4635 | |
4636 | + /** |
|
4637 | + * @param integer $timestamp |
|
4638 | + * @param string $nonce |
|
4639 | + */ |
|
4610 | 4640 | function add_nonce( $timestamp, $nonce ) { |
4611 | 4641 | global $wpdb; |
4612 | 4642 | static $nonces_used_this_request = array(); |
@@ -4752,6 +4782,7 @@ discard block |
||
4752 | 4782 | * @param string $key |
4753 | 4783 | * @param string $value |
4754 | 4784 | * @param bool $restate private |
4785 | + * @return string |
|
4755 | 4786 | */ |
4756 | 4787 | public static function state( $key = null, $value = null, $restate = false ) { |
4757 | 4788 | static $state = array(); |
@@ -4808,6 +4839,9 @@ discard block |
||
4808 | 4839 | Jetpack::state( null, null, true ); |
4809 | 4840 | } |
4810 | 4841 | |
4842 | + /** |
|
4843 | + * @param string $file |
|
4844 | + */ |
|
4811 | 4845 | public static function check_privacy( $file ) { |
4812 | 4846 | static $is_site_publicly_accessible = null; |
4813 | 4847 | |
@@ -5536,8 +5570,8 @@ discard block |
||
5536 | 5570 | * - Absolute URLs `http://domain.com/feh.png` |
5537 | 5571 | * - Domain root relative URLs `/feh.png` |
5538 | 5572 | * |
5539 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
5540 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
5573 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
5574 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
5541 | 5575 | * |
5542 | 5576 | * @return mixed|string |
5543 | 5577 | */ |
@@ -5828,7 +5862,7 @@ discard block |
||
5828 | 5862 | * |
5829 | 5863 | * @param string $option_name |
5830 | 5864 | * |
5831 | - * @return bool |
|
5865 | + * @return false|null |
|
5832 | 5866 | */ |
5833 | 5867 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
5834 | 5868 | // Bail if Jump Start has already been dismissed |
@@ -5919,7 +5953,6 @@ discard block |
||
5919 | 5953 | } |
5920 | 5954 | |
5921 | 5955 | /** |
5922 | - * @param mixed $result Value for the user's option |
|
5923 | 5956 | * @return mixed |
5924 | 5957 | */ |
5925 | 5958 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | * |
177 | 177 | * @since 4.3.0 |
178 | 178 | * |
179 | - * @return array Array of Jetpack modules. |
|
179 | + * @return string Array of Jetpack modules. |
|
180 | 180 | */ |
181 | 181 | public function get_modules() { |
182 | 182 | require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-admin.php' ); |
@@ -1104,7 +1104,6 @@ discard block |
||
1104 | 1104 | * |
1105 | 1105 | * @since 4.3.0 |
1106 | 1106 | * |
1107 | - * @param WP_REST_Request $request |
|
1108 | 1107 | * |
1109 | 1108 | * @return bool does a current user have enough privileges. |
1110 | 1109 | */ |
@@ -283,6 +283,11 @@ discard block |
||
283 | 283 | ) ); |
284 | 284 | } |
285 | 285 | |
286 | + /** |
|
287 | + * @param string $path |
|
288 | + * @param string $classname |
|
289 | + * @param Jetpack_IXR_Client $constructor_arguments |
|
290 | + */ |
|
286 | 291 | public static function route( $path, $classname, $method, |
287 | 292 | $constructor_arguments = NULL, |
288 | 293 | $endpoint_arguments = NULL |
@@ -1980,7 +1985,7 @@ discard block |
||
1980 | 1985 | * |
1981 | 1986 | * @param string $route Regular expression for the endpoint with the module slug to return. |
1982 | 1987 | * |
1983 | - * @return array |
|
1988 | + * @return string |
|
1984 | 1989 | */ |
1985 | 1990 | public static function get_module_requested( $route = '/module/(?P<slug>[a-z\-]+)' ) { |
1986 | 1991 | |
@@ -2005,7 +2010,7 @@ discard block |
||
2005 | 2010 | * @param string $modules Can be a single module or a list of modules. |
2006 | 2011 | * @param null|string $slug Slug of the module in the first parameter. |
2007 | 2012 | * |
2008 | - * @return array |
|
2013 | + * @return string |
|
2009 | 2014 | */ |
2010 | 2015 | public static function prepare_modules_for_response( $modules = '', $slug = null ) { |
2011 | 2016 | if ( get_option( 'permalink_structure' ) ) { |
@@ -64,6 +64,7 @@ |
||
64 | 64 | /** |
65 | 65 | * Updates user data |
66 | 66 | * |
67 | + * @param integer $user_id |
|
67 | 68 | * @return (array) |
68 | 69 | */ |
69 | 70 | public function update_user( $user_id, $blog_id ) { |
@@ -227,6 +227,9 @@ |
||
227 | 227 | ); |
228 | 228 | } |
229 | 229 | |
230 | + /** |
|
231 | + * @param Jetpack_Sync_Queue $queue |
|
232 | + */ |
|
230 | 233 | protected function get_buffer( $queue, $number_of_items ) { |
231 | 234 | $start = time(); |
232 | 235 | $max_duration = 5; // this will try to get the buffer |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | * Our [portfolio] shortcode. |
489 | 489 | * Prints Portfolio data styled to look good on *any* theme. |
490 | 490 | * |
491 | - * @return portfolio_shortcode_html |
|
491 | + * @return string |
|
492 | 492 | */ |
493 | 493 | static function portfolio_shortcode( $atts ) { |
494 | 494 | // Default attributes |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | * The Portfolio shortcode loop. |
622 | 622 | * |
623 | 623 | * @todo add theme color styles |
624 | - * @return html |
|
624 | + * @return string |
|
625 | 625 | */ |
626 | 626 | static function portfolio_shortcode_html( $atts ) { |
627 | 627 | |
@@ -713,6 +713,7 @@ discard block |
||
713 | 713 | /** |
714 | 714 | * Individual project class |
715 | 715 | * |
716 | + * @param integer $portfolio_index_number |
|
716 | 717 | * @return string |
717 | 718 | */ |
718 | 719 | static function get_project_class( $portfolio_index_number, $columns ) { |
@@ -820,7 +821,7 @@ discard block |
||
820 | 821 | /** |
821 | 822 | * Displays the author of the current portfolio project. |
822 | 823 | * |
823 | - * @return html |
|
824 | + * @return string |
|
824 | 825 | */ |
825 | 826 | static function get_project_author() { |
826 | 827 | $html = '<div class="project-author">'; |
@@ -837,7 +838,7 @@ discard block |
||
837 | 838 | /** |
838 | 839 | * Display the featured image if it's available |
839 | 840 | * |
840 | - * @return html |
|
841 | + * @return string|null |
|
841 | 842 | */ |
842 | 843 | static function get_portfolio_thumbnail_link( $post_id ) { |
843 | 844 | if ( has_post_thumbnail( $post_id ) ) { |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | * Our [testimonial] shortcode. |
526 | 526 | * Prints Testimonial data styled to look good on *any* theme. |
527 | 527 | * |
528 | - * @return jetpack_testimonial_shortcode_html |
|
528 | + * @return string |
|
529 | 529 | */ |
530 | 530 | static function jetpack_testimonial_shortcode( $atts ) { |
531 | 531 | // Default attributes |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | /** |
589 | 589 | * The Testimonial shortcode loop. |
590 | 590 | * |
591 | - * @return html |
|
591 | + * @return string |
|
592 | 592 | */ |
593 | 593 | static function jetpack_testimonial_shortcode_html( $atts ) { |
594 | 594 | // Default query arguments |
@@ -662,6 +662,7 @@ discard block |
||
662 | 662 | /** |
663 | 663 | * Individual testimonial class |
664 | 664 | * |
665 | + * @param integer $testimonial_index_number |
|
665 | 666 | * @return string |
666 | 667 | */ |
667 | 668 | static function get_testimonial_class( $testimonial_index_number, $columns, $image ) { |
@@ -708,7 +709,7 @@ discard block |
||
708 | 709 | /** |
709 | 710 | * Display the featured image if it's available |
710 | 711 | * |
711 | - * @return html |
|
712 | + * @return string|null |
|
712 | 713 | */ |
713 | 714 | static function get_testimonial_thumbnail_link( $post_id ) { |
714 | 715 | if ( has_post_thumbnail( $post_id ) ) { |
@@ -10,7 +10,7 @@ |
||
10 | 10 | * |
11 | 11 | * @access public |
12 | 12 | * @param string $older_than (default: '1 hour') Older Than. |
13 | - * @return void |
|
13 | + * @return false|null |
|
14 | 14 | */ |
15 | 15 | function jp_purge_transients( $older_than = '1 hour' ) { |
16 | 16 | global $wpdb; |
@@ -179,7 +179,7 @@ |
||
179 | 179 | * @param array $hosts |
180 | 180 | * @param string $api_base |
181 | 181 | * |
182 | - * @return array |
|
182 | + * @return string[] |
|
183 | 183 | */ |
184 | 184 | static function allowed_redirect_hosts( $hosts, $api_base = JETPACK__API_BASE ) { |
185 | 185 | if ( empty( $hosts ) ) { |