@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | * |
184 | 184 | * @access public |
185 | 185 | * |
186 | - * @param \WP_User $user User object. |
|
186 | + * @param \WP_User|null $user User object. |
|
187 | 187 | * @return \WP_User Expanded user object. |
188 | 188 | */ |
189 | 189 | public function expand_user( $user ) { |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | * @todo Refactor to prepare the SQL query before executing it. |
615 | 615 | * |
616 | 616 | * @param array $config Full sync configuration for this sync module. |
617 | - * @return array Number of items yet to be enqueued. |
|
617 | + * @return integer Number of items yet to be enqueued. |
|
618 | 618 | */ |
619 | 619 | public function estimate_full_sync_actions( $config ) { |
620 | 620 | global $wpdb; |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | * |
659 | 659 | * @access public |
660 | 660 | * |
661 | - * @return array Full sync actions of this module. |
|
661 | + * @return string[] Full sync actions of this module. |
|
662 | 662 | */ |
663 | 663 | public function get_full_sync_actions() { |
664 | 664 | return array( 'jetpack_full_sync_users' ); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | * |
151 | 151 | * @access public |
152 | 152 | * |
153 | - * @return array Full sync actions of this module. |
|
153 | + * @return string[] Full sync actions of this module. |
|
154 | 154 | */ |
155 | 155 | public function get_full_sync_actions() { |
156 | 156 | return array( 'jetpack_full_sync_woocommerce_order_items' ); |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | * @todo Refactor the SQL query to use $wpdb->prepare(). |
247 | 247 | * |
248 | 248 | * @param array $config Full sync configuration for this sync module. |
249 | - * @return array Number of items yet to be enqueued. |
|
249 | + * @return integer Number of items yet to be enqueued. |
|
250 | 250 | */ |
251 | 251 | public function estimate_full_sync_actions( $config ) { |
252 | 252 | global $wpdb; |
@@ -134,6 +134,9 @@ discard block |
||
134 | 134 | return ( Settings::get_setting( 'sync_via_cron' ) ); |
135 | 135 | } |
136 | 136 | |
137 | + /** |
|
138 | + * @param boolean $should_publicize |
|
139 | + */ |
|
137 | 140 | static function prevent_publicize_blacklisted_posts( $should_publicize, $post ) { |
138 | 141 | if ( in_array( $post->post_type, Settings::get_setting( 'post_types_blacklist' ) ) ) { |
139 | 142 | return false; |
@@ -146,6 +149,13 @@ discard block |
||
146 | 149 | Settings::set_importing( true ); |
147 | 150 | } |
148 | 151 | |
152 | + /** |
|
153 | + * @param string $codec_name |
|
154 | + * @param integer $sent_timestamp |
|
155 | + * @param integer $queue_id |
|
156 | + * @param integer $checkout_duration |
|
157 | + * @param integer $preprocess_duration |
|
158 | + */ |
|
149 | 159 | static function send_data( $data, $codec_name, $sent_timestamp, $queue_id, $checkout_duration, $preprocess_duration ) { |
150 | 160 | \Jetpack::load_xml_rpc_client(); |
151 | 161 | |
@@ -350,6 +360,9 @@ discard block |
||
350 | 360 | return $sync_modules; |
351 | 361 | } |
352 | 362 | |
363 | + /** |
|
364 | + * @return string |
|
365 | + */ |
|
353 | 366 | static function sanitize_filtered_sync_cron_schedule( $schedule ) { |
354 | 367 | $schedule = sanitize_key( $schedule ); |
355 | 368 | $schedules = wp_get_schedules(); |
@@ -387,6 +400,9 @@ discard block |
||
387 | 400 | ); |
388 | 401 | } |
389 | 402 | |
403 | + /** |
|
404 | + * @param string $hook |
|
405 | + */ |
|
390 | 406 | static function maybe_schedule_sync_cron( $schedule, $hook ) { |
391 | 407 | if ( ! $hook ) { |
392 | 408 | return; |
@@ -436,6 +452,10 @@ discard block |
||
436 | 452 | self::maybe_schedule_sync_cron( $full_sync_cron_schedule, 'jetpack_sync_full_cron' ); |
437 | 453 | } |
438 | 454 | |
455 | + /** |
|
456 | + * @param string $new_version |
|
457 | + * @param string $old_version |
|
458 | + */ |
|
439 | 459 | static function cleanup_on_upgrade( $new_version = null, $old_version = null ) { |
440 | 460 | if ( wp_next_scheduled( 'jetpack_sync_send_db_checksum' ) ) { |
441 | 461 | wp_clear_scheduled_hook( 'jetpack_sync_send_db_checksum' ); |