@@ -433,6 +433,9 @@ |
||
433 | 433 | ); |
434 | 434 | } |
435 | 435 | |
436 | + /** |
|
437 | + * @param string $column |
|
438 | + */ |
|
436 | 439 | function _build_date_range_query( $column, $range, $where ) { |
437 | 440 | global $wpdb; |
438 | 441 |
@@ -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 ); |
@@ -2492,8 +2492,8 @@ discard block |
||
2492 | 2492 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2493 | 2493 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2494 | 2494 | * |
2495 | - * @param $string |
|
2496 | - * @return mixed |
|
2495 | + * @param string $string |
|
2496 | + * @return string|null |
|
2497 | 2497 | */ |
2498 | 2498 | public static function alias_directories( $string ) { |
2499 | 2499 | // ABSPATH has a trailing slash. |
@@ -2504,6 +2504,10 @@ discard block |
||
2504 | 2504 | return $string; |
2505 | 2505 | } |
2506 | 2506 | |
2507 | + /** |
|
2508 | + * @param boolean $redirect |
|
2509 | + * @param boolean $send_state_messages |
|
2510 | + */ |
|
2507 | 2511 | public static function activate_default_modules( |
2508 | 2512 | $min_version = false, |
2509 | 2513 | $max_version = false, |
@@ -2783,6 +2787,9 @@ discard block |
||
2783 | 2787 | return self::update_active_modules( $new ); |
2784 | 2788 | } |
2785 | 2789 | |
2790 | + /** |
|
2791 | + * @param string $module |
|
2792 | + */ |
|
2786 | 2793 | public static function enable_module_configurable( $module ) { |
2787 | 2794 | $module = self::get_module_slug( $module ); |
2788 | 2795 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2811,6 +2818,10 @@ discard block |
||
2811 | 2818 | } |
2812 | 2819 | |
2813 | 2820 | /* Installation */ |
2821 | + |
|
2822 | + /** |
|
2823 | + * @param string $message |
|
2824 | + */ |
|
2814 | 2825 | public static function bail_on_activation( $message, $deactivate = true ) { |
2815 | 2826 | ?> |
2816 | 2827 | <!doctype html> |
@@ -3568,7 +3579,7 @@ discard block |
||
3568 | 3579 | * Add help to the Jetpack page |
3569 | 3580 | * |
3570 | 3581 | * @since Jetpack (1.2.3) |
3571 | - * @return false if not the Jetpack page |
|
3582 | + * @return false|null if not the Jetpack page |
|
3572 | 3583 | */ |
3573 | 3584 | function admin_help() { |
3574 | 3585 | $current_screen = get_current_screen(); |
@@ -4592,6 +4603,9 @@ discard block |
||
4592 | 4603 | return $url; |
4593 | 4604 | } |
4594 | 4605 | |
4606 | + /** |
|
4607 | + * @param string $actionurl |
|
4608 | + */ |
|
4595 | 4609 | public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) { |
4596 | 4610 | $actionurl = str_replace( '&', '&', $actionurl ); |
4597 | 4611 | return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); |
@@ -4861,7 +4875,7 @@ discard block |
||
4861 | 4875 | * @param String $action The action name. |
4862 | 4876 | * @param Integer $user_id The user identifier. |
4863 | 4877 | * @param Integer $exp Expiration time in seconds. |
4864 | - * @return array |
|
4878 | + * @return boolean |
|
4865 | 4879 | */ |
4866 | 4880 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
4867 | 4881 | return self::connection()->generate_secrets( $action, $user_id, $exp ); |
@@ -5097,7 +5111,6 @@ discard block |
||
5097 | 5111 | /** |
5098 | 5112 | * Report authentication status to the WP REST API. |
5099 | 5113 | * |
5100 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5101 | 5114 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5102 | 5115 | */ |
5103 | 5116 | public function wp_rest_authentication_errors( $value ) { |
@@ -5115,6 +5128,7 @@ discard block |
||
5115 | 5128 | * @param string $key |
5116 | 5129 | * @param string $value |
5117 | 5130 | * @param bool $restate private |
5131 | + * @return string |
|
5118 | 5132 | */ |
5119 | 5133 | public static function state( $key = null, $value = null, $restate = false ) { |
5120 | 5134 | static $state = array(); |
@@ -5196,6 +5210,9 @@ discard block |
||
5196 | 5210 | return true; |
5197 | 5211 | } |
5198 | 5212 | |
5213 | + /** |
|
5214 | + * @param string $file |
|
5215 | + */ |
|
5199 | 5216 | public static function check_privacy( $file ) { |
5200 | 5217 | static $is_site_publicly_accessible = null; |
5201 | 5218 | |
@@ -5276,6 +5293,9 @@ discard block |
||
5276 | 5293 | } |
5277 | 5294 | } |
5278 | 5295 | |
5296 | + /** |
|
5297 | + * @param string $url |
|
5298 | + */ |
|
5279 | 5299 | public static function staticize_subdomain( $url ) { |
5280 | 5300 | |
5281 | 5301 | // Extract hostname from URL |
@@ -5776,9 +5796,7 @@ discard block |
||
5776 | 5796 | * |
5777 | 5797 | * Attached to `style_loader_src` filter. |
5778 | 5798 | * |
5779 | - * @param string $tag The tag that would link to the external asset. |
|
5780 | 5799 | * @param string $handle The registered handle of the script in question. |
5781 | - * @param string $href The url of the asset in question. |
|
5782 | 5800 | */ |
5783 | 5801 | public static function set_suffix_on_min( $src, $handle ) { |
5784 | 5802 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -6020,8 +6038,8 @@ discard block |
||
6020 | 6038 | * - Absolute URLs `http://domain.com/feh.png` |
6021 | 6039 | * - Domain root relative URLs `/feh.png` |
6022 | 6040 | * |
6023 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6024 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6041 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6042 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6025 | 6043 | * |
6026 | 6044 | * @return mixed|string |
6027 | 6045 | */ |
@@ -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 ) { |