@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | * - Absolute URLs `http://domain.com/feh.png` |
64 | 64 | * - Domain root relative URLs `/feh.png` |
65 | 65 | * |
66 | - * @param $css string: The raw CSS -- should be read in directly from the file. |
|
67 | - * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
66 | + * @param string $css string: The raw CSS -- should be read in directly from the file. |
|
67 | + * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from. |
|
68 | 68 | * |
69 | 69 | * @return mixed|string |
70 | 70 | */ |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | |
185 | 185 | /** |
186 | 186 | * Returns true if the site has file write access false otherwise. |
187 | - * @return string ( '1' | '0' ) |
|
187 | + * @return integer ( '1' | '0' ) |
|
188 | 188 | **/ |
189 | 189 | public static function file_system_write_access() { |
190 | 190 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
@@ -439,6 +439,7 @@ discard block |
||
439 | 439 | |
440 | 440 | /** |
441 | 441 | * Like core's get_file_data implementation, but caches the result. |
442 | + * @param string $file |
|
442 | 443 | */ |
443 | 444 | public static function get_file_data( $file, $headers ) { |
444 | 445 | //Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated |
@@ -941,7 +942,7 @@ discard block |
||
941 | 942 | * Return true if we are with multi-site or multi-network false if we are dealing with single site. |
942 | 943 | * |
943 | 944 | * @param string $option |
944 | - * @return boolean |
|
945 | + * @return string |
|
945 | 946 | */ |
946 | 947 | public function is_multisite( $option ) { |
947 | 948 | return (string) (bool) is_multisite(); |
@@ -1156,7 +1157,7 @@ discard block |
||
1156 | 1157 | } |
1157 | 1158 | /** |
1158 | 1159 | * Does the network allow admins to add new users. |
1159 | - * @return boolian |
|
1160 | + * @return boolean |
|
1160 | 1161 | */ |
1161 | 1162 | static function network_add_new_users( $option = null ) { |
1162 | 1163 | return (bool) get_site_option( 'add_new_users' ); |
@@ -1100,7 +1100,7 @@ discard block |
||
1100 | 1100 | * database which could be set to anything as opposed to what this function returns. |
1101 | 1101 | * @param bool $option |
1102 | 1102 | * |
1103 | - * @return boolean |
|
1103 | + * @return string |
|
1104 | 1104 | */ |
1105 | 1105 | public function is_main_network_option( $option ) { |
1106 | 1106 | // return '1' or '' |
@@ -1533,6 +1533,7 @@ discard block |
||
1533 | 1533 | * @param int $user_id |
1534 | 1534 | * @param string $token |
1535 | 1535 | * return bool |
1536 | + * @param boolean $is_master_user |
|
1536 | 1537 | */ |
1537 | 1538 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
1538 | 1539 | // not designed for concurrent updates |
@@ -1790,7 +1791,7 @@ discard block |
||
1790 | 1791 | * |
1791 | 1792 | * @param string $tag Tag as it appears in each module heading. |
1792 | 1793 | * |
1793 | - * @return mixed |
|
1794 | + * @return string |
|
1794 | 1795 | */ |
1795 | 1796 | public static function translate_module_tag( $tag ) { |
1796 | 1797 | return jetpack_get_module_i18n_tag( $tag ); |
@@ -1877,8 +1878,8 @@ discard block |
||
1877 | 1878 | * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR |
1878 | 1879 | * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR. |
1879 | 1880 | * |
1880 | - * @param $string |
|
1881 | - * @return mixed |
|
1881 | + * @param string $string |
|
1882 | + * @return string|null |
|
1882 | 1883 | */ |
1883 | 1884 | public static function alias_directories( $string ) { |
1884 | 1885 | // ABSPATH has a trailing slash. |
@@ -2156,6 +2157,9 @@ discard block |
||
2156 | 2157 | return self::update_active_modules( $new ); |
2157 | 2158 | } |
2158 | 2159 | |
2160 | + /** |
|
2161 | + * @param string $module |
|
2162 | + */ |
|
2159 | 2163 | public static function enable_module_configurable( $module ) { |
2160 | 2164 | $module = Jetpack::get_module_slug( $module ); |
2161 | 2165 | add_filter( 'jetpack_module_configurable_' . $module, '__return_true' ); |
@@ -2166,21 +2170,33 @@ discard block |
||
2166 | 2170 | return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) ); |
2167 | 2171 | } |
2168 | 2172 | |
2173 | + /** |
|
2174 | + * @param string $module |
|
2175 | + */ |
|
2169 | 2176 | public static function module_configuration_load( $module, $method ) { |
2170 | 2177 | $module = Jetpack::get_module_slug( $module ); |
2171 | 2178 | add_action( 'jetpack_module_configuration_load_' . $module, $method ); |
2172 | 2179 | } |
2173 | 2180 | |
2181 | + /** |
|
2182 | + * @param string $module |
|
2183 | + */ |
|
2174 | 2184 | public static function module_configuration_head( $module, $method ) { |
2175 | 2185 | $module = Jetpack::get_module_slug( $module ); |
2176 | 2186 | add_action( 'jetpack_module_configuration_head_' . $module, $method ); |
2177 | 2187 | } |
2178 | 2188 | |
2189 | + /** |
|
2190 | + * @param string $module |
|
2191 | + */ |
|
2179 | 2192 | public static function module_configuration_screen( $module, $method ) { |
2180 | 2193 | $module = Jetpack::get_module_slug( $module ); |
2181 | 2194 | add_action( 'jetpack_module_configuration_screen_' . $module, $method ); |
2182 | 2195 | } |
2183 | 2196 | |
2197 | + /** |
|
2198 | + * @param string $module |
|
2199 | + */ |
|
2184 | 2200 | public static function module_configuration_activation_screen( $module, $method ) { |
2185 | 2201 | $module = Jetpack::get_module_slug( $module ); |
2186 | 2202 | add_action( 'display_activate_module_setting_' . $module, $method ); |
@@ -2188,6 +2204,9 @@ discard block |
||
2188 | 2204 | |
2189 | 2205 | /* Installation */ |
2190 | 2206 | |
2207 | + /** |
|
2208 | + * @param string $message |
|
2209 | + */ |
|
2191 | 2210 | public static function bail_on_activation( $message, $deactivate = true ) { |
2192 | 2211 | ?> |
2193 | 2212 | <!doctype html> |
@@ -2928,7 +2947,7 @@ discard block |
||
2928 | 2947 | * Add help to the Jetpack page |
2929 | 2948 | * |
2930 | 2949 | * @since Jetpack (1.2.3) |
2931 | - * @return false if not the Jetpack page |
|
2950 | + * @return false|null if not the Jetpack page |
|
2932 | 2951 | */ |
2933 | 2952 | function admin_help() { |
2934 | 2953 | $current_screen = get_current_screen(); |
@@ -4003,6 +4022,7 @@ discard block |
||
4003 | 4022 | /** |
4004 | 4023 | * Returns the requested Jetpack API URL |
4005 | 4024 | * |
4025 | + * @param string $relative_url |
|
4006 | 4026 | * @return string |
4007 | 4027 | */ |
4008 | 4028 | public static function api_url( $relative_url ) { |
@@ -4184,6 +4204,7 @@ discard block |
||
4184 | 4204 | * Note these tokens are unique per call, NOT static per site for connecting. |
4185 | 4205 | * |
4186 | 4206 | * @since 2.6 |
4207 | + * @param string $action |
|
4187 | 4208 | * @return array |
4188 | 4209 | */ |
4189 | 4210 | public static function generate_secrets( $action, $user_id = false, $exp = 600 ) { |
@@ -4703,7 +4724,6 @@ discard block |
||
4703 | 4724 | /** |
4704 | 4725 | * Report authentication status to the WP REST API. |
4705 | 4726 | * |
4706 | - * @param WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not |
|
4707 | 4727 | * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication} |
4708 | 4728 | */ |
4709 | 4729 | public function wp_rest_authentication_errors( $value ) { |
@@ -4713,6 +4733,10 @@ discard block |
||
4713 | 4733 | return $this->rest_authentication_status; |
4714 | 4734 | } |
4715 | 4735 | |
4736 | + /** |
|
4737 | + * @param integer $timestamp |
|
4738 | + * @param string $nonce |
|
4739 | + */ |
|
4716 | 4740 | function add_nonce( $timestamp, $nonce ) { |
4717 | 4741 | global $wpdb; |
4718 | 4742 | static $nonces_used_this_request = array(); |
@@ -4858,6 +4882,7 @@ discard block |
||
4858 | 4882 | * @param string $key |
4859 | 4883 | * @param string $value |
4860 | 4884 | * @param bool $restate private |
4885 | + * @return string |
|
4861 | 4886 | */ |
4862 | 4887 | public static function state( $key = null, $value = null, $restate = false ) { |
4863 | 4888 | static $state = array(); |
@@ -4914,6 +4939,9 @@ discard block |
||
4914 | 4939 | Jetpack::state( null, null, true ); |
4915 | 4940 | } |
4916 | 4941 | |
4942 | + /** |
|
4943 | + * @param string $file |
|
4944 | + */ |
|
4917 | 4945 | public static function check_privacy( $file ) { |
4918 | 4946 | static $is_site_publicly_accessible = null; |
4919 | 4947 | |
@@ -5378,9 +5406,7 @@ discard block |
||
5378 | 5406 | * |
5379 | 5407 | * Attached to `style_loader_src` filter. |
5380 | 5408 | * |
5381 | - * @param string $tag The tag that would link to the external asset. |
|
5382 | 5409 | * @param string $handle The registered handle of the script in question. |
5383 | - * @param string $href The url of the asset in question. |
|
5384 | 5410 | */ |
5385 | 5411 | public static function set_suffix_on_min( $src, $handle ) { |
5386 | 5412 | if ( false === strpos( $src, '.min.css' ) ) { |
@@ -5692,7 +5718,7 @@ discard block |
||
5692 | 5718 | * |
5693 | 5719 | * @param string $option_name |
5694 | 5720 | * |
5695 | - * @return bool |
|
5721 | + * @return false|null |
|
5696 | 5722 | */ |
5697 | 5723 | public static function jumpstart_has_updated_module_option( $option_name = '' ) { |
5698 | 5724 | // Bail if Jump Start has already been dismissed |
@@ -5719,7 +5745,7 @@ discard block |
||
5719 | 5745 | /** |
5720 | 5746 | * Stores and prints out domains to prefetch for page speed optimization. |
5721 | 5747 | * |
5722 | - * @param mixed $new_urls |
|
5748 | + * @param string[] $new_urls |
|
5723 | 5749 | */ |
5724 | 5750 | public static function dns_prefetch( $new_urls = null ) { |
5725 | 5751 | static $prefetch_urls = array(); |
@@ -5765,7 +5791,6 @@ discard block |
||
5765 | 5791 | } |
5766 | 5792 | |
5767 | 5793 | /** |
5768 | - * @param mixed $result Value for the user's option |
|
5769 | 5794 | * @return mixed |
5770 | 5795 | */ |
5771 | 5796 | function get_user_option_meta_box_order_dashboard( $sorted ) { |