@@ -85,7 +85,7 @@ |
||
85 | 85 | * |
86 | 86 | * @param string $cron_name |
87 | 87 | * |
88 | - * @return bool |
|
88 | + * @return false|null |
|
89 | 89 | */ |
90 | 90 | public function activate_cron( $cron_name ) { |
91 | 91 |
@@ -381,8 +381,8 @@ |
||
381 | 381 | * |
382 | 382 | * @param $width int Width of the image |
383 | 383 | * @param $height int Height of the image |
384 | -* @param $req_width int Required width to pass validation |
|
385 | -* @param $req_height int Required height to pass validation |
|
384 | +* @param integer $req_width int Required width to pass validation |
|
385 | +* @param integer $req_height int Required height to pass validation |
|
386 | 386 | * @return bool - True if the image passed the required size validation |
387 | 387 | */ |
388 | 388 | function _jetpack_og_get_image_validate_size($width, $height, $req_width, $req_height) { |
@@ -1404,7 +1404,7 @@ |
||
1404 | 1404 | /** |
1405 | 1405 | * Migration routine for moving safecss from wp_options to wp_posts to support revisions |
1406 | 1406 | * |
1407 | - * @return void |
|
1407 | + * @return false|null |
|
1408 | 1408 | */ |
1409 | 1409 | static function upgrade() { |
1410 | 1410 | $css = get_option( 'safecss' ); |
@@ -115,6 +115,9 @@ |
||
115 | 115 | delete_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME ); |
116 | 116 | } |
117 | 117 | |
118 | + /** |
|
119 | + * @param integer $checksum |
|
120 | + */ |
|
118 | 121 | public function should_send_callable( $callable_checksums, $name, $checksum ) { |
119 | 122 | if ( in_array( $name, array( 'home_url', 'site_url' ) ) && Jetpack_Options::get_option( 'migrate_for_idc' ) ) { |
120 | 123 | return true; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | * |
86 | 86 | * @param string $cron_name |
87 | 87 | * |
88 | - * @return bool |
|
88 | + * @return false|null |
|
89 | 89 | */ |
90 | 90 | public function activate_cron( $cron_name ) { |
91 | 91 |
@@ -1124,7 +1124,6 @@ |
||
1124 | 1124 | * |
1125 | 1125 | * @since 4.3.0 |
1126 | 1126 | * |
1127 | - * @param WP_REST_Request $request |
|
1128 | 1127 | * |
1129 | 1128 | * @return bool does a current user have enough privileges. |
1130 | 1129 | */ |
@@ -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 ); |
@@ -2562,6 +2566,9 @@ discard block |
||
2562 | 2566 | _deprecated_function( __METHOD__, 'jeptack-4.2' ); |
2563 | 2567 | } |
2564 | 2568 | |
2569 | + /** |
|
2570 | + * @return string |
|
2571 | + */ |
|
2565 | 2572 | public static function deactivate_module( $module ) { |
2566 | 2573 | /** |
2567 | 2574 | * Fires when a module is deactivated. |
@@ -2590,6 +2597,9 @@ discard block |
||
2590 | 2597 | return self::update_active_modules( $new ); |
2591 | 2598 | } |
2592 | 2599 | |
2600 | + /** |
|
2601 | + * @param string $module |
|
2602 | + */ |
|
2593 | 2603 | public static function enable_module_configurable( $module ) { |
2594 | 2604 | $module = Jetpack::get_module_slug( $module ); |
2595 | 2605 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2600,21 +2610,33 @@ discard block |
||
2600 | 2610 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
2601 | 2611 | } |
2602 | 2612 | |
2613 | + /** |
|
2614 | + * @param string $module |
|
2615 | + */ |
|
2603 | 2616 | public static function module_configuration_load( $module, $method ) { |
2604 | 2617 | $module = Jetpack::get_module_slug( $module ); |
2605 | 2618 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
2606 | 2619 | } |
2607 | 2620 | |
2621 | + /** |
|
2622 | + * @param string $module |
|
2623 | + */ |
|
2608 | 2624 | public static function module_configuration_head( $module, $method ) { |
2609 | 2625 | $module = Jetpack::get_module_slug( $module ); |
2610 | 2626 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
2611 | 2627 | } |
2612 | 2628 | |
2629 | + /** |
|
2630 | + * @param string $module |
|
2631 | + */ |
|
2613 | 2632 | public static function module_configuration_screen( $module, $method ) { |
2614 | 2633 | $module = Jetpack::get_module_slug( $module ); |
2615 | 2634 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
2616 | 2635 | } |
2617 | 2636 | |
2637 | + /** |
|
2638 | + * @param string $module |
|
2639 | + */ |
|
2618 | 2640 | public static function module_configuration_activation_screen( $module, $method ) { |
2619 | 2641 | $module = Jetpack::get_module_slug( $module ); |
2620 | 2642 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2622,6 +2644,9 @@ discard block |
||
2622 | 2644 | |
2623 | 2645 | /* Installation */ |
2624 | 2646 | |
2647 | + /** |
|
2648 | + * @param string $message |
|
2649 | + */ |
|
2625 | 2650 | public static function bail_on_activation( $message, $deactivate = true ) { |
2626 | 2651 | ?> |
2627 | 2652 | <!doctype html> |
@@ -3266,7 +3291,7 @@ discard block |
||
3266 | 3291 | * Add help to the Jetpack page |
3267 | 3292 | * |
3268 | 3293 | * @since Jetpack (1.2.3) |
3269 | - * @return false if not the Jetpack page |
|
3294 | + * @return false|null if not the Jetpack page |
|
3270 | 3295 | */ |
3271 | 3296 | function admin_help() { |
3272 | 3297 | $current_screen = get_current_screen(); |
@@ -4264,6 +4289,7 @@ discard block |
||
4264 | 4289 | /** |
4265 | 4290 | * Returns the requested Jetpack API URL |
4266 | 4291 | * |
4292 | + * @param string $relative_url |
|
4267 | 4293 | * @return string |
4268 | 4294 | */ |
4269 | 4295 | public static function api_url( $relative_url ) { |
@@ -4408,7 +4434,8 @@ discard block |
||
4408 | 4434 | * Note these tokens are unique per call, NOT static per site for connecting. |
4409 | 4435 | * |
4410 | 4436 | * @since 2.6 |
4411 | - * @return array |
|
4437 | + * @param string $action |
|
4438 | + * @return string |
|
4412 | 4439 | */ |
4413 | 4440 | public function generate_secrets( $action, $exp = 600 ) { |
4414 | 4441 | $secret = wp_generate_password( 32, false ) // secret_1 |
@@ -4734,6 +4761,10 @@ discard block |
||
4734 | 4761 | return new WP_User( $token_details['user_id'] ); |
4735 | 4762 | } |
4736 | 4763 | |
4764 | + /** |
|
4765 | + * @param integer $timestamp |
|
4766 | + * @param string $nonce |
|
4767 | + */ |
|
4737 | 4768 | function add_nonce( $timestamp, $nonce ) { |
4738 | 4769 | global $wpdb; |
4739 | 4770 | static $nonces_used_this_request = array(); |
@@ -4879,6 +4910,7 @@ discard block |
||
4879 | 4910 | * @param string $key |
4880 | 4911 | * @param string $value |
4881 | 4912 | * @param bool $restate private |
4913 | + * @return string |
|
4882 | 4914 | */ |
4883 | 4915 | public static function state( $key = null, $value = null, $restate = false ) { |
4884 | 4916 | static $state = array(); |
@@ -4935,6 +4967,9 @@ discard block |
||
4935 | 4967 | Jetpack::state( null, null, true ); |
4936 | 4968 | } |
4937 | 4969 | |
4970 | + /** |
|
4971 | + * @param string $file |
|
4972 | + */ |
|
4938 | 4973 | public static function check_privacy( $file ) { |
4939 | 4974 | static $is_site_publicly_accessible = null; |
4940 | 4975 | |
@@ -5679,8 +5714,8 @@ discard block |
||
5679 | 5714 | * - Absolute URLs `http://domain.com/feh.png` |
5680 | 5715 | * - Domain root relative URLs `/feh.png` |
5681 | 5716 | * |
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. |
|
5717 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
5718 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
5684 | 5719 | * |
5685 | 5720 | * @return mixed|string |
5686 | 5721 | */ |
@@ -5971,7 +6006,7 @@ discard block |
||
5971 | 6006 | * |
5972 | 6007 | * @param string $option_name |
5973 | 6008 | * |
5974 | - * @return bool |
|
6009 | + * @return false|null |
|
5975 | 6010 | */ |
5976 | 6011 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
5977 | 6012 | // Bail if Jump Start has already been dismissed |
@@ -6062,7 +6097,6 @@ discard block |
||
6062 | 6097 | } |
6063 | 6098 | |
6064 | 6099 | /** |
6065 | - * @param mixed $result Value for the user's option |
|
6066 | 6100 | * @return mixed |
6067 | 6101 | */ |
6068 | 6102 | function get_user_option_meta_box_order_dashboard( $sorted ) { |