Completed
Push — add/affiliate-code-jitm-urls ( 74c64c )
by
unknown
06:43
created
class.jetpack.php 1 patch
Doc Comments   +45 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1222,7 +1222,7 @@  discard block
 block discarded – undo
1222 1222
 	}
1223 1223
 	/**
1224 1224
 	 * Does the network allow admins to add new users.
1225
-	 * @return boolian
1225
+	 * @return boolean
1226 1226
 	 */
1227 1227
 	static function network_add_new_users( $option = null ) {
1228 1228
 		return (bool) get_site_option( 'add_new_users' );
@@ -1327,7 +1327,7 @@  discard block
 block discarded – undo
1327 1327
 	 * database which could be set to anything as opposed to what this function returns.
1328 1328
 	 * @param  bool  $option
1329 1329
 	 *
1330
-	 * @return boolean
1330
+	 * @return string
1331 1331
 	 */
1332 1332
 	public function is_main_network_option( $option ) {
1333 1333
 		// return '1' or ''
@@ -1338,7 +1338,7 @@  discard block
 block discarded – undo
1338 1338
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1339 1339
 	 *
1340 1340
 	 * @param  string  $option
1341
-	 * @return boolean
1341
+	 * @return string
1342 1342
 	 */
1343 1343
 	public function is_multisite( $option ) {
1344 1344
 		return (string) (bool) is_multisite();
@@ -1400,7 +1400,7 @@  discard block
 block discarded – undo
1400 1400
 
1401 1401
 	/**
1402 1402
 	 * Returns true if the site has file write access false otherwise.
1403
-	 * @return string ( '1' | '0' )
1403
+	 * @return integer ( '1' | '0' )
1404 1404
 	 **/
1405 1405
 	public static function file_system_write_access() {
1406 1406
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2256,6 +2256,7 @@  discard block
 block discarded – undo
2256 2256
 	 * @param int $user_id
2257 2257
 	 * @param string $token
2258 2258
 	 * return bool
2259
+	 * @param boolean $is_master_user
2259 2260
 	 */
2260 2261
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2261 2262
 		// not designed for concurrent updates
@@ -2658,6 +2659,7 @@  discard block
 block discarded – undo
2658 2659
 
2659 2660
 	/**
2660 2661
 	 * Like core's get_file_data implementation, but caches the result.
2662
+	 * @param string $file
2661 2663
 	 */
2662 2664
 	public static function get_file_data( $file, $headers ) {
2663 2665
 		//Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated
@@ -2694,7 +2696,7 @@  discard block
 block discarded – undo
2694 2696
 	 *
2695 2697
 	 * @param string $tag Tag as it appears in each module heading.
2696 2698
 	 *
2697
-	 * @return mixed
2699
+	 * @return string
2698 2700
 	 */
2699 2701
 	public static function translate_module_tag( $tag ) {
2700 2702
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2859,8 +2861,8 @@  discard block
 block discarded – undo
2859 2861
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2860 2862
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2861 2863
 	 *
2862
-	 * @param $string
2863
-	 * @return mixed
2864
+	 * @param string $string
2865
+	 * @return string|null
2864 2866
 	 */
2865 2867
 	public static function alias_directories( $string ) {
2866 2868
 		// ABSPATH has a trailing slash.
@@ -3140,6 +3142,9 @@  discard block
 block discarded – undo
3140 3142
 		return self::update_active_modules( $new );
3141 3143
 	}
3142 3144
 
3145
+	/**
3146
+	 * @param string $module
3147
+	 */
3143 3148
 	public static function enable_module_configurable( $module ) {
3144 3149
 		$module = Jetpack::get_module_slug( $module );
3145 3150
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3150,21 +3155,33 @@  discard block
 block discarded – undo
3150 3155
 		return Jetpack::admin_url( array( 'page' => 'jetpack', 'configure' => $module ) );
3151 3156
 	}
3152 3157
 
3158
+	/**
3159
+	 * @param string $module
3160
+	 */
3153 3161
 	public static function module_configuration_load( $module, $method ) {
3154 3162
 		$module = Jetpack::get_module_slug( $module );
3155 3163
 		add_action( 'jetpack_module_configuration_load_' . $module, $method );
3156 3164
 	}
3157 3165
 
3166
+	/**
3167
+	 * @param string $module
3168
+	 */
3158 3169
 	public static function module_configuration_head( $module, $method ) {
3159 3170
 		$module = Jetpack::get_module_slug( $module );
3160 3171
 		add_action( 'jetpack_module_configuration_head_' . $module, $method );
3161 3172
 	}
3162 3173
 
3174
+	/**
3175
+	 * @param string $module
3176
+	 */
3163 3177
 	public static function module_configuration_screen( $module, $method ) {
3164 3178
 		$module = Jetpack::get_module_slug( $module );
3165 3179
 		add_action( 'jetpack_module_configuration_screen_' . $module, $method );
3166 3180
 	}
3167 3181
 
3182
+	/**
3183
+	 * @param string $module
3184
+	 */
3168 3185
 	public static function module_configuration_activation_screen( $module, $method ) {
3169 3186
 		$module = Jetpack::get_module_slug( $module );
3170 3187
 		add_action( 'display_activate_module_setting_' . $module, $method );
@@ -3172,6 +3189,9 @@  discard block
 block discarded – undo
3172 3189
 
3173 3190
 /* Installation */
3174 3191
 
3192
+	/**
3193
+	 * @param string $message
3194
+	 */
3175 3195
 	public static function bail_on_activation( $message, $deactivate = true ) {
3176 3196
 ?>
3177 3197
 <!doctype html>
@@ -3932,7 +3952,7 @@  discard block
 block discarded – undo
3932 3952
 	 * Add help to the Jetpack page
3933 3953
 	 *
3934 3954
 	 * @since Jetpack (1.2.3)
3935
-	 * @return false if not the Jetpack page
3955
+	 * @return false|null if not the Jetpack page
3936 3956
 	 */
3937 3957
 	function admin_help() {
3938 3958
 		$current_screen = get_current_screen();
@@ -4828,6 +4848,9 @@  discard block
 block discarded – undo
4828 4848
 		return $url;
4829 4849
 	}
4830 4850
 
4851
+	/**
4852
+	 * @return string
4853
+	 */
4831 4854
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4832 4855
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4833 4856
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -5039,6 +5062,7 @@  discard block
 block discarded – undo
5039 5062
 	/**
5040 5063
 	 * Returns the requested Jetpack API URL
5041 5064
 	 *
5065
+	 * @param string $relative_url
5042 5066
 	 * @return string
5043 5067
 	 */
5044 5068
 	public static function api_url( $relative_url ) {
@@ -5230,6 +5254,7 @@  discard block
 block discarded – undo
5230 5254
 	 * Note these tokens are unique per call, NOT static per site for connecting.
5231 5255
 	 *
5232 5256
 	 * @since 2.6
5257
+	 * @param string $action
5233 5258
 	 * @return array
5234 5259
 	 */
5235 5260
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5763,7 +5788,6 @@  discard block
 block discarded – undo
5763 5788
 	/**
5764 5789
 	 * Report authentication status to the WP REST API.
5765 5790
 	 *
5766
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5767 5791
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5768 5792
 	 */
5769 5793
 	public function wp_rest_authentication_errors( $value ) {
@@ -5773,6 +5797,10 @@  discard block
 block discarded – undo
5773 5797
 		return $this->rest_authentication_status;
5774 5798
 	}
5775 5799
 
5800
+	/**
5801
+	 * @param integer $timestamp
5802
+	 * @param string $nonce
5803
+	 */
5776 5804
 	function add_nonce( $timestamp, $nonce ) {
5777 5805
 		global $wpdb;
5778 5806
 		static $nonces_used_this_request = array();
@@ -5918,6 +5946,7 @@  discard block
 block discarded – undo
5918 5946
 	 * @param string $key
5919 5947
 	 * @param string $value
5920 5948
 	 * @param bool $restate private
5949
+	 * @return string
5921 5950
 	 */
5922 5951
 	public static function state( $key = null, $value = null, $restate = false ) {
5923 5952
 		static $state = array();
@@ -5974,6 +6003,9 @@  discard block
 block discarded – undo
5974 6003
 		Jetpack::state( null, null, true );
5975 6004
 	}
5976 6005
 
6006
+	/**
6007
+	 * @param string $file
6008
+	 */
5977 6009
 	public static function check_privacy( $file ) {
5978 6010
 		static $is_site_publicly_accessible = null;
5979 6011
 
@@ -6591,9 +6623,7 @@  discard block
 block discarded – undo
6591 6623
 	 *
6592 6624
 	 * Attached to `style_loader_src` filter.
6593 6625
 	 *
6594
-	 * @param string $tag The tag that would link to the external asset.
6595 6626
 	 * @param string $handle The registered handle of the script in question.
6596
-	 * @param string $href The url of the asset in question.
6597 6627
 	 */
6598 6628
 	public static function set_suffix_on_min( $src, $handle ) {
6599 6629
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6774,8 +6804,8 @@  discard block
 block discarded – undo
6774 6804
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6775 6805
 	 *  - Domain root relative URLs `/feh.png`
6776 6806
 	 *
6777
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6778
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6807
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6808
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6779 6809
 	 *
6780 6810
 	 * @return mixed|string
6781 6811
 	 */
@@ -7004,7 +7034,7 @@  discard block
 block discarded – undo
7004 7034
 	 *
7005 7035
 	 * @param string $option_name
7006 7036
 	 *
7007
-	 * @return bool
7037
+	 * @return false|null
7008 7038
 	 */
7009 7039
 	public static function jumpstart_has_updated_module_option( $option_name = '' ) {
7010 7040
 		// Bail if Jump Start has already been dismissed
@@ -7045,7 +7075,7 @@  discard block
 block discarded – undo
7045 7075
 	/**
7046 7076
 	 * Stores and prints out domains to prefetch for page speed optimization.
7047 7077
 	 *
7048
-	 * @param mixed $new_urls
7078
+	 * @param string[] $new_urls
7049 7079
 	 */
7050 7080
 	public static function dns_prefetch( $new_urls = null ) {
7051 7081
 		static $prefetch_urls = array();
@@ -7091,7 +7121,6 @@  discard block
 block discarded – undo
7091 7121
 	}
7092 7122
 
7093 7123
 	/**
7094
-	 * @param mixed $result Value for the user's option
7095 7124
 	 * @return mixed
7096 7125
 	 */
7097 7126
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.