@@ -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' ); |
@@ -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 | /** |
@@ -227,6 +227,9 @@ discard block |
||
227 | 227 | $listener->get_full_sync_queue()->reset(); |
228 | 228 | } |
229 | 229 | |
230 | + /** |
|
231 | + * @param integer $default |
|
232 | + */ |
|
230 | 233 | private function get_status_option( $option, $default = null ) { |
231 | 234 | $prefix = self::STATUS_OPTION_PREFIX; |
232 | 235 | |
@@ -258,6 +261,9 @@ discard block |
||
258 | 261 | $this->queue_items_added( 1 ); |
259 | 262 | } |
260 | 263 | |
264 | + /** |
|
265 | + * @param integer $item_count |
|
266 | + */ |
|
261 | 267 | public function queue_items_added( $item_count ) { |
262 | 268 | $this->items_added_since_last_pause += $item_count; |
263 | 269 |
@@ -1283,7 +1283,7 @@ |
||
1283 | 1283 | * Returns an array of stock and custom taxonomy query vars |
1284 | 1284 | * |
1285 | 1285 | * @global $wp_taxonomies |
1286 | - * @return array |
|
1286 | + * @return string[] |
|
1287 | 1287 | */ |
1288 | 1288 | function get_taxonomy_vars() { |
1289 | 1289 | global $wp_taxonomies; |
@@ -159,7 +159,7 @@ |
||
159 | 159 | * |
160 | 160 | * @since 4.3.0 |
161 | 161 | * |
162 | - * @return array Array of Jetpack modules. |
|
162 | + * @return string Array of Jetpack modules. |
|
163 | 163 | */ |
164 | 164 | public function get_modules() { |
165 | 165 | require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-admin.php' ); |
@@ -247,6 +247,11 @@ discard block |
||
247 | 247 | ) ); |
248 | 248 | } |
249 | 249 | |
250 | + /** |
|
251 | + * @param string $path |
|
252 | + * @param string $classname |
|
253 | + * @param Jetpack_IXR_Client $constructor_arguments |
|
254 | + */ |
|
250 | 255 | public static function route( $path, $classname, $method, |
251 | 256 | $constructor_arguments = NULL, |
252 | 257 | $endpoint_arguments = NULL |
@@ -876,7 +881,6 @@ discard block |
||
876 | 881 | * @since 4.3.0 |
877 | 882 | * |
878 | 883 | * @param string $module Module slug. If empty, it's assumed we're updating a module and we'll try to get its slug. |
879 | - * @param bool $cache Whether to cache the options or return always fresh. |
|
880 | 884 | * |
881 | 885 | * @return array |
882 | 886 | */ |
@@ -1753,7 +1757,7 @@ discard block |
||
1753 | 1757 | * |
1754 | 1758 | * @param string $route Regular expression for the endpoint with the module slug to return. |
1755 | 1759 | * |
1756 | - * @return array |
|
1760 | + * @return string |
|
1757 | 1761 | */ |
1758 | 1762 | public static function get_module_requested( $route = '/module/(?P<slug>[a-z\-]+)' ) { |
1759 | 1763 | |
@@ -1778,7 +1782,7 @@ discard block |
||
1778 | 1782 | * @param string $modules Can be a single module or a list of modules. |
1779 | 1783 | * @param null|string $slug Slug of the module in the first parameter. |
1780 | 1784 | * |
1781 | - * @return array |
|
1785 | + * @return string |
|
1782 | 1786 | */ |
1783 | 1787 | public static function prepare_modules_for_response( $modules = '', $slug = null ) { |
1784 | 1788 | if ( get_option( 'permalink_structure' ) ) { |
@@ -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 | } |