@@ -951,7 +951,7 @@ discard block |
||
951 | 951 | } |
952 | 952 | /** |
953 | 953 | * Does the network allow admins to add new users. |
954 | - * @return boolian |
|
954 | + * @return boolean |
|
955 | 955 | */ |
956 | 956 | static function network_add_new_users( $option = null ) { |
957 | 957 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1056,7 +1056,7 @@ discard block |
||
1056 | 1056 | * database which could be set to anything as opposed to what this function returns. |
1057 | 1057 | * @param bool $option |
1058 | 1058 | * |
1059 | - * @return boolean |
|
1059 | + * @return string |
|
1060 | 1060 | */ |
1061 | 1061 | public function is_main_network_option( $option ) { |
1062 | 1062 | // return '1' or '' |
@@ -1067,7 +1067,7 @@ discard block |
||
1067 | 1067 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
1068 | 1068 | * |
1069 | 1069 | * @param string $option |
1070 | - * @return boolean |
|
1070 | + * @return string |
|
1071 | 1071 | */ |
1072 | 1072 | public function is_multisite( $option ) { |
1073 | 1073 | return (string) (bool) is_multisite(); |
@@ -1129,7 +1129,7 @@ discard block |
||
1129 | 1129 | |
1130 | 1130 | /** |
1131 | 1131 | * Returns true if the site has file write access false otherwise. |
1132 | - * @return string ( '1' | '0' ) |
|
1132 | + * @return integer ( '1' | '0' ) |
|
1133 | 1133 | **/ |
1134 | 1134 | public static function file_system_write_access() { |
1135 | 1135 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -1368,6 +1368,7 @@ discard block |
||
1368 | 1368 | * @access public |
1369 | 1369 | * @static |
1370 | 1370 | * |
1371 | + * @param string $feature |
|
1371 | 1372 | * @return bool True if plan supports feature, false if not |
1372 | 1373 | */ |
1373 | 1374 | public static function active_plan_supports( $feature ) { |
@@ -1904,6 +1905,7 @@ discard block |
||
1904 | 1905 | * @param int $user_id |
1905 | 1906 | * @param string $token |
1906 | 1907 | * return bool |
1908 | + * @param boolean $is_master_user |
|
1907 | 1909 | */ |
1908 | 1910 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
1909 | 1911 | // not designed for concurrent updates |
@@ -2298,6 +2300,7 @@ discard block |
||
2298 | 2300 | |
2299 | 2301 | /** |
2300 | 2302 | * Like core's get_file_data implementation, but caches the result. |
2303 | + * @param string $file |
|
2301 | 2304 | */ |
2302 | 2305 | public static function get_file_data( $file, $headers ) { |
2303 | 2306 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -2343,7 +2346,7 @@ discard block |
||
2343 | 2346 | * |
2344 | 2347 | * @param string $tag Tag as it appears in each module heading. |
2345 | 2348 | * |
2346 | - * @return mixed |
|
2349 | + * @return string |
|
2347 | 2350 | */ |
2348 | 2351 | public static function translate_module_tag( $tag ) { |
2349 | 2352 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -2446,8 +2449,8 @@ discard block |
||
2446 | 2449 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
2447 | 2450 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
2448 | 2451 | * |
2449 | - * @param $string |
|
2450 | - * @return mixed |
|
2452 | + * @param string $string |
|
2453 | + * @return string|null |
|
2451 | 2454 | */ |
2452 | 2455 | public static function alias_directories( $string ) { |
2453 | 2456 | // ABSPATH has a trailing slash. |
@@ -2721,6 +2724,9 @@ discard block |
||
2721 | 2724 | return self::update_active_modules( $new ); |
2722 | 2725 | } |
2723 | 2726 | |
2727 | + /** |
|
2728 | + * @param string $module |
|
2729 | + */ |
|
2724 | 2730 | public static function enable_module_configurable( $module ) { |
2725 | 2731 | $module = Jetpack::get_module_slug( $module ); |
2726 | 2732 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2731,21 +2737,33 @@ discard block |
||
2731 | 2737 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
2732 | 2738 | } |
2733 | 2739 | |
2740 | + /** |
|
2741 | + * @param string $module |
|
2742 | + */ |
|
2734 | 2743 | public static function module_configuration_load( $module, $method ) { |
2735 | 2744 | $module = Jetpack::get_module_slug( $module ); |
2736 | 2745 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
2737 | 2746 | } |
2738 | 2747 | |
2748 | + /** |
|
2749 | + * @param string $module |
|
2750 | + */ |
|
2739 | 2751 | public static function module_configuration_head( $module, $method ) { |
2740 | 2752 | $module = Jetpack::get_module_slug( $module ); |
2741 | 2753 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
2742 | 2754 | } |
2743 | 2755 | |
2756 | + /** |
|
2757 | + * @param string $module |
|
2758 | + */ |
|
2744 | 2759 | public static function module_configuration_screen( $module, $method ) { |
2745 | 2760 | $module = Jetpack::get_module_slug( $module ); |
2746 | 2761 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
2747 | 2762 | } |
2748 | 2763 | |
2764 | + /** |
|
2765 | + * @param string $module |
|
2766 | + */ |
|
2749 | 2767 | public static function module_configuration_activation_screen( $module, $method ) { |
2750 | 2768 | $module = Jetpack::get_module_slug( $module ); |
2751 | 2769 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2753,6 +2771,9 @@ discard block |
||
2753 | 2771 | |
2754 | 2772 | /* Installation */ |
2755 | 2773 | |
2774 | + /** |
|
2775 | + * @param string $message |
|
2776 | + */ |
|
2756 | 2777 | public static function bail_on_activation( $message, $deactivate = true ) { |
2757 | 2778 | ?> |
2758 | 2779 | <!doctype html> |
@@ -3452,7 +3473,7 @@ discard block |
||
3452 | 3473 | * Add help to the Jetpack page |
3453 | 3474 | * |
3454 | 3475 | * @since Jetpack (1.2.3) |
3455 | - * @return false if not the Jetpack page |
|
3476 | + * @return false|null if not the Jetpack page |
|
3456 | 3477 | */ |
3457 | 3478 | function admin_help() { |
3458 | 3479 | $current_screen = get_current_screen(); |
@@ -4471,6 +4492,7 @@ discard block |
||
4471 | 4492 | /** |
4472 | 4493 | * Returns the requested Jetpack API URL |
4473 | 4494 | * |
4495 | + * @param string $relative_url |
|
4474 | 4496 | * @return string |
4475 | 4497 | */ |
4476 | 4498 | public static function api_url( $relative_url ) { |
@@ -4615,7 +4637,8 @@ discard block |
||
4615 | 4637 | * Note these tokens are unique per call, NOT static per site for connecting. |
4616 | 4638 | * |
4617 | 4639 | * @since 2.6 |
4618 | - * @return array |
|
4640 | + * @param string $action |
|
4641 | + * @return boolean |
|
4619 | 4642 | */ |
4620 | 4643 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
4621 | 4644 | if ( ! $user_id ) { |
@@ -5094,7 +5117,6 @@ discard block |
||
5094 | 5117 | /** |
5095 | 5118 | * Report authentication status to the WP REST API. |
5096 | 5119 | * |
5097 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
5098 | 5120 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
5099 | 5121 | */ |
5100 | 5122 | public function wp_rest_authentication_errors( $value ) { |
@@ -5104,6 +5126,10 @@ discard block |
||
5104 | 5126 | return $this->rest_authentication_status; |
5105 | 5127 | } |
5106 | 5128 | |
5129 | + /** |
|
5130 | + * @param integer $timestamp |
|
5131 | + * @param string $nonce |
|
5132 | + */ |
|
5107 | 5133 | function add_nonce( $timestamp, $nonce ) { |
5108 | 5134 | global $wpdb; |
5109 | 5135 | static $nonces_used_this_request = array(); |
@@ -5249,6 +5275,7 @@ discard block |
||
5249 | 5275 | * @param string $key |
5250 | 5276 | * @param string $value |
5251 | 5277 | * @param bool $restate private |
5278 | + * @return string |
|
5252 | 5279 | */ |
5253 | 5280 | public static function state( $key = null, $value = null, $restate = false ) { |
5254 | 5281 | static $state = array(); |
@@ -5305,6 +5332,9 @@ discard block |
||
5305 | 5332 | Jetpack::state( null, null, true ); |
5306 | 5333 | } |
5307 | 5334 | |
5335 | + /** |
|
5336 | + * @param string $file |
|
5337 | + */ |
|
5308 | 5338 | public static function check_privacy( $file ) { |
5309 | 5339 | static $is_site_publicly_accessible = null; |
5310 | 5340 | |
@@ -6038,8 +6068,8 @@ discard block |
||
6038 | 6068 | * - Absolute URLs `http://domain.com/feh.png` |
6039 | 6069 | * - Domain root relative URLs `/feh.png` |
6040 | 6070 | * |
6041 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
6042 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6071 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
6072 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
6043 | 6073 | * |
6044 | 6074 | * @return mixed|string |
6045 | 6075 | */ |
@@ -6330,7 +6360,7 @@ discard block |
||
6330 | 6360 | * |
6331 | 6361 | * @param string $option_name |
6332 | 6362 | * |
6333 | - * @return bool |
|
6363 | + * @return false|null |
|
6334 | 6364 | */ |
6335 | 6365 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
6336 | 6366 | // Bail if Jump Start has already been dismissed |
@@ -6421,7 +6451,6 @@ discard block |
||
6421 | 6451 | } |
6422 | 6452 | |
6423 | 6453 | /** |
6424 | - * @param mixed $result Value for the user's option |
|
6425 | 6454 | * @return mixed |
6426 | 6455 | */ |
6427 | 6456 | function get_user_option_meta_box_order_dashboard( $sorted ) { |
@@ -125,6 +125,9 @@ discard block |
||
125 | 125 | wp_enqueue_script( 'a8c_wpcom_masterbar_overrides', $this->wpcom_static_url( '/wp-content/mu-plugins/admin-bar/masterbar-overrides/masterbar.js' ), array(), JETPACK__VERSION ); |
126 | 126 | } |
127 | 127 | |
128 | + /** |
|
129 | + * @param string $file |
|
130 | + */ |
|
128 | 131 | function wpcom_static_url( $file ) { |
129 | 132 | if ( ! empty( $this->sandbox_url ) ) { |
130 | 133 | // For testing undeployed changes to remotely enqueued scripts and styles. |
@@ -307,6 +310,9 @@ discard block |
||
307 | 310 | return $primary_anchor . $secondary_anchor; |
308 | 311 | } |
309 | 312 | |
313 | + /** |
|
314 | + * @param string $class |
|
315 | + */ |
|
310 | 316 | public function create_menu_item_anchor( $class, $url, $label, $id ) { |
311 | 317 | return '<a href="' . $url . '" class="' . $class . '" id="' . $id . '">' . $label . '</a>'; |
312 | 318 | } |
@@ -105,6 +105,9 @@ |
||
105 | 105 | return isset( $importers[ $importer ] ) ? $importers[ $importer ][0] : 'Unknown Importer'; |
106 | 106 | } |
107 | 107 | |
108 | + /** |
|
109 | + * @param string $class_name |
|
110 | + */ |
|
108 | 111 | private function is_importer( $backtrace, $class_name ) { |
109 | 112 | foreach ( $backtrace as $trace ) { |
110 | 113 | if ( strpos( $trace, $class_name ) !== false ) { |
@@ -148,6 +148,7 @@ discard block |
||
148 | 148 | * Helper function that is used when getting home or siteurl values. Decides |
149 | 149 | * whether to get the raw or filtered value. |
150 | 150 | * |
151 | + * @param string $url_type |
|
151 | 152 | * @return string |
152 | 153 | */ |
153 | 154 | public static function get_raw_or_filtered_url( $url_type ) { |
@@ -197,6 +198,9 @@ discard block |
||
197 | 198 | return self::get_protocol_normalized_url( 'main_network_site_url', network_site_url() ); |
198 | 199 | } |
199 | 200 | |
201 | + /** |
|
202 | + * @param string $callable |
|
203 | + */ |
|
200 | 204 | public static function get_protocol_normalized_url( $callable, $new_value ) { |
201 | 205 | $option_key = self::HTTPS_CHECK_OPTION_PREFIX . $callable; |
202 | 206 | |
@@ -236,6 +240,9 @@ discard block |
||
236 | 240 | return $value; |
237 | 241 | } |
238 | 242 | |
243 | + /** |
|
244 | + * @param string $url_function |
|
245 | + */ |
|
239 | 246 | public static function normalize_www_in_url( $option, $url_function ) { |
240 | 247 | $url = wp_parse_url( call_user_func( $url_function ) ); |
241 | 248 | $option_url = wp_parse_url( get_option( $option ) ); |
@@ -598,7 +598,6 @@ discard block |
||
598 | 598 | * @uses Jetpack::disconnect(); |
599 | 599 | * @since 4.3.0 |
600 | 600 | * |
601 | - * @param WP_REST_Request $request The request sent to the WP REST API. |
|
602 | 601 | * |
603 | 602 | * @return string|WP_Error A raw URL if the connection URL could be built; error message otherwise. |
604 | 603 | */ |
@@ -618,7 +617,6 @@ discard block |
||
618 | 617 | * |
619 | 618 | * @since 4.3.0 |
620 | 619 | * |
621 | - * @param WP_REST_Request $request The request sent to the WP REST API. |
|
622 | 620 | * |
623 | 621 | * @return object |
624 | 622 | */ |