Completed
Push — add/full-sync-terms-previous-e... ( 5a6f64...8761b1 )
by
unknown
07:10
created
class.jetpack.php 1 patch
Doc Comments   +43 added lines, -17 removed lines patch added patch discarded remove patch
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
 	 * This is ported over from the manage module, which has been deprecated and baked in here.
724 724
 	 *
725 725
 	 * @param $domains
726
-	 * @return array
726
+	 * @return string[]
727 727
 	 */
728 728
 	function allow_wpcom_domain( $domains ) {
729 729
 		if ( empty( $domains ) ) {
@@ -1243,7 +1243,7 @@  discard block
 block discarded – undo
1243 1243
 	}
1244 1244
 	/**
1245 1245
 	 * Does the network allow admins to add new users.
1246
-	 * @return boolian
1246
+	 * @return boolean
1247 1247
 	 */
1248 1248
 	static function network_add_new_users( $option = null ) {
1249 1249
 		return (bool) get_site_option( 'add_new_users' );
@@ -1348,7 +1348,7 @@  discard block
 block discarded – undo
1348 1348
 	 * database which could be set to anything as opposed to what this function returns.
1349 1349
 	 * @param  bool  $option
1350 1350
 	 *
1351
-	 * @return boolean
1351
+	 * @return string
1352 1352
 	 */
1353 1353
 	public function is_main_network_option( $option ) {
1354 1354
 		// return '1' or ''
@@ -1359,7 +1359,7 @@  discard block
 block discarded – undo
1359 1359
 	 * Return true if we are with multi-site or multi-network false if we are dealing with single site.
1360 1360
 	 *
1361 1361
 	 * @param  string  $option
1362
-	 * @return boolean
1362
+	 * @return string
1363 1363
 	 */
1364 1364
 	public function is_multisite( $option ) {
1365 1365
 		return (string) (bool) is_multisite();
@@ -1421,7 +1421,7 @@  discard block
 block discarded – undo
1421 1421
 
1422 1422
 	/**
1423 1423
 	 * Returns true if the site has file write access false otherwise.
1424
-	 * @return string ( '1' | '0' )
1424
+	 * @return integer ( '1' | '0' )
1425 1425
 	 **/
1426 1426
 	public static function file_system_write_access() {
1427 1427
 		if ( ! function_exists( 'get_filesystem_method' ) ) {
@@ -2286,6 +2286,7 @@  discard block
 block discarded – undo
2286 2286
 	 * @param int $user_id
2287 2287
 	 * @param string $token
2288 2288
 	 * return bool
2289
+	 * @param boolean $is_master_user
2289 2290
 	 */
2290 2291
 	public static function update_user_token( $user_id, $token, $is_master_user ) {
2291 2292
 		// not designed for concurrent updates
@@ -2688,6 +2689,7 @@  discard block
 block discarded – undo
2688 2689
 
2689 2690
 	/**
2690 2691
 	 * Like core's get_file_data implementation, but caches the result.
2692
+	 * @param string $file
2691 2693
 	 */
2692 2694
 	public static function get_file_data( $file, $headers ) {
2693 2695
 		//Get just the filename from $file (i.e. exclude full path) so that a consistent hash is generated
@@ -2724,7 +2726,7 @@  discard block
 block discarded – undo
2724 2726
 	 *
2725 2727
 	 * @param string $tag Tag as it appears in each module heading.
2726 2728
 	 *
2727
-	 * @return mixed
2729
+	 * @return string
2728 2730
 	 */
2729 2731
 	public static function translate_module_tag( $tag ) {
2730 2732
 		return jetpack_get_module_i18n_tag( $tag );
@@ -2901,8 +2903,8 @@  discard block
 block discarded – undo
2901 2903
 	 * Rewrites ABSPATH (eg `/home/jetpack/wordpress/`) to ABSPATH, and if WP_CONTENT_DIR
2902 2904
 	 * is located outside of ABSPATH, rewrites that to WP_CONTENT_DIR.
2903 2905
 	 *
2904
-	 * @param $string
2905
-	 * @return mixed
2906
+	 * @param string $string
2907
+	 * @return string|null
2906 2908
 	 */
2907 2909
 	public static function alias_directories( $string ) {
2908 2910
 		// ABSPATH has a trailing slash.
@@ -3182,6 +3184,9 @@  discard block
 block discarded – undo
3182 3184
 		return self::update_active_modules( $new );
3183 3185
 	}
3184 3186
 
3187
+	/**
3188
+	 * @param string $module
3189
+	 */
3185 3190
 	public static function enable_module_configurable( $module ) {
3186 3191
 		$module = Jetpack::get_module_slug( $module );
3187 3192
 		add_filter( 'jetpack_module_configurable_' . $module, '__return_true' );
@@ -3209,16 +3214,25 @@  discard block
 block discarded – undo
3209 3214
 		return $url;
3210 3215
 	}
3211 3216
 
3217
+	/**
3218
+	 * @param string $module
3219
+	 */
3212 3220
 	public static function module_configuration_load( $module, $method ) {
3213 3221
 		$module = Jetpack::get_module_slug( $module );
3214 3222
 		add_action( 'jetpack_module_configuration_load_' . $module, $method );
3215 3223
 	}
3216 3224
 
3225
+	/**
3226
+	 * @param string $module
3227
+	 */
3217 3228
 	public static function module_configuration_head( $module, $method ) {
3218 3229
 		$module = Jetpack::get_module_slug( $module );
3219 3230
 		add_action( 'jetpack_module_configuration_head_' . $module, $method );
3220 3231
 	}
3221 3232
 
3233
+	/**
3234
+	 * @param string $module
3235
+	 */
3222 3236
 	public static function module_configuration_screen( $module, $method ) {
3223 3237
 		$module = Jetpack::get_module_slug( $module );
3224 3238
 		add_action( 'jetpack_module_configuration_screen_' . $module, $method );
@@ -3231,6 +3245,9 @@  discard block
 block discarded – undo
3231 3245
 
3232 3246
 /* Installation */
3233 3247
 
3248
+	/**
3249
+	 * @param string $message
3250
+	 */
3234 3251
 	public static function bail_on_activation( $message, $deactivate = true ) {
3235 3252
 ?>
3236 3253
 <!doctype html>
@@ -3970,7 +3987,7 @@  discard block
 block discarded – undo
3970 3987
 	 * Add help to the Jetpack page
3971 3988
 	 *
3972 3989
 	 * @since Jetpack (1.2.3)
3973
-	 * @return false if not the Jetpack page
3990
+	 * @return false|null if not the Jetpack page
3974 3991
 	 */
3975 3992
 	function admin_help() {
3976 3993
 		$current_screen = get_current_screen();
@@ -4770,6 +4787,9 @@  discard block
 block discarded – undo
4770 4787
 		return $url;
4771 4788
 	}
4772 4789
 
4790
+	/**
4791
+	 * @return string
4792
+	 */
4773 4793
 	public static function nonce_url_no_esc( $actionurl, $action = -1, $name = '_wpnonce' ) {
4774 4794
 		$actionurl = str_replace( '&amp;', '&', $actionurl );
4775 4795
 		return add_query_arg( $name, wp_create_nonce( $action ), $actionurl );
@@ -4937,6 +4957,7 @@  discard block
 block discarded – undo
4937 4957
 	/**
4938 4958
 	 * Returns the requested Jetpack API URL
4939 4959
 	 *
4960
+	 * @param string $relative_url
4940 4961
 	 * @return string
4941 4962
 	 */
4942 4963
 	public static function api_url( $relative_url ) {
@@ -5128,6 +5149,7 @@  discard block
 block discarded – undo
5128 5149
 	 * Note these tokens are unique per call, NOT static per site for connecting.
5129 5150
 	 *
5130 5151
 	 * @since 2.6
5152
+	 * @param string $action
5131 5153
 	 * @return array
5132 5154
 	 */
5133 5155
 	public static function generate_secrets( $action, $user_id = false, $exp = 600 ) {
@@ -5661,7 +5683,6 @@  discard block
 block discarded – undo
5661 5683
 	/**
5662 5684
 	 * Report authentication status to the WP REST API.
5663 5685
 	 *
5664
-	 * @param  WP_Error|mixed $result Error from another authentication handler, null if we should handle it, or another value if not
5665 5686
 	 * @return WP_Error|boolean|null {@see WP_JSON_Server::check_authentication}
5666 5687
 	 */
5667 5688
 	public function wp_rest_authentication_errors( $value ) {
@@ -5671,6 +5692,10 @@  discard block
 block discarded – undo
5671 5692
 		return $this->rest_authentication_status;
5672 5693
 	}
5673 5694
 
5695
+	/**
5696
+	 * @param integer $timestamp
5697
+	 * @param string $nonce
5698
+	 */
5674 5699
 	function add_nonce( $timestamp, $nonce ) {
5675 5700
 		global $wpdb;
5676 5701
 		static $nonces_used_this_request = array();
@@ -5816,6 +5841,7 @@  discard block
 block discarded – undo
5816 5841
 	 * @param string $key
5817 5842
 	 * @param string $value
5818 5843
 	 * @param bool $restate private
5844
+	 * @return string
5819 5845
 	 */
5820 5846
 	public static function state( $key = null, $value = null, $restate = false ) {
5821 5847
 		static $state = array();
@@ -5872,6 +5898,9 @@  discard block
 block discarded – undo
5872 5898
 		Jetpack::state( null, null, true );
5873 5899
 	}
5874 5900
 
5901
+	/**
5902
+	 * @param string $file
5903
+	 */
5875 5904
 	public static function check_privacy( $file ) {
5876 5905
 		static $is_site_publicly_accessible = null;
5877 5906
 
@@ -6489,9 +6518,7 @@  discard block
 block discarded – undo
6489 6518
 	 *
6490 6519
 	 * Attached to `style_loader_src` filter.
6491 6520
 	 *
6492
-	 * @param string $tag The tag that would link to the external asset.
6493 6521
 	 * @param string $handle The registered handle of the script in question.
6494
-	 * @param string $href The url of the asset in question.
6495 6522
 	 */
6496 6523
 	public static function set_suffix_on_min( $src, $handle ) {
6497 6524
 		if ( false === strpos( $src, '.min.css' ) ) {
@@ -6673,8 +6700,8 @@  discard block
 block discarded – undo
6673 6700
 	 *  - Absolute URLs             `http://domain.com/feh.png`
6674 6701
 	 *  - Domain root relative URLs `/feh.png`
6675 6702
 	 *
6676
-	 * @param $css string: The raw CSS -- should be read in directly from the file.
6677
-	 * @param $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6703
+	 * @param string $css string: The raw CSS -- should be read in directly from the file.
6704
+	 * @param string $css_file_url : The URL that the file can be accessed at, for calculating paths from.
6678 6705
 	 *
6679 6706
 	 * @return mixed|string
6680 6707
 	 */
@@ -6908,7 +6935,7 @@  discard block
 block discarded – undo
6908 6935
 	 *
6909 6936
 	 * @param string $option_name
6910 6937
 	 *
6911
-	 * @return bool
6938
+	 * @return false|null
6912 6939
 	 */
6913 6940
 	public static function jumpstart_has_updated_module_option( $option_name = '' ) {
6914 6941
 		// Bail if Jump Start has already been dismissed
@@ -6949,7 +6976,7 @@  discard block
 block discarded – undo
6949 6976
 	/**
6950 6977
 	 * Stores and prints out domains to prefetch for page speed optimization.
6951 6978
 	 *
6952
-	 * @param mixed $new_urls
6979
+	 * @param string[] $new_urls
6953 6980
 	 */
6954 6981
 	public static function dns_prefetch( $new_urls = null ) {
6955 6982
 		static $prefetch_urls = array();
@@ -7003,7 +7030,6 @@  discard block
 block discarded – undo
7003 7030
 	}
7004 7031
 
7005 7032
 	/**
7006
-	 * @param mixed $result Value for the user's option
7007 7033
 	 * @return mixed
7008 7034
 	 */
7009 7035
 	function get_user_option_meta_box_order_dashboard( $sorted ) {
Please login to merge, or discard this patch.