@@ -107,6 +107,9 @@ |
||
| 107 | 107 | $this->enqueue_action( current_filter(), func_get_args(), $this->sync_queue ); |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | + /** |
|
| 111 | + * @param Jetpack_Sync_Queue $queue |
|
| 112 | + */ |
|
| 110 | 113 | function enqueue_action( $current_filter, $args, $queue ) { |
| 111 | 114 | |
| 112 | 115 | /** |
@@ -250,6 +250,9 @@ discard block |
||
| 250 | 250 | return true; |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | + /** |
|
| 254 | + * @param Jetpack_Sync_Queue_Buffer $buffer |
|
| 255 | + */ |
|
| 253 | 256 | function close( $buffer, $ids_to_remove = null ) { |
| 254 | 257 | $is_valid = $this->validate_checkout( $buffer ); |
| 255 | 258 | |
@@ -328,6 +331,9 @@ discard block |
||
| 328 | 331 | return get_transient( $this->get_checkout_transient_name() ); |
| 329 | 332 | } |
| 330 | 333 | |
| 334 | + /** |
|
| 335 | + * @param string $checkout_id |
|
| 336 | + */ |
|
| 331 | 337 | private function set_checkout_id( $checkout_id ) { |
| 332 | 338 | return set_transient( $this->get_checkout_transient_name(), $checkout_id, 5 * 60 ); // 5 minute timeout |
| 333 | 339 | } |
@@ -52,6 +52,9 @@ discard block |
||
| 52 | 52 | return (double) get_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, 0 ); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param integer $time |
|
| 57 | + */ |
|
| 55 | 58 | public function set_next_sync_time( $time, $queue_name ) { |
| 56 | 59 | return update_option( self::NEXT_SYNC_TIME_OPTION_NAME . '_' . $queue_name, $time, true ); |
| 57 | 60 | } |
@@ -64,6 +67,9 @@ discard block |
||
| 64 | 67 | return $this->do_sync_and_set_delays( $this->sync_queue ); |
| 65 | 68 | } |
| 66 | 69 | |
| 70 | + /** |
|
| 71 | + * @param Jetpack_Sync_Queue $queue |
|
| 72 | + */ |
|
| 67 | 73 | public function do_sync_and_set_delays( $queue ) { |
| 68 | 74 | // don't sync if importing |
| 69 | 75 | if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { |
@@ -293,6 +299,10 @@ discard block |
||
| 293 | 299 | } |
| 294 | 300 | |
| 295 | 301 | // in seconds |
| 302 | + |
|
| 303 | + /** |
|
| 304 | + * @param double $seconds |
|
| 305 | + */ |
|
| 296 | 306 | function set_max_dequeue_time( $seconds ) { |
| 297 | 307 | $this->max_dequeue_time = $seconds; |
| 298 | 308 | } |
@@ -321,6 +321,9 @@ |
||
| 321 | 321 | return self::DEFAULT_SYNC_CRON_INTERVAL; |
| 322 | 322 | } |
| 323 | 323 | |
| 324 | + /** |
|
| 325 | + * @param string $hook |
|
| 326 | + */ |
|
| 324 | 327 | static function maybe_schedule_sync_cron( $schedule, $hook ) { |
| 325 | 328 | if ( ! $hook ) { |
| 326 | 329 | return; |
@@ -107,6 +107,9 @@ discard block |
||
| 107 | 107 | self::set_is_sending( null ); |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | + /** |
|
| 111 | + * @param boolean|null $is_importing |
|
| 112 | + */ |
|
| 110 | 113 | static function set_importing( $is_importing ) { |
| 111 | 114 | // set to NULL to revert to WP_IMPORTING, the standard behaviour |
| 112 | 115 | self::$is_importing = $is_importing; |
@@ -137,6 +140,9 @@ discard block |
||
| 137 | 140 | return (bool) self::$is_syncing; |
| 138 | 141 | } |
| 139 | 142 | |
| 143 | + /** |
|
| 144 | + * @param boolean|null $is_syncing |
|
| 145 | + */ |
|
| 140 | 146 | static function set_is_syncing( $is_syncing ) { |
| 141 | 147 | self::$is_syncing = $is_syncing; |
| 142 | 148 | } |
@@ -145,6 +151,9 @@ discard block |
||
| 145 | 151 | return (bool) self::$is_sending; |
| 146 | 152 | } |
| 147 | 153 | |
| 154 | + /** |
|
| 155 | + * @param boolean|null $is_sending |
|
| 156 | + */ |
|
| 148 | 157 | static function set_is_sending( $is_sending ) { |
| 149 | 158 | self::$is_sending = $is_sending; |
| 150 | 159 | } |
@@ -420,6 +420,10 @@ discard block |
||
| 420 | 420 | } |
| 421 | 421 | |
| 422 | 422 | // functions |
| 423 | + |
|
| 424 | + /** |
|
| 425 | + * @param string $name |
|
| 426 | + */ |
|
| 423 | 427 | public function get_callable( $name ) { |
| 424 | 428 | $value = get_option( 'jetpack_' . $name ); |
| 425 | 429 | |
@@ -688,6 +692,9 @@ discard block |
||
| 688 | 692 | return $histogram; |
| 689 | 693 | } |
| 690 | 694 | |
| 695 | + /** |
|
| 696 | + * @param string|null $id_column |
|
| 697 | + */ |
|
| 691 | 698 | private function table_checksum( $table, $columns, $id_column, $where_sql = '1=1', $min_id = null, $max_id = null, $strip_non_ascii = true ) { |
| 692 | 699 | global $wpdb; |
| 693 | 700 | |
@@ -725,6 +732,9 @@ discard block |
||
| 725 | 732 | |
| 726 | 733 | } |
| 727 | 734 | |
| 735 | + /** |
|
| 736 | + * @param string $where_sql |
|
| 737 | + */ |
|
| 728 | 738 | private function meta_count( $table, $where_sql, $min_id, $max_id ) { |
| 729 | 739 | global $wpdb; |
| 730 | 740 | |
@@ -1404,7 +1404,7 @@ |
||
| 1404 | 1404 | /** |
| 1405 | 1405 | * Migration routine for moving safecss from wp_options to wp_posts to support revisions |
| 1406 | 1406 | * |
| 1407 | - * @return void |
|
| 1407 | + * @return false|null |
|
| 1408 | 1408 | */ |
| 1409 | 1409 | static function upgrade() { |
| 1410 | 1410 | $css = get_option( 'safecss' ); |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | * |
| 177 | 177 | * @since 4.3.0 |
| 178 | 178 | * |
| 179 | - * @return array Array of Jetpack modules. |
|
| 179 | + * @return string Array of Jetpack modules. |
|
| 180 | 180 | */ |
| 181 | 181 | public function get_modules() { |
| 182 | 182 | require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-admin.php' ); |
@@ -1104,7 +1104,6 @@ discard block |
||
| 1104 | 1104 | * |
| 1105 | 1105 | * @since 4.3.0 |
| 1106 | 1106 | * |
| 1107 | - * @param WP_REST_Request $request |
|
| 1108 | 1107 | * |
| 1109 | 1108 | * @return bool does a current user have enough privileges. |
| 1110 | 1109 | */ |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @param string $type The type of option to return. Defaults to 'compact'. |
| 18 | 18 | * |
| 19 | - * @return array |
|
| 19 | + * @return string[] |
|
| 20 | 20 | */ |
| 21 | 21 | public static function get_option_names( $type = 'compact' ) { |
| 22 | 22 | switch ( $type ) { |
@@ -163,6 +163,9 @@ discard block |
||
| 163 | 163 | return $value; |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | + /** |
|
| 167 | + * @param string $name |
|
| 168 | + */ |
|
| 166 | 169 | private static function update_grouped_option( $group, $name, $value ) { |
| 167 | 170 | $options = get_option( self::$grouped_options[ $group ] ); |
| 168 | 171 | if ( ! is_array( $options ) ) { |
@@ -257,6 +260,9 @@ discard block |
||
| 257 | 260 | return $result; |
| 258 | 261 | } |
| 259 | 262 | |
| 263 | + /** |
|
| 264 | + * @param string $name |
|
| 265 | + */ |
|
| 260 | 266 | private static function get_grouped_option( $group, $name, $default ) { |
| 261 | 267 | $options = get_option( self::$grouped_options[ $group ] ); |
| 262 | 268 | if ( is_array( $options ) && isset( $options[ $name ] ) ) { |