@@ -729,6 +729,7 @@ |
||
| 729 | 729 | * |
| 730 | 730 | * @param string $branch - Branch that's ready for update. |
| 731 | 731 | * @param string $section - What kind of branch we're updated (master, rc, pr). |
| 732 | + * @return string |
|
| 732 | 733 | */ |
| 733 | 734 | public static function update_action_url( $branch, $section ) { |
| 734 | 735 | $query = array( |
@@ -229,7 +229,7 @@ |
||
| 229 | 229 | * |
| 230 | 230 | * @param string $notify_moderator The value of the moderation_notify option OR if the comment is awaiting moderation. |
| 231 | 231 | * @param int $comment_id Comment ID. |
| 232 | - * @return boolean Returns false to shortcircuit the execution of wp_notify_moderator |
|
| 232 | + * @return string|false Returns false to shortcircuit the execution of wp_notify_moderator |
|
| 233 | 233 | */ |
| 234 | 234 | function jetpack_notify_moderator( $notify_moderator, $comment_id ) { |
| 235 | 235 | /* |
@@ -168,7 +168,7 @@ |
||
| 168 | 168 | /** |
| 169 | 169 | * Checks to see whether or not the root package is the one that required the autoloader. |
| 170 | 170 | * |
| 171 | - * @return bool |
|
| 171 | + * @return null|boolean |
|
| 172 | 172 | */ |
| 173 | 173 | private function isRequiredByRoot() { |
| 174 | 174 | $package = $this->composer->getPackage(); |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | * @param array $post_types - other post types. |
| 194 | 194 | * |
| 195 | 195 | * @see hook 'rest_api_allowed_post_types' |
| 196 | - * @return array |
|
| 196 | + * @return string[] |
|
| 197 | 197 | */ |
| 198 | 198 | public function allow_rest_api_types( $post_types ) { |
| 199 | 199 | $post_types[] = self::$post_type_plan; |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | * (because it requires a plan upgrade or Stripe connection), and the |
| 255 | 255 | * button is a child of a Premium Content block. |
| 256 | 256 | * |
| 257 | - * @param WP_Block $block Recurring Payments block instance. |
|
| 257 | + * @param WP_Block|null $block Recurring Payments block instance. |
|
| 258 | 258 | * |
| 259 | 259 | * @return boolean |
| 260 | 260 | */ |
@@ -246,7 +246,7 @@ |
||
| 246 | 246 | * @param int $user_id The user id. |
| 247 | 247 | * @param string $token The user token. |
| 248 | 248 | * @param bool $is_master_user Whether the user is the master user. |
| 249 | - * @return bool |
|
| 249 | + * @return boolean|null |
|
| 250 | 250 | */ |
| 251 | 251 | public function update_user_token( $user_id, $token, $is_master_user ) { |
| 252 | 252 | // Not designed for concurrent updates. |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | /** |
| 294 | 294 | * Verifies the signature of the current request. |
| 295 | 295 | * |
| 296 | - * @return false|array |
|
| 296 | + * @return boolean |
|
| 297 | 297 | */ |
| 298 | 298 | public function verify_xml_rpc_signature() { |
| 299 | 299 | if ( is_null( $this->xmlrpc_verification ) ) { |
@@ -1461,7 +1461,7 @@ discard block |
||
| 1461 | 1461 | /** |
| 1462 | 1462 | * Obtains the auth token. |
| 1463 | 1463 | * |
| 1464 | - * @param array $data The request data. |
|
| 1464 | + * @param string $data The request data. |
|
| 1465 | 1465 | * @return object|\WP_Error Returns the auth token on success. |
| 1466 | 1466 | * Returns a \WP_Error on failure. |
| 1467 | 1467 | */ |
@@ -2088,7 +2088,7 @@ discard block |
||
| 2088 | 2088 | * @deprecated 9.5 Use Automattic\Jetpack\Connection\Tokens->get_signed_token() instead. |
| 2089 | 2089 | * |
| 2090 | 2090 | * @param object $token the token. |
| 2091 | - * @return WP_Error|string a signed token |
|
| 2091 | + * @return string a signed token |
|
| 2092 | 2092 | */ |
| 2093 | 2093 | public function get_signed_token( $token ) { |
| 2094 | 2094 | _deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Tokens->get_signed_token' ); |
@@ -978,7 +978,7 @@ discard block |
||
| 978 | 978 | * This is ported over from the manage module, which has been deprecated and baked in here. |
| 979 | 979 | * |
| 980 | 980 | * @param $domains |
| 981 | - * @return array |
|
| 981 | + * @return string[] |
|
| 982 | 982 | */ |
| 983 | 983 | function allow_wpcom_domain( $domains ) { |
| 984 | 984 | if ( empty( $domains ) ) { |
@@ -1379,7 +1379,7 @@ discard block |
||
| 1379 | 1379 | /** |
| 1380 | 1380 | * Does the network allow admins to add new users. |
| 1381 | 1381 | * |
| 1382 | - * @return boolian |
|
| 1382 | + * @return boolean |
|
| 1383 | 1383 | */ |
| 1384 | 1384 | static function network_add_new_users( $option = null ) { |
| 1385 | 1385 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1489,7 +1489,7 @@ discard block |
||
| 1489 | 1489 | * |
| 1490 | 1490 | * @param bool $option |
| 1491 | 1491 | * |
| 1492 | - * @return boolean |
|
| 1492 | + * @return string |
|
| 1493 | 1493 | */ |
| 1494 | 1494 | public function is_main_network_option( $option ) { |
| 1495 | 1495 | // return '1' or '' |
@@ -1500,7 +1500,7 @@ discard block |
||
| 1500 | 1500 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1501 | 1501 | * |
| 1502 | 1502 | * @param string $option |
| 1503 | - * @return boolean |
|
| 1503 | + * @return string |
|
| 1504 | 1504 | */ |
| 1505 | 1505 | public function is_multisite( $option ) { |
| 1506 | 1506 | return (string) (bool) is_multisite(); |
@@ -1563,7 +1563,7 @@ discard block |
||
| 1563 | 1563 | /** |
| 1564 | 1564 | * Returns true if the site has file write access false otherwise. |
| 1565 | 1565 | * |
| 1566 | - * @return string ( '1' | '0' ) |
|
| 1566 | + * @return integer ( '1' | '0' ) |
|
| 1567 | 1567 | **/ |
| 1568 | 1568 | public static function file_system_write_access() { |
| 1569 | 1569 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2271,7 +2271,7 @@ discard block |
||
| 2271 | 2271 | * @param int $user_id The user id. |
| 2272 | 2272 | * @param string $token The user token. |
| 2273 | 2273 | * @param bool $is_master_user Whether the user is the master user. |
| 2274 | - * @return bool |
|
| 2274 | + * @return boolean|null |
|
| 2275 | 2275 | */ |
| 2276 | 2276 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
| 2277 | 2277 | _deprecated_function( __METHOD__, 'jetpack-9.5', 'Automattic\\Jetpack\\Connection\\Tokens->update_user_token' ); |
@@ -2715,7 +2715,7 @@ discard block |
||
| 2715 | 2715 | * |
| 2716 | 2716 | * @param string $tag Tag as it appears in each module heading. |
| 2717 | 2717 | * |
| 2718 | - * @return mixed |
|
| 2718 | + * @return string |
|
| 2719 | 2719 | */ |
| 2720 | 2720 | public static function translate_module_tag( $tag ) { |
| 2721 | 2721 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2830,8 +2830,8 @@ discard block |
||
| 2830 | 2830 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
| 2831 | 2831 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
| 2832 | 2832 | * |
| 2833 | - * @param $string |
|
| 2834 | - * @return mixed |
|
| 2833 | + * @param string $string |
|
| 2834 | + * @return string|null |
|
| 2835 | 2835 | */ |
| 2836 | 2836 | public static function alias_directories( $string ) { |
| 2837 | 2837 | // ABSPATH has a trailing slash. |
@@ -2842,6 +2842,10 @@ discard block |
||
| 2842 | 2842 | return $string; |
| 2843 | 2843 | } |
| 2844 | 2844 | |
| 2845 | + /** |
|
| 2846 | + * @param boolean $redirect |
|
| 2847 | + * @param boolean $send_state_messages |
|
| 2848 | + */ |
|
| 2845 | 2849 | public static function activate_default_modules( |
| 2846 | 2850 | $min_version = false, |
| 2847 | 2851 | $max_version = false, |
@@ -3125,6 +3129,9 @@ discard block |
||
| 3125 | 3129 | return self::update_active_modules( $new ); |
| 3126 | 3130 | } |
| 3127 | 3131 | |
| 3132 | + /** |
|
| 3133 | + * @param string $module |
|
| 3134 | + */ |
|
| 3128 | 3135 | public static function enable_module_configurable( $module ) { |
| 3129 | 3136 | $module = self::get_module_slug( $module ); |
| 3130 | 3137 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3153,6 +3160,10 @@ discard block |
||
| 3153 | 3160 | } |
| 3154 | 3161 | |
| 3155 | 3162 | /* Installation */ |
| 3163 | + |
|
| 3164 | + /** |
|
| 3165 | + * @param string $message |
|
| 3166 | + */ |
|
| 3156 | 3167 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 3157 | 3168 | ?> |
| 3158 | 3169 | <!doctype html> |
@@ -3198,6 +3209,7 @@ discard block |
||
| 3198 | 3209 | * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook() |
| 3199 | 3210 | * |
| 3200 | 3211 | * @static |
| 3212 | + * @param boolean $network_wide |
|
| 3201 | 3213 | */ |
| 3202 | 3214 | public static function plugin_activation( $network_wide ) { |
| 3203 | 3215 | Jetpack_Options::update_option( 'activated', 1 ); |
@@ -3915,7 +3927,7 @@ discard block |
||
| 3915 | 3927 | * Add help to the Jetpack page |
| 3916 | 3928 | * |
| 3917 | 3929 | * @since Jetpack (1.2.3) |
| 3918 | - * @return false if not the Jetpack page |
|
| 3930 | + * @return false|null if not the Jetpack page |
|
| 3919 | 3931 | */ |
| 3920 | 3932 | function admin_help() { |
| 3921 | 3933 | $current_screen = get_current_screen(); |
@@ -4656,6 +4668,7 @@ discard block |
||
| 4656 | 4668 | |
| 4657 | 4669 | /** |
| 4658 | 4670 | * Record a stat for later output. This will only currently output in the admin_footer. |
| 4671 | + * @param string $group |
|
| 4659 | 4672 | */ |
| 4660 | 4673 | function stat( $group, $detail ) { |
| 4661 | 4674 | $this->initialize_stats(); |
@@ -4999,6 +5012,9 @@ discard block |
||
| 4999 | 5012 | return $url; |
| 5000 | 5013 | } |
| 5001 | 5014 | |
| 5015 | + /** |
|
| 5016 | + * @param string $actionurl |
|
| 5017 | + */ |
|
| 5002 | 5018 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
| 5003 | 5019 | $actionurl = str_replace( '&', '&', $actionurl ); |
| 5004 | 5020 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -5538,7 +5554,6 @@ discard block |
||
| 5538 | 5554 | * @deprecated since 8.9.0 |
| 5539 | 5555 | * @see Automattic\Jetpack\Connection\Rest_Authentication::wp_rest_authentication_errors() |
| 5540 | 5556 | * |
| 5541 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
| 5542 | 5557 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
| 5543 | 5558 | */ |
| 5544 | 5559 | public function wp_rest_authentication_errors( $value ) { |
@@ -5631,6 +5646,7 @@ discard block |
||
| 5631 | 5646 | * @param string $key |
| 5632 | 5647 | * @param string $value |
| 5633 | 5648 | * @param bool $restate private |
| 5649 | + * @return string |
|
| 5634 | 5650 | */ |
| 5635 | 5651 | public static function state( $key = null, $value = null, $restate = false ) { |
| 5636 | 5652 | static $state = array(); |
@@ -5712,6 +5728,9 @@ discard block |
||
| 5712 | 5728 | return true; |
| 5713 | 5729 | } |
| 5714 | 5730 | |
| 5731 | + /** |
|
| 5732 | + * @param string $file |
|
| 5733 | + */ |
|
| 5715 | 5734 | public static function check_privacy( $file ) { |
| 5716 | 5735 | static $is_site_publicly_accessible = null; |
| 5717 | 5736 | |
@@ -6285,9 +6304,7 @@ discard block |
||
| 6285 | 6304 | * |
| 6286 | 6305 | * Attached to `style_loader_src` filter. |
| 6287 | 6306 | * |
| 6288 | - * @param string $tag The tag that would link to the external asset. |
|
| 6289 | 6307 | * @param string $handle The registered handle of the script in question. |
| 6290 | - * @param string $href The url of the asset in question. |
|
| 6291 | 6308 | */ |
| 6292 | 6309 | public static function set_suffix_on_min( $src, $handle ) { |
| 6293 | 6310 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6663,8 +6680,8 @@ discard block |
||
| 6663 | 6680 | * - Absolute URLs `http://domain.com/feh.png` |
| 6664 | 6681 | * - Domain root relative URLs `/feh.png` |
| 6665 | 6682 | * |
| 6666 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 6667 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6683 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 6684 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6668 | 6685 | * |
| 6669 | 6686 | * @return mixed|string |
| 6670 | 6687 | */ |
@@ -6966,7 +6983,6 @@ discard block |
||
| 6966 | 6983 | } |
| 6967 | 6984 | |
| 6968 | 6985 | /** |
| 6969 | - * @param mixed $result Value for the user's option |
|
| 6970 | 6986 | * @return mixed |
| 6971 | 6987 | */ |
| 6972 | 6988 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -136,6 +136,10 @@ discard block |
||
| 136 | 136 | ); |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | + /** |
|
| 140 | + * @param string $service_name |
|
| 141 | + * @param string $for |
|
| 142 | + */ |
|
| 139 | 143 | static function refresh_url( $service_name, $for ) { |
| 140 | 144 | return add_query_arg( |
| 141 | 145 | array( |
@@ -150,6 +154,10 @@ discard block |
||
| 150 | 154 | ); |
| 151 | 155 | } |
| 152 | 156 | |
| 157 | + /** |
|
| 158 | + * @param string $service_name |
|
| 159 | + * @param string $id |
|
| 160 | + */ |
|
| 153 | 161 | static function disconnect_url( $service_name, $id ) { |
| 154 | 162 | return add_query_arg( |
| 155 | 163 | array( |
@@ -281,7 +281,7 @@ |
||
| 281 | 281 | * @param string $password the password. |
| 282 | 282 | * @param array $test_data the current test data. |
| 283 | 283 | * |
| 284 | - * @return bool does the test pass? |
|
| 284 | + * @return integer does the test pass? |
|
| 285 | 285 | */ |
| 286 | 286 | protected function test_preg_match( $password, $test_data ) { |
| 287 | 287 | return preg_match( $test_data['pattern'], $password ); |