@@ -795,7 +795,7 @@ discard block |
||
| 795 | 795 | * This is ported over from the manage module, which has been deprecated and baked in here. |
| 796 | 796 | * |
| 797 | 797 | * @param $domains |
| 798 | - * @return array |
|
| 798 | + * @return string[] |
|
| 799 | 799 | */ |
| 800 | 800 | function allow_wpcom_domain( $domains ) { |
| 801 | 801 | if ( empty( $domains ) ) { |
@@ -1210,7 +1210,7 @@ discard block |
||
| 1210 | 1210 | /** |
| 1211 | 1211 | * Does the network allow admins to add new users. |
| 1212 | 1212 | * |
| 1213 | - * @return boolian |
|
| 1213 | + * @return boolean |
|
| 1214 | 1214 | */ |
| 1215 | 1215 | static function network_add_new_users( $option = null ) { |
| 1216 | 1216 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1320,7 +1320,7 @@ discard block |
||
| 1320 | 1320 | * |
| 1321 | 1321 | * @param bool $option |
| 1322 | 1322 | * |
| 1323 | - * @return boolean |
|
| 1323 | + * @return string |
|
| 1324 | 1324 | */ |
| 1325 | 1325 | public function is_main_network_option( $option ) { |
| 1326 | 1326 | // return '1' or '' |
@@ -1331,7 +1331,7 @@ discard block |
||
| 1331 | 1331 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
| 1332 | 1332 | * |
| 1333 | 1333 | * @param string $option |
| 1334 | - * @return boolean |
|
| 1334 | + * @return string |
|
| 1335 | 1335 | */ |
| 1336 | 1336 | public function is_multisite( $option ) { |
| 1337 | 1337 | return (string) (bool) is_multisite(); |
@@ -1394,7 +1394,7 @@ discard block |
||
| 1394 | 1394 | /** |
| 1395 | 1395 | * Returns true if the site has file write access false otherwise. |
| 1396 | 1396 | * |
| 1397 | - * @return string ( '1' | '0' ) |
|
| 1397 | + * @return integer ( '1' | '0' ) |
|
| 1398 | 1398 | **/ |
| 1399 | 1399 | public static function file_system_write_access() { |
| 1400 | 1400 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2128,6 +2128,7 @@ discard block |
||
| 2128 | 2128 | * @param int $user_id |
| 2129 | 2129 | * @param string $token |
| 2130 | 2130 | * return bool |
| 2131 | + * @param boolean $is_master_user |
|
| 2131 | 2132 | */ |
| 2132 | 2133 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
| 2133 | 2134 | // not designed for concurrent updates |
@@ -2581,7 +2582,7 @@ discard block |
||
| 2581 | 2582 | * |
| 2582 | 2583 | * @param string $tag Tag as it appears in each module heading. |
| 2583 | 2584 | * |
| 2584 | - * @return mixed |
|
| 2585 | + * @return string |
|
| 2585 | 2586 | */ |
| 2586 | 2587 | public static function translate_module_tag( $tag ) { |
| 2587 | 2588 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2753,8 +2754,8 @@ discard block |
||
| 2753 | 2754 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
| 2754 | 2755 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
| 2755 | 2756 | * |
| 2756 | - * @param $string |
|
| 2757 | - * @return mixed |
|
| 2757 | + * @param string $string |
|
| 2758 | + * @return string|null |
|
| 2758 | 2759 | */ |
| 2759 | 2760 | public static function alias_directories( $string ) { |
| 2760 | 2761 | // ABSPATH has a trailing slash. |
@@ -2765,6 +2766,10 @@ discard block |
||
| 2765 | 2766 | return $string; |
| 2766 | 2767 | } |
| 2767 | 2768 | |
| 2769 | + /** |
|
| 2770 | + * @param boolean $redirect |
|
| 2771 | + * @param boolean $send_state_messages |
|
| 2772 | + */ |
|
| 2768 | 2773 | public static function activate_default_modules( |
| 2769 | 2774 | $min_version = false, |
| 2770 | 2775 | $max_version = false, |
@@ -3048,6 +3053,9 @@ discard block |
||
| 3048 | 3053 | return self::update_active_modules( $new ); |
| 3049 | 3054 | } |
| 3050 | 3055 | |
| 3056 | + /** |
|
| 3057 | + * @param string $module |
|
| 3058 | + */ |
|
| 3051 | 3059 | public static function enable_module_configurable( $module ) { |
| 3052 | 3060 | $module = self::get_module_slug( $module ); |
| 3053 | 3061 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -3076,6 +3084,10 @@ discard block |
||
| 3076 | 3084 | } |
| 3077 | 3085 | |
| 3078 | 3086 | /* Installation */ |
| 3087 | + |
|
| 3088 | + /** |
|
| 3089 | + * @param string $message |
|
| 3090 | + */ |
|
| 3079 | 3091 | public static function bail_on_activation( $message, $deactivate = true ) { |
| 3080 | 3092 | ?> |
| 3081 | 3093 | <!doctype html> |
@@ -3841,7 +3853,7 @@ discard block |
||
| 3841 | 3853 | * Add help to the Jetpack page |
| 3842 | 3854 | * |
| 3843 | 3855 | * @since Jetpack (1.2.3) |
| 3844 | - * @return false if not the Jetpack page |
|
| 3856 | + * @return false|null if not the Jetpack page |
|
| 3845 | 3857 | */ |
| 3846 | 3858 | function admin_help() { |
| 3847 | 3859 | $current_screen = get_current_screen(); |
@@ -4790,6 +4802,9 @@ discard block |
||
| 4790 | 4802 | return $url; |
| 4791 | 4803 | } |
| 4792 | 4804 | |
| 4805 | + /** |
|
| 4806 | + * @return string |
|
| 4807 | + */ |
|
| 4793 | 4808 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
| 4794 | 4809 | $actionurl = str_replace( '&', '&', $actionurl ); |
| 4795 | 4810 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -5076,7 +5091,8 @@ discard block |
||
| 5076 | 5091 | * Note these tokens are unique per call, NOT static per site for connecting. |
| 5077 | 5092 | * |
| 5078 | 5093 | * @since 2.6 |
| 5079 | - * @return array |
|
| 5094 | + * @param string $action |
|
| 5095 | + * @return boolean |
|
| 5080 | 5096 | */ |
| 5081 | 5097 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
| 5082 | 5098 | if ( false === $user_id ) { |
@@ -5368,7 +5384,6 @@ discard block |
||
| 5368 | 5384 | /** |
| 5369 | 5385 | * Report authentication status to the WP REST API. |
| 5370 | 5386 | * |
| 5371 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
| 5372 | 5387 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
| 5373 | 5388 | */ |
| 5374 | 5389 | public function wp_rest_authentication_errors( $value ) { |
@@ -5470,6 +5485,7 @@ discard block |
||
| 5470 | 5485 | * @param string $key |
| 5471 | 5486 | * @param string $value |
| 5472 | 5487 | * @param bool $restate private |
| 5488 | + * @return string |
|
| 5473 | 5489 | */ |
| 5474 | 5490 | public static function state( $key = null, $value = null, $restate = false ) { |
| 5475 | 5491 | static $state = array(); |
@@ -5528,6 +5544,9 @@ discard block |
||
| 5528 | 5544 | self::state( null, null, true ); |
| 5529 | 5545 | } |
| 5530 | 5546 | |
| 5547 | + /** |
|
| 5548 | + * @param string $file |
|
| 5549 | + */ |
|
| 5531 | 5550 | public static function check_privacy( $file ) { |
| 5532 | 5551 | static $is_site_publicly_accessible = null; |
| 5533 | 5552 | |
@@ -5608,6 +5627,9 @@ discard block |
||
| 5608 | 5627 | } |
| 5609 | 5628 | } |
| 5610 | 5629 | |
| 5630 | + /** |
|
| 5631 | + * @param string $url |
|
| 5632 | + */ |
|
| 5611 | 5633 | public static function staticize_subdomain( $url ) { |
| 5612 | 5634 | |
| 5613 | 5635 | // Extract hostname from URL |
@@ -6177,9 +6199,7 @@ discard block |
||
| 6177 | 6199 | * |
| 6178 | 6200 | * Attached to `style_loader_src` filter. |
| 6179 | 6201 | * |
| 6180 | - * @param string $tag The tag that would link to the external asset. |
|
| 6181 | 6202 | * @param string $handle The registered handle of the script in question. |
| 6182 | - * @param string $href The url of the asset in question. |
|
| 6183 | 6203 | */ |
| 6184 | 6204 | public static function set_suffix_on_min( $src, $handle ) { |
| 6185 | 6205 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6370,8 +6390,8 @@ discard block |
||
| 6370 | 6390 | * - Absolute URLs `http://domain.com/feh.png` |
| 6371 | 6391 | * - Domain root relative URLs `/feh.png` |
| 6372 | 6392 | * |
| 6373 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
| 6374 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6393 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
| 6394 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
| 6375 | 6395 | * |
| 6376 | 6396 | * @return mixed|string |
| 6377 | 6397 | */ |
@@ -6632,7 +6652,7 @@ discard block |
||
| 6632 | 6652 | /** |
| 6633 | 6653 | * Stores and prints out domains to prefetch for page speed optimization. |
| 6634 | 6654 | * |
| 6635 | - * @param mixed $new_urls |
|
| 6655 | + * @param string[] $new_urls |
|
| 6636 | 6656 | */ |
| 6637 | 6657 | public static function dns_prefetch( $new_urls = null ) { |
| 6638 | 6658 | static $prefetch_urls = array(); |
@@ -6689,7 +6709,6 @@ discard block |
||
| 6689 | 6709 | } |
| 6690 | 6710 | |
| 6691 | 6711 | /** |
| 6692 | - * @param mixed $result Value for the user's option |
|
| 6693 | 6712 | * @return mixed |
| 6694 | 6713 | */ |
| 6695 | 6714 | function get_user_option_meta_box_order_dashboard( $sorted ) { |