@@ -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 ) { |