@@ -25,6 +25,7 @@ |
||
25 | 25 | * The rest of the arguments are the params specified to the method. |
26 | 26 | * |
27 | 27 | * @param string[] ...$args IXR args. |
28 | + * @param string $args |
|
28 | 29 | */ |
29 | 30 | public function addCall( ...$args ) { |
30 | 31 | $method_name = array_shift( $args ); |
@@ -433,6 +433,9 @@ |
||
433 | 433 | ); |
434 | 434 | } |
435 | 435 | |
436 | + /** |
|
437 | + * @param string $column |
|
438 | + */ |
|
436 | 439 | function _build_date_range_query( $column, $range, $where ) { |
437 | 440 | global $wpdb; |
438 | 441 |
@@ -15,6 +15,9 @@ |
||
15 | 15 | exit; |
16 | 16 | } |
17 | 17 | |
18 | +/** |
|
19 | + * @param string $file_pattern |
|
20 | + */ |
|
18 | 21 | function wpcom_rest_api_v2_load_plugin_files( $file_pattern ) { |
19 | 22 | $plugins = glob( dirname( __FILE__ ) . '/' . $file_pattern ); |
20 | 23 |
@@ -174,6 +174,7 @@ |
||
174 | 174 | * @since 1.3 |
175 | 175 | * @var string $guid VideoPress unique identifier |
176 | 176 | * @var int $maxwidth maximum requested video width. final width and height are calculated on VideoPress servers based on the aspect ratio of the original video upload. |
177 | + * @param string $guid |
|
177 | 178 | */ |
178 | 179 | public function __construct( $guid, $maxwidth = 640 ) { |
179 | 180 | $this->guid = $guid; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | /** |
43 | 43 | * Singleton implementation |
44 | 44 | * |
45 | - * @return object |
|
45 | + * @return Jetpack_Photon|null |
|
46 | 46 | */ |
47 | 47 | public static function instance() { |
48 | 48 | if ( ! is_a( self::$instance, 'Jetpack_Photon' ) ) { |
@@ -1382,7 +1382,7 @@ discard block |
||
1382 | 1382 | * after ourselves without breaking anyone else's filters. |
1383 | 1383 | * |
1384 | 1384 | * @internal |
1385 | - * @return true |
|
1385 | + * @return boolean |
|
1386 | 1386 | */ |
1387 | 1387 | public function override_image_downsize_in_rest_edit_context() { |
1388 | 1388 | return true; |
@@ -917,7 +917,7 @@ discard block |
||
917 | 917 | * This is ported over from the manage module, which has been deprecated and baked in here. |
918 | 918 | * |
919 | 919 | * @param $domains |
920 | - * @return array |
|
920 | + * @return string[] |
|
921 | 921 | */ |
922 | 922 | function allow_wpcom_domain( $domains ) { |
923 | 923 | if ( empty( $domains ) ) { |
@@ -1285,7 +1285,7 @@ discard block |
||
1285 | 1285 | /** |
1286 | 1286 | * Does the network allow admins to add new users. |
1287 | 1287 | * |
1288 | - * @return boolian |
|
1288 | + * @return boolean |
|
1289 | 1289 | */ |
1290 | 1290 | static function network_add_new_users( $option = null ) { |
1291 | 1291 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1395,7 +1395,7 @@ discard block |
||
1395 | 1395 | * |
1396 | 1396 | * @param bool $option |
1397 | 1397 | * |
1398 | - * @return boolean |
|
1398 | + * @return string |
|
1399 | 1399 | */ |
1400 | 1400 | public function is_main_network_option( $option ) { |
1401 | 1401 | // return '1' or '' |
@@ -1406,7 +1406,7 @@ discard block |
||
1406 | 1406 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1407 | 1407 | * |
1408 | 1408 | * @param string $option |
1409 | - * @return boolean |
|
1409 | + * @return string |
|
1410 | 1410 | */ |
1411 | 1411 | public function is_multisite( $option ) { |
1412 | 1412 | return (string) (bool) is_multisite(); |
@@ -1469,7 +1469,7 @@ discard block |
||
1469 | 1469 | /** |
1470 | 1470 | * Returns true if the site has file write access false otherwise. |
1471 | 1471 | * |
1472 | - * @return string ( '1' | '0' ) |
|
1472 | + * @return integer ( '1' | '0' ) |
|
1473 | 1473 | **/ |
1474 | 1474 | public static function file_system_write_access() { |
1475 | 1475 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2197,7 +2197,7 @@ discard block |
||
2197 | 2197 | * @param int $user_id The user id. |
2198 | 2198 | * @param string $token The user token. |
2199 | 2199 | * @param bool $is_master_user Whether the user is the master user. |
2200 | - * @return bool |
|
2200 | + * @return boolean|null |
|
2201 | 2201 | */ |
2202 | 2202 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
2203 | 2203 | _deprecated_function( __METHOD__, 'jetpack-8.0', 'Automattic\\Jetpack\\Connection\\Utils::update_user_token' ); |
@@ -2642,7 +2642,7 @@ discard block |
||
2642 | 2642 | * |
2643 | 2643 | * @param string $tag Tag as it appears in each module heading. |
2644 | 2644 | * |
2645 | - * @return mixed |
|
2645 | + * @return string |
|
2646 | 2646 | */ |
2647 | 2647 | public static function translate_module_tag( $tag ) { |
2648 | 2648 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2757,8 +2757,8 @@ discard block |
||
2757 | 2757 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2758 | 2758 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2759 | 2759 | * |
2760 | - * @param $string |
|
2761 | - * @return mixed |
|
2760 | + * @param string $string |
|
2761 | + * @return string|null |
|
2762 | 2762 | */ |
2763 | 2763 | public static function alias_directories( $string ) { |
2764 | 2764 | // ABSPATH has a trailing slash. |
@@ -2769,6 +2769,10 @@ discard block |
||
2769 | 2769 | return $string; |
2770 | 2770 | } |
2771 | 2771 | |
2772 | + /** |
|
2773 | + * @param boolean $redirect |
|
2774 | + * @param boolean $send_state_messages |
|
2775 | + */ |
|
2772 | 2776 | public static function activate_default_modules( |
2773 | 2777 | $min_version = false, |
2774 | 2778 | $max_version = false, |
@@ -3052,6 +3056,9 @@ discard block |
||
3052 | 3056 | return self::update_active_modules( $new ); |
3053 | 3057 | } |
3054 | 3058 | |
3059 | + /** |
|
3060 | + * @param string $module |
|
3061 | + */ |
|
3055 | 3062 | public static function enable_module_configurable( $module ) { |
3056 | 3063 | $module = self::get_module_slug( $module ); |
3057 | 3064 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3080,6 +3087,10 @@ discard block |
||
3080 | 3087 | } |
3081 | 3088 | |
3082 | 3089 | /* Installation */ |
3090 | + |
|
3091 | + /** |
|
3092 | + * @param string $message |
|
3093 | + */ |
|
3083 | 3094 | public static function bail_on_activation( $message, $deactivate = true ) { |
3084 | 3095 | ?> |
3085 | 3096 | <!doctype html> |
@@ -3849,7 +3860,7 @@ discard block |
||
3849 | 3860 | * Add help to the Jetpack page |
3850 | 3861 | * |
3851 | 3862 | * @since Jetpack (1.2.3) |
3852 | - * @return false if not the Jetpack page |
|
3863 | + * @return false|null if not the Jetpack page |
|
3853 | 3864 | */ |
3854 | 3865 | function admin_help() { |
3855 | 3866 | $current_screen = get_current_screen(); |
@@ -4553,6 +4564,7 @@ discard block |
||
4553 | 4564 | |
4554 | 4565 | /** |
4555 | 4566 | * Record a stat for later output. This will only currently output in the admin_footer. |
4567 | + * @param string $group |
|
4556 | 4568 | */ |
4557 | 4569 | function stat( $group, $detail ) { |
4558 | 4570 | $this->initialize_stats(); |
@@ -4948,6 +4960,9 @@ discard block |
||
4948 | 4960 | return $url; |
4949 | 4961 | } |
4950 | 4962 | |
4963 | + /** |
|
4964 | + * @param string $actionurl |
|
4965 | + */ |
|
4951 | 4966 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
4952 | 4967 | $actionurl = str_replace( '&', '&', $actionurl ); |
4953 | 4968 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -5250,7 +5265,7 @@ discard block |
||
5250 | 5265 | * @param String $action The action name. |
5251 | 5266 | * @param Integer $user_id The user identifier. |
5252 | 5267 | * @param Integer $exp Expiration time in seconds. |
5253 | - * @return array |
|
5268 | + * @return boolean |
|
5254 | 5269 | */ |
5255 | 5270 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
5256 | 5271 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5570,7 +5585,6 @@ discard block |
||
5570 | 5585 | /** |
5571 | 5586 | * Report authentication status to the WP REST API. |
5572 | 5587 | * |
5573 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5574 | 5588 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5575 | 5589 | */ |
5576 | 5590 | public function wp_rest_authentication_errors( $value ) { |
@@ -5697,6 +5711,7 @@ discard block |
||
5697 | 5711 | * @param string $key |
5698 | 5712 | * @param string $value |
5699 | 5713 | * @param bool $restate private |
5714 | + * @return string |
|
5700 | 5715 | */ |
5701 | 5716 | public static function state( $key = null, $value = null, $restate = false ) { |
5702 | 5717 | static $state = array(); |
@@ -5778,6 +5793,9 @@ discard block |
||
5778 | 5793 | return true; |
5779 | 5794 | } |
5780 | 5795 | |
5796 | + /** |
|
5797 | + * @param string $file |
|
5798 | + */ |
|
5781 | 5799 | public static function check_privacy( $file ) { |
5782 | 5800 | static $is_site_publicly_accessible = null; |
5783 | 5801 | |
@@ -5858,6 +5876,9 @@ discard block |
||
5858 | 5876 | } |
5859 | 5877 | } |
5860 | 5878 | |
5879 | + /** |
|
5880 | + * @param string $url |
|
5881 | + */ |
|
5861 | 5882 | public static function staticize_subdomain( $url ) { |
5862 | 5883 | |
5863 | 5884 | // Extract hostname from URL |
@@ -6358,9 +6379,7 @@ discard block |
||
6358 | 6379 | * |
6359 | 6380 | * Attached to `style_loader_src` filter. |
6360 | 6381 | * |
6361 | - * @param string $tag The tag that would link to the external asset. |
|
6362 | 6382 | * @param string $handle The registered handle of the script in question. |
6363 | - * @param string $href The url of the asset in question. |
|
6364 | 6383 | */ |
6365 | 6384 | public static function set_suffix_on_min( $src, $handle ) { |
6366 | 6385 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6602,8 +6621,8 @@ discard block |
||
6602 | 6621 | * - Absolute URLs `http://domain.com/feh.png` |
6603 | 6622 | * - Domain root relative URLs `/feh.png` |
6604 | 6623 | * |
6605 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6606 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6624 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6625 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6607 | 6626 | * |
6608 | 6627 | * @return mixed|string |
6609 | 6628 | */ |
@@ -6902,7 +6921,6 @@ discard block |
||
6902 | 6921 | } |
6903 | 6922 | |
6904 | 6923 | /** |
6905 | - * @param mixed $result Value for the user's option |
|
6906 | 6924 | * @return mixed |
6907 | 6925 | */ |
6908 | 6926 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -55,7 +55,7 @@ |
||
55 | 55 | * |
56 | 56 | * @since 5.6.0 |
57 | 57 | * |
58 | - * @return object The class instance. |
|
58 | + * @return Jetpack_Lazy_Images The class instance. |
|
59 | 59 | */ |
60 | 60 | public static function instance() { |
61 | 61 | if ( is_null( self::$instance ) ) { |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | /** |
314 | 314 | * Verifies the signature of the current request. |
315 | 315 | * |
316 | - * @return false|array |
|
316 | + * @return boolean |
|
317 | 317 | */ |
318 | 318 | public function verify_xml_rpc_signature() { |
319 | 319 | if ( is_null( $this->xmlrpc_verification ) ) { |
@@ -1286,6 +1286,7 @@ discard block |
||
1286 | 1286 | * @param String $action The action name. |
1287 | 1287 | * @param Integer $user_id The user identifier. |
1288 | 1288 | * @param Integer $exp Expiration time in seconds. |
1289 | + * @return string |
|
1289 | 1290 | */ |
1290 | 1291 | public function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
1291 | 1292 | if ( false === $user_id ) { |
@@ -2242,7 +2243,7 @@ discard block |
||
2242 | 2243 | * |
2243 | 2244 | * @param int|false $user_id false: Return the Blog Token. int: Return that user's User Token. |
2244 | 2245 | * @param string|false $token_key If provided, check that the token matches the provided input. |
2245 | - * @param bool|true $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found. |
|
2246 | + * @param boolean $suppress_errors If true, return a falsy value when the token isn't found; When false, return a descriptive WP_Error when the token isn't found. |
|
2246 | 2247 | * |
2247 | 2248 | * @return object|false |
2248 | 2249 | */ |
@@ -2626,7 +2627,7 @@ discard block |
||
2626 | 2627 | * Fetches a signed token. |
2627 | 2628 | * |
2628 | 2629 | * @param object $token the token. |
2629 | - * @return WP_Error|string a signed token |
|
2630 | + * @return string a signed token |
|
2630 | 2631 | */ |
2631 | 2632 | public function get_signed_token( $token ) { |
2632 | 2633 | if ( ! isset( $token->secret ) || empty( $token->secret ) ) { |