@@ -910,7 +910,7 @@ discard block |
||
910 | 910 | * This is ported over from the manage module, which has been deprecated and baked in here. |
911 | 911 | * |
912 | 912 | * @param $domains |
913 | - * @return array |
|
913 | + * @return string[] |
|
914 | 914 | */ |
915 | 915 | function allow_wpcom_domain( $domains ) { |
916 | 916 | if ( empty( $domains ) ) { |
@@ -1292,7 +1292,7 @@ discard block |
||
1292 | 1292 | /** |
1293 | 1293 | * Does the network allow admins to add new users. |
1294 | 1294 | * |
1295 | - * @return boolian |
|
1295 | + * @return boolean |
|
1296 | 1296 | */ |
1297 | 1297 | static function network_add_new_users( $option = null ) { |
1298 | 1298 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1402,7 +1402,7 @@ discard block |
||
1402 | 1402 | * |
1403 | 1403 | * @param bool $option |
1404 | 1404 | * |
1405 | - * @return boolean |
|
1405 | + * @return string |
|
1406 | 1406 | */ |
1407 | 1407 | public function is_main_network_option( $option ) { |
1408 | 1408 | // return '1' or '' |
@@ -1413,7 +1413,7 @@ discard block |
||
1413 | 1413 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1414 | 1414 | * |
1415 | 1415 | * @param string $option |
1416 | - * @return boolean |
|
1416 | + * @return string |
|
1417 | 1417 | */ |
1418 | 1418 | public function is_multisite( $option ) { |
1419 | 1419 | return (string) (bool) is_multisite(); |
@@ -1476,7 +1476,7 @@ discard block |
||
1476 | 1476 | /** |
1477 | 1477 | * Returns true if the site has file write access false otherwise. |
1478 | 1478 | * |
1479 | - * @return string ( '1' | '0' ) |
|
1479 | + * @return integer ( '1' | '0' ) |
|
1480 | 1480 | **/ |
1481 | 1481 | public static function file_system_write_access() { |
1482 | 1482 | 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 ); |
@@ -2788,8 +2788,8 @@ discard block |
||
2788 | 2788 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2789 | 2789 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2790 | 2790 | * |
2791 | - * @param $string |
|
2792 | - * @return mixed |
|
2791 | + * @param string $string |
|
2792 | + * @return string|null |
|
2793 | 2793 | */ |
2794 | 2794 | public static function alias_directories( $string ) { |
2795 | 2795 | // ABSPATH has a trailing slash. |
@@ -2800,6 +2800,10 @@ discard block |
||
2800 | 2800 | return $string; |
2801 | 2801 | } |
2802 | 2802 | |
2803 | + /** |
|
2804 | + * @param boolean $redirect |
|
2805 | + * @param boolean $send_state_messages |
|
2806 | + */ |
|
2803 | 2807 | public static function activate_default_modules( |
2804 | 2808 | $min_version = false, |
2805 | 2809 | $max_version = false, |
@@ -3083,6 +3087,9 @@ discard block |
||
3083 | 3087 | return self::update_active_modules( $new ); |
3084 | 3088 | } |
3085 | 3089 | |
3090 | + /** |
|
3091 | + * @param string $module |
|
3092 | + */ |
|
3086 | 3093 | public static function enable_module_configurable( $module ) { |
3087 | 3094 | $module = self::get_module_slug( $module ); |
3088 | 3095 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3111,6 +3118,10 @@ discard block |
||
3111 | 3118 | } |
3112 | 3119 | |
3113 | 3120 | /* Installation */ |
3121 | + |
|
3122 | + /** |
|
3123 | + * @param string $message |
|
3124 | + */ |
|
3114 | 3125 | public static function bail_on_activation( $message, $deactivate = true ) { |
3115 | 3126 | ?> |
3116 | 3127 | <!doctype html> |
@@ -3880,7 +3891,7 @@ discard block |
||
3880 | 3891 | * Add help to the Jetpack page |
3881 | 3892 | * |
3882 | 3893 | * @since Jetpack (1.2.3) |
3883 | - * @return false if not the Jetpack page |
|
3894 | + * @return false|null if not the Jetpack page |
|
3884 | 3895 | */ |
3885 | 3896 | function admin_help() { |
3886 | 3897 | $current_screen = get_current_screen(); |
@@ -4573,6 +4584,7 @@ discard block |
||
4573 | 4584 | |
4574 | 4585 | /** |
4575 | 4586 | * Record a stat for later output. This will only currently output in the admin_footer. |
4587 | + * @param string $group |
|
4576 | 4588 | */ |
4577 | 4589 | function stat( $group, $detail ) { |
4578 | 4590 | if ( ! isset( $this->stats[ $group ] ) ) { |
@@ -4992,6 +5004,9 @@ discard block |
||
4992 | 5004 | return $url; |
4993 | 5005 | } |
4994 | 5006 | |
5007 | + /** |
|
5008 | + * @param string $actionurl |
|
5009 | + */ |
|
4995 | 5010 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
4996 | 5011 | $actionurl = str_replace( '&', '&', $actionurl ); |
4997 | 5012 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -5294,7 +5309,7 @@ discard block |
||
5294 | 5309 | * @param String $action The action name. |
5295 | 5310 | * @param Integer $user_id The user identifier. |
5296 | 5311 | * @param Integer $exp Expiration time in seconds. |
5297 | - * @return array |
|
5312 | + * @return boolean |
|
5298 | 5313 | */ |
5299 | 5314 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
5300 | 5315 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5614,7 +5629,6 @@ discard block |
||
5614 | 5629 | /** |
5615 | 5630 | * Report authentication status to the WP REST API. |
5616 | 5631 | * |
5617 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5618 | 5632 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5619 | 5633 | */ |
5620 | 5634 | public function wp_rest_authentication_errors( $value ) { |
@@ -5741,6 +5755,7 @@ discard block |
||
5741 | 5755 | * @param string $key |
5742 | 5756 | * @param string $value |
5743 | 5757 | * @param bool $restate private |
5758 | + * @return string |
|
5744 | 5759 | */ |
5745 | 5760 | public static function state( $key = null, $value = null, $restate = false ) { |
5746 | 5761 | static $state = array(); |
@@ -5822,6 +5837,9 @@ discard block |
||
5822 | 5837 | return true; |
5823 | 5838 | } |
5824 | 5839 | |
5840 | + /** |
|
5841 | + * @param string $file |
|
5842 | + */ |
|
5825 | 5843 | public static function check_privacy( $file ) { |
5826 | 5844 | static $is_site_publicly_accessible = null; |
5827 | 5845 | |
@@ -5902,6 +5920,9 @@ discard block |
||
5902 | 5920 | } |
5903 | 5921 | } |
5904 | 5922 | |
5923 | + /** |
|
5924 | + * @param string $url |
|
5925 | + */ |
|
5905 | 5926 | public static function staticize_subdomain( $url ) { |
5906 | 5927 | |
5907 | 5928 | // Extract hostname from URL |
@@ -6402,9 +6423,7 @@ discard block |
||
6402 | 6423 | * |
6403 | 6424 | * Attached to `style_loader_src` filter. |
6404 | 6425 | * |
6405 | - * @param string $tag The tag that would link to the external asset. |
|
6406 | 6426 | * @param string $handle The registered handle of the script in question. |
6407 | - * @param string $href The url of the asset in question. |
|
6408 | 6427 | */ |
6409 | 6428 | public static function set_suffix_on_min( $src, $handle ) { |
6410 | 6429 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6646,8 +6665,8 @@ discard block |
||
6646 | 6665 | * - Absolute URLs `http://domain.com/feh.png` |
6647 | 6666 | * - Domain root relative URLs `/feh.png` |
6648 | 6667 | * |
6649 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6650 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6668 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6669 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6651 | 6670 | * |
6652 | 6671 | * @return mixed|string |
6653 | 6672 | */ |
@@ -6946,7 +6965,6 @@ discard block |
||
6946 | 6965 | } |
6947 | 6966 | |
6948 | 6967 | /** |
6949 | - * @param mixed $result Value for the user's option |
|
6950 | 6968 | * @return mixed |
6951 | 6969 | */ |
6952 | 6970 | function get_user_option_meta_box_order_dashboard( $sorted ) { |