@@ -863,7 +863,7 @@ discard block |
||
863 | 863 | * This is ported over from the manage module, which has been deprecated and baked in here. |
864 | 864 | * |
865 | 865 | * @param $domains |
866 | - * @return array |
|
866 | + * @return string[] |
|
867 | 867 | */ |
868 | 868 | function allow_wpcom_domain( $domains ) { |
869 | 869 | if ( empty( $domains ) ) { |
@@ -1179,7 +1179,7 @@ discard block |
||
1179 | 1179 | /** |
1180 | 1180 | * Does the network allow admins to add new users. |
1181 | 1181 | * |
1182 | - * @return boolian |
|
1182 | + * @return boolean |
|
1183 | 1183 | */ |
1184 | 1184 | static function network_add_new_users( $option = null ) { |
1185 | 1185 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1289,7 +1289,7 @@ discard block |
||
1289 | 1289 | * |
1290 | 1290 | * @param bool $option |
1291 | 1291 | * |
1292 | - * @return boolean |
|
1292 | + * @return string |
|
1293 | 1293 | */ |
1294 | 1294 | public function is_main_network_option( $option ) { |
1295 | 1295 | // return '1' or '' |
@@ -1300,7 +1300,7 @@ discard block |
||
1300 | 1300 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1301 | 1301 | * |
1302 | 1302 | * @param string $option |
1303 | - * @return boolean |
|
1303 | + * @return string |
|
1304 | 1304 | */ |
1305 | 1305 | public function is_multisite( $option ) { |
1306 | 1306 | return (string) (bool) is_multisite(); |
@@ -1347,7 +1347,7 @@ discard block |
||
1347 | 1347 | /** |
1348 | 1348 | * Returns true if the site has file write access false otherwise. |
1349 | 1349 | * |
1350 | - * @return string ( '1' | '0' ) |
|
1350 | + * @return integer ( '1' | '0' ) |
|
1351 | 1351 | **/ |
1352 | 1352 | public static function file_system_write_access() { |
1353 | 1353 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -2346,7 +2346,7 @@ discard block |
||
2346 | 2346 | * |
2347 | 2347 | * @param string $tag Tag as it appears in each module heading. |
2348 | 2348 | * |
2349 | - * @return mixed |
|
2349 | + * @return string |
|
2350 | 2350 | */ |
2351 | 2351 | public static function translate_module_tag( $tag ) { |
2352 | 2352 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2518,8 +2518,8 @@ discard block |
||
2518 | 2518 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2519 | 2519 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2520 | 2520 | * |
2521 | - * @param $string |
|
2522 | - * @return mixed |
|
2521 | + * @param string $string |
|
2522 | + * @return string|null |
|
2523 | 2523 | */ |
2524 | 2524 | public static function alias_directories( $string ) { |
2525 | 2525 | // ABSPATH has a trailing slash. |
@@ -2530,6 +2530,10 @@ discard block |
||
2530 | 2530 | return $string; |
2531 | 2531 | } |
2532 | 2532 | |
2533 | + /** |
|
2534 | + * @param boolean $redirect |
|
2535 | + * @param boolean $send_state_messages |
|
2536 | + */ |
|
2533 | 2537 | public static function activate_default_modules( |
2534 | 2538 | $min_version = false, |
2535 | 2539 | $max_version = false, |
@@ -2809,6 +2813,9 @@ discard block |
||
2809 | 2813 | return self::update_active_modules( $new ); |
2810 | 2814 | } |
2811 | 2815 | |
2816 | + /** |
|
2817 | + * @param string $module |
|
2818 | + */ |
|
2812 | 2819 | public static function enable_module_configurable( $module ) { |
2813 | 2820 | $module = self::get_module_slug( $module ); |
2814 | 2821 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2837,6 +2844,10 @@ discard block |
||
2837 | 2844 | } |
2838 | 2845 | |
2839 | 2846 | /* Installation */ |
2847 | + |
|
2848 | + /** |
|
2849 | + * @param string $message |
|
2850 | + */ |
|
2840 | 2851 | public static function bail_on_activation( $message, $deactivate = true ) { |
2841 | 2852 | ?> |
2842 | 2853 | <!doctype html> |
@@ -3594,7 +3605,7 @@ discard block |
||
3594 | 3605 | * Add help to the Jetpack page |
3595 | 3606 | * |
3596 | 3607 | * @since Jetpack (1.2.3) |
3597 | - * @return false if not the Jetpack page |
|
3608 | + * @return false|null if not the Jetpack page |
|
3598 | 3609 | */ |
3599 | 3610 | function admin_help() { |
3600 | 3611 | $current_screen = get_current_screen(); |
@@ -4618,6 +4629,9 @@ discard block |
||
4618 | 4629 | return $url; |
4619 | 4630 | } |
4620 | 4631 | |
4632 | + /** |
|
4633 | + * @param string $actionurl |
|
4634 | + */ |
|
4621 | 4635 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
4622 | 4636 | $actionurl = str_replace( '&', '&', $actionurl ); |
4623 | 4637 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -4887,7 +4901,7 @@ discard block |
||
4887 | 4901 | * @param String $action The action name. |
4888 | 4902 | * @param Integer $user_id The user identifier. |
4889 | 4903 | * @param Integer $exp Expiration time in seconds. |
4890 | - * @return array |
|
4904 | + * @return boolean |
|
4891 | 4905 | */ |
4892 | 4906 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
4893 | 4907 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5123,7 +5137,6 @@ discard block |
||
5123 | 5137 | /** |
5124 | 5138 | * Report authentication status to the WP REST API. |
5125 | 5139 | * |
5126 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5127 | 5140 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5128 | 5141 | */ |
5129 | 5142 | public function wp_rest_authentication_errors( $value ) { |
@@ -5141,6 +5154,7 @@ discard block |
||
5141 | 5154 | * @param string $key |
5142 | 5155 | * @param string $value |
5143 | 5156 | * @param bool $restate private |
5157 | + * @return string |
|
5144 | 5158 | */ |
5145 | 5159 | public static function state( $key = null, $value = null, $restate = false ) { |
5146 | 5160 | static $state = array(); |
@@ -5222,6 +5236,9 @@ discard block |
||
5222 | 5236 | return true; |
5223 | 5237 | } |
5224 | 5238 | |
5239 | + /** |
|
5240 | + * @param string $file |
|
5241 | + */ |
|
5225 | 5242 | public static function check_privacy( $file ) { |
5226 | 5243 | static $is_site_publicly_accessible = null; |
5227 | 5244 | |
@@ -5302,6 +5319,9 @@ discard block |
||
5302 | 5319 | } |
5303 | 5320 | } |
5304 | 5321 | |
5322 | + /** |
|
5323 | + * @param string $url |
|
5324 | + */ |
|
5305 | 5325 | public static function staticize_subdomain( $url ) { |
5306 | 5326 | |
5307 | 5327 | // Extract hostname from URL |
@@ -5802,9 +5822,7 @@ discard block |
||
5802 | 5822 | * |
5803 | 5823 | * Attached to `style_loader_src` filter. |
5804 | 5824 | * |
5805 | - * @param string $tag The tag that would link to the external asset. |
|
5806 | 5825 | * @param string $handle The registered handle of the script in question. |
5807 | - * @param string $href The url of the asset in question. |
|
5808 | 5826 | */ |
5809 | 5827 | public static function set_suffix_on_min( $src, $handle ) { |
5810 | 5828 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6011,8 +6029,8 @@ discard block |
||
6011 | 6029 | * - Absolute URLs `http://domain.com/feh.png` |
6012 | 6030 | * - Domain root relative URLs `/feh.png` |
6013 | 6031 | * |
6014 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6015 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6032 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6033 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6016 | 6034 | * |
6017 | 6035 | * @return mixed|string |
6018 | 6036 | */ |
@@ -6263,7 +6281,7 @@ discard block |
||
6263 | 6281 | /** |
6264 | 6282 | * Stores and prints out domains to prefetch for page speed optimization. |
6265 | 6283 | * |
6266 | - * @param mixed $new_urls |
|
6284 | + * @param string[] $new_urls |
|
6267 | 6285 | */ |
6268 | 6286 | public static function dns_prefetch( $new_urls = null ) { |
6269 | 6287 | static $prefetch_urls = array(); |
@@ -6320,7 +6338,6 @@ discard block |
||
6320 | 6338 | } |
6321 | 6339 | |
6322 | 6340 | /** |
6323 | - * @param mixed $result Value for the user's option |
|
6324 | 6341 | * @return mixed |
6325 | 6342 | */ |
6326 | 6343 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -263,7 +263,7 @@ |
||
263 | 263 | * @param DOMElement $parent (optional) an element to which new children should be added. |
264 | 264 | * @param DOMDocument $root (optional) the parent document. |
265 | 265 | * |
266 | - * @return string|DOMDocument The rendered XML string or an object if root element is specified. |
|
266 | + * @return null|DOMNode The rendered XML string or an object if root element is specified. |
|
267 | 267 | */ |
268 | 268 | protected function array_to_xml_string( $array, $parent = null, $root = null ) { |
269 | 269 | $return_string = false; |