@@ -951,7 +951,7 @@ discard block |
||
| 951 | 951 | * This is ported over from the manage module, which has been deprecated and baked in here. |
| 952 | 952 | * |
| 953 | 953 | * @param $domains |
| 954 | - * @return array |
|
| 954 | + * @return string[] |
|
| 955 | 955 | */ |
| 956 | 956 | function allow_wpcom_domain( $domains ) { |
| 957 | 957 | if ( empty( $domains ) ) { |
@@ -1319,7 +1319,7 @@ discard block |
||
| 1319 | 1319 | /** |
| 1320 | 1320 | * Does the network allow admins to add new users. |
| 1321 | 1321 | * |
| 1322 | - * @return boolian |
|
| 1322 | + * @return boolean |
|
| 1323 | 1323 | */ |
| 1324 | 1324 | static function network_add_new_users( $option = null ) { |
| 1325 | 1325 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1429,7 +1429,7 @@ discard block |
||
| 1429 | 1429 | * |
| 1430 | 1430 | * @param bool $option |
| 1431 | 1431 | * |
| 1432 | - * @return boolean |
|
| 1432 | + * @return string |
|
| 1433 | 1433 | */ |
| 1434 | 1434 | public function is_main_network_option( $option ) { |
| 1435 | 1435 | // return '1' or '' |
@@ -1440,7 +1440,7 @@ discard block |
||
| 1440 | 1440 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1441 | 1441 | * |
| 1442 | 1442 | * @param string $option |
| 1443 | - * @return boolean |
|
| 1443 | + * @return string |
|
| 1444 | 1444 | */ |
| 1445 | 1445 | public function is_multisite( $option ) { |
| 1446 | 1446 | return (string) (bool) is_multisite(); |
@@ -1503,7 +1503,7 @@ discard block |
||
| 1503 | 1503 | /** |
| 1504 | 1504 | * Returns true if the site has file write access false otherwise. |
| 1505 | 1505 | * |
| 1506 | - * @return string ( '1' | '0' ) |
|
| 1506 | + * @return integer ( '1' | '0' ) |
|
| 1507 | 1507 | **/ |
| 1508 | 1508 | public static function file_system_write_access() { |
| 1509 | 1509 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2231,7 +2231,7 @@ discard block |
||
| 2231 | 2231 | * @param int $user_id The user id. |
| 2232 | 2232 | * @param string $token The user token. |
| 2233 | 2233 | * @param bool $is_master_user Whether the user is the master user. |
| 2234 | - * @return bool |
|
| 2234 | + * @return boolean|null |
|
| 2235 | 2235 | */ |
| 2236 | 2236 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
| 2237 | 2237 | _deprecated_function( __METHOD__, 'jetpack-8.0', 'Automattic\\Jetpack\\Connection\\Utils::update_user_token' ); |
@@ -2676,7 +2676,7 @@ discard block |
||
| 2676 | 2676 | * |
| 2677 | 2677 | * @param string $tag Tag as it appears in each module heading. |
| 2678 | 2678 | * |
| 2679 | - * @return mixed |
|
| 2679 | + * @return string |
|
| 2680 | 2680 | */ |
| 2681 | 2681 | public static function translate_module_tag( $tag ) { |
| 2682 | 2682 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2791,8 +2791,8 @@ discard block |
||
| 2791 | 2791 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
| 2792 | 2792 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
| 2793 | 2793 | * |
| 2794 | - * @param $string |
|
| 2795 | - * @return mixed |
|
| 2794 | + * @param string $string |
|
| 2795 | + * @return string|null |
|
| 2796 | 2796 | */ |
| 2797 | 2797 | public static function alias_directories( $string ) { |
| 2798 | 2798 | // ABSPATH has a trailing slash. |
@@ -2803,6 +2803,10 @@ discard block |
||
| 2803 | 2803 | return $string; |
| 2804 | 2804 | } |
| 2805 | 2805 | |
| 2806 | + /** |
|
| 2807 | + * @param boolean $redirect |
|
| 2808 | + * @param boolean $send_state_messages |
|
| 2809 | + */ |
|
| 2806 | 2810 | public static function activate_default_modules( |
| 2807 | 2811 | $min_version = false, |
| 2808 | 2812 | $max_version = false, |
@@ -3086,6 +3090,9 @@ discard block |
||
| 3086 | 3090 | return self::update_active_modules( $new ); |
| 3087 | 3091 | } |
| 3088 | 3092 | |
| 3093 | + /** |
|
| 3094 | + * @param string $module |
|
| 3095 | + */ |
|
| 3089 | 3096 | public static function enable_module_configurable( $module ) { |
| 3090 | 3097 | $module = self::get_module_slug( $module ); |
| 3091 | 3098 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3114,6 +3121,10 @@ discard block |
||
| 3114 | 3121 | } |
| 3115 | 3122 | |
| 3116 | 3123 | /* Installation */ |
| 3124 | + |
|
| 3125 | + /** |
|
| 3126 | + * @param string $message |
|
| 3127 | + */ |
|
| 3117 | 3128 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 3118 | 3129 | ?> |
| 3119 | 3130 | <!doctype html> |
@@ -3879,7 +3890,7 @@ discard block |
||
| 3879 | 3890 | * Add help to the Jetpack page |
| 3880 | 3891 | * |
| 3881 | 3892 | * @since Jetpack (1.2.3) |
| 3882 | - * @return false if not the Jetpack page |
|
| 3893 | + * @return false|null if not the Jetpack page |
|
| 3883 | 3894 | */ |
| 3884 | 3895 | function admin_help() { |
| 3885 | 3896 | $current_screen = get_current_screen(); |
@@ -4583,6 +4594,7 @@ discard block |
||
| 4583 | 4594 | |
| 4584 | 4595 | /** |
| 4585 | 4596 | * Record a stat for later output. This will only currently output in the admin_footer. |
| 4597 | + * @param string $group |
|
| 4586 | 4598 | */ |
| 4587 | 4599 | function stat( $group, $detail ) { |
| 4588 | 4600 | $this->initialize_stats(); |
@@ -4996,6 +5008,9 @@ discard block |
||
| 4996 | 5008 | return $url; |
| 4997 | 5009 | } |
| 4998 | 5010 | |
| 5011 | + /** |
|
| 5012 | + * @param string $actionurl |
|
| 5013 | + */ |
|
| 4999 | 5014 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
| 5000 | 5015 | $actionurl = str_replace( '&', '&', $actionurl ); |
| 5001 | 5016 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -5286,7 +5301,7 @@ discard block |
||
| 5286 | 5301 | * @param String $action The action name. |
| 5287 | 5302 | * @param Integer $user_id The user identifier. |
| 5288 | 5303 | * @param Integer $exp Expiration time in seconds. |
| 5289 | - * @return array |
|
| 5304 | + * @return boolean |
|
| 5290 | 5305 | */ |
| 5291 | 5306 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
| 5292 | 5307 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5542,7 +5557,6 @@ discard block |
||
| 5542 | 5557 | * @deprecated since 8.9.0 |
| 5543 | 5558 | * @see Automattic\Jetpack\Connection\Rest_Authentication::wp_rest_authentication_errors() |
| 5544 | 5559 | * |
| 5545 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
| 5546 | 5560 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
| 5547 | 5561 | */ |
| 5548 | 5562 | public function wp_rest_authentication_errors( $value ) { |
@@ -5635,6 +5649,7 @@ discard block |
||
| 5635 | 5649 | * @param string $key |
| 5636 | 5650 | * @param string $value |
| 5637 | 5651 | * @param bool $restate private |
| 5652 | + * @return string |
|
| 5638 | 5653 | */ |
| 5639 | 5654 | public static function state( $key = null, $value = null, $restate = false ) { |
| 5640 | 5655 | static $state = array(); |
@@ -5716,6 +5731,9 @@ discard block |
||
| 5716 | 5731 | return true; |
| 5717 | 5732 | } |
| 5718 | 5733 | |
| 5734 | + /** |
|
| 5735 | + * @param string $file |
|
| 5736 | + */ |
|
| 5719 | 5737 | public static function check_privacy( $file ) { |
| 5720 | 5738 | static $is_site_publicly_accessible = null; |
| 5721 | 5739 | |
@@ -5802,6 +5820,9 @@ discard block |
||
| 5802 | 5820 | } |
| 5803 | 5821 | } |
| 5804 | 5822 | |
| 5823 | + /** |
|
| 5824 | + * @param string $url |
|
| 5825 | + */ |
|
| 5805 | 5826 | public static function staticize_subdomain( $url ) { |
| 5806 | 5827 | |
| 5807 | 5828 | // Extract hostname from URL |
@@ -6313,9 +6334,7 @@ discard block |
||
| 6313 | 6334 | * |
| 6314 | 6335 | * Attached to `style_loader_src` filter. |
| 6315 | 6336 | * |
| 6316 | - * @param string $tag The tag that would link to the external asset. |
|
| 6317 | 6337 | * @param string $handle The registered handle of the script in question. |
| 6318 | - * @param string $href The url of the asset in question. |
|
| 6319 | 6338 | */ |
| 6320 | 6339 | public static function set_suffix_on_min( $src, $handle ) { |
| 6321 | 6340 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6563,8 +6582,8 @@ discard block |
||
| 6563 | 6582 | * - Absolute URLs `http://domain.com/feh.png` |
| 6564 | 6583 | * - Domain root relative URLs `/feh.png` |
| 6565 | 6584 | * |
| 6566 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 6567 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6585 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 6586 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6568 | 6587 | * |
| 6569 | 6588 | * @return mixed|string |
| 6570 | 6589 | */ |
@@ -6805,6 +6824,10 @@ discard block |
||
| 6805 | 6824 | * @param string | url |
| 6806 | 6825 | * @return string | url without the guff |
| 6807 | 6826 | */ |
| 6827 | + |
|
| 6828 | + /** |
|
| 6829 | + * @param string $url |
|
| 6830 | + */ |
|
| 6808 | 6831 | public static function build_raw_urls( $url ) { |
| 6809 | 6832 | jetpack_deprecated_function( __METHOD__, 'jetpack_get_site_suffix', '9.2' ); |
| 6810 | 6833 | $strip_http = '/.*?:\/\//i'; |
@@ -6864,7 +6887,6 @@ discard block |
||
| 6864 | 6887 | } |
| 6865 | 6888 | |
| 6866 | 6889 | /** |
| 6867 | - * @param mixed $result Value for the user's option |
|
| 6868 | 6890 | * @return mixed |
| 6869 | 6891 | */ |
| 6870 | 6892 | function get_user_option_meta_box_order_dashboard( $sorted ) { |