Completed
Push — sync/whitelist-user-capabiliti... ( 4a5614 )
by
unknown
07:19
created

get_capabilities_whitelist()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
1
<?php
2
require_once( JETPACK__PLUGIN_DIR . 'modules/sso/class.jetpack-sso-helpers.php' );
3
4
/**
5
 * Just some defaults that we share with the server
6
 */
7
class Jetpack_Sync_Defaults {
8
9
	static $default_options_whitelist = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_options_whitelist.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
10
		'stylesheet',
11
		'blogname',
12
		'blogdescription',
13
		'blog_charset',
14
		'permalink_structure',
15
		'category_base',
16
		'tag_base',
17
		'sidebars_widgets',
18
		'comment_moderation',
19
		'default_comment_status',
20
		'page_on_front',
21
		'rss_use_excerpt',
22
		'subscription_options',
23
		'stb_enabled',
24
		'stc_enabled',
25
		'comment_registration',
26
		'show_avatars',
27
		'avatar_default',
28
		'avatar_rating',
29
		'highlander_comment_form_prompt',
30
		'jetpack_comment_form_color_scheme',
31
		'stats_options',
32
		'gmt_offset',
33
		'timezone_string',
34
		'jetpack_sync_non_public_post_stati',
35
		'jetpack_options',
36
		'site_icon', // (int) - ID of core's Site Icon attachment ID
37
		'default_post_format',
38
		'default_category',
39
		'large_size_w',
40
		'large_size_h',
41
		'thumbnail_size_w',
42
		'thumbnail_size_h',
43
		'medium_size_w',
44
		'medium_size_h',
45
		'thumbnail_crop',
46
		'image_default_link_type',
47
		'site_logo',
48
		'sharing-options',
49
		'sharing-services',
50
		'post_count',
51
		'default_ping_status',
52
		'sticky_posts',
53
		'blog_public',
54
		'default_pingback_flag',
55
		'require_name_email',
56
		'close_comments_for_old_posts',
57
		'close_comments_days_old',
58
		'thread_comments',
59
		'thread_comments_depth',
60
		'page_comments',
61
		'comments_per_page',
62
		'default_comments_page',
63
		'comment_order',
64
		'comments_notify',
65
		'moderation_notify',
66
		'social_notifications_like',
67
		'social_notifications_reblog',
68
		'social_notifications_subscribe',
69
		'comment_whitelist',
70
		'comment_max_links',
71
		'moderation_keys',
72
		'jetpack_wga',
73
		'disabled_likes',
74
		'disabled_reblogs',
75
		'jetpack_comment_likes_enabled',
76
		'twitter_via',
77
		'jetpack-twitter-cards-site-tag',
78
		'wpcom_publish_posts_with_markdown',
79
		'wpcom_publish_comments_with_markdown',
80
		'jetpack_activated',
81
		'jetpack_available_modules',
82
		'jetpack_autoupdate_plugins',
83
		'jetpack_autoupdate_plugins_translations',
84
		'jetpack_autoupdate_themes',
85
		'jetpack_autoupdate_themes_translations',
86
		'jetpack_autoupdate_core',
87
		'jetpack_autoupdate_translations',
88
		'carousel_background_color',
89
		'carousel_display_exif',
90
		'jetpack_portfolio',
91
		'jetpack_portfolio_posts_per_page',
92
		'jetpack_testimonial',
93
		'jetpack_testimonial_posts_per_page',
94
		'tiled_galleries',
95
		'gravatar_disable_hovercards',
96
		'infinite_scroll',
97
		'infinite_scroll_google_analytics',
98
		'wp_mobile_excerpt',
99
		'wp_mobile_featured_images',
100
		'wp_mobile_app_promos',
101
		'monitor_receive_notifications',
102
		'post_by_email_address',
103
		'jetpack_protect_key',
104
		'jetpack_protect_global_whitelist',
105
		'jetpack_sso_require_two_step',
106
		'jetpack_relatedposts',
107
		'verification_services_codes',
108
		'users_can_register',
109
		'active_plugins',
110
		'uninstall_plugins',
111
		'advanced_seo_front_page_description', // Jetpack_SEO_Utils::FRONT_PAGE_META_OPTION
112
		'advanced_seo_title_formats', // Jetpack_SEO_Titles::TITLE_FORMATS_OPTION
113
		'jetpack_api_cache_enabled',
114
	);
115
116
	public static function get_options_whitelist() {
117
		/** This filter is already documented in json-endpoints/jetpack/class.wpcom-json-api-get-option-endpoint.php */
118
		$options_whitelist = apply_filters( 'jetpack_options_whitelist', self::$default_options_whitelist );
119
		/**
120
		 * Filter the list of WordPress options that are manageable via the JSON API.
121
		 *
122
		 * @module sync
123
		 *
124
		 * @since 4.8
125
		 *
126
		 * @param array The default list of options.
127
		 */
128
		return apply_filters( 'jetpack_sync_options_whitelist', $options_whitelist );
129
	}
130
131
	static $default_constants_whitelist = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_constants_whitelist.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
132
		'EMPTY_TRASH_DAYS',
133
		'WP_POST_REVISIONS',
134
		'AUTOMATIC_UPDATER_DISABLED',
135
		'ABSPATH',
136
		'WP_CONTENT_DIR',
137
		'FS_METHOD',
138
		'DISALLOW_FILE_EDIT',
139
		'DISALLOW_FILE_MODS',
140
		'WP_AUTO_UPDATE_CORE',
141
		'WP_HTTP_BLOCK_EXTERNAL',
142
		'WP_ACCESSIBLE_HOSTS',
143
		'JETPACK__VERSION',
144
		'IS_PRESSABLE',
145
		'DISABLE_WP_CRON',
146
		'ALTERNATE_WP_CRON',
147
		'WP_CRON_LOCK_TIMEOUT',
148
		'PHP_VERSION',
149
		'WP_MEMORY_LIMIT',
150
		'WP_MAX_MEMORY_LIMIT'
151
	);
152
153
	public static function get_constants_whitelist() {
154
		/**
155
		 * Filter the list of PHP constants that are manageable via the JSON API.
156
		 *
157
		 * @module sync
158
		 *
159
		 * @since 4.8
160
		 *
161
		 * @param array The default list of constants options.
162
		 */
163
		return apply_filters( 'jetpack_sync_constants_whitelist', self::$default_constants_whitelist );
164
	}
165
166
	static $default_callable_whitelist = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_callable_whitelist.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
167
		'wp_max_upload_size'               => 'wp_max_upload_size',
168
		'is_main_network'                  => array( 'Jetpack', 'is_multi_network' ),
169
		'is_multi_site'                    => 'is_multisite',
170
		'main_network_site'                => array( 'Jetpack_Sync_Functions', 'main_network_site_url' ),
171
		'site_url'                         => array( 'Jetpack_Sync_Functions', 'site_url' ),
172
		'home_url'                         => array( 'Jetpack_Sync_Functions', 'home_url' ),
173
		'single_user_site'                 => array( 'Jetpack', 'is_single_user_site' ),
174
		'updates'                          => array( 'Jetpack', 'get_updates' ),
175
		'has_file_system_write_access'     => array( 'Jetpack_Sync_Functions', 'file_system_write_access' ),
176
		'is_version_controlled'            => array( 'Jetpack_Sync_Functions', 'is_version_controlled' ),
177
		'taxonomies'                       => array( 'Jetpack_Sync_Functions', 'get_taxonomies' ),
178
		'post_types'                       => array( 'Jetpack_Sync_Functions', 'get_post_types' ),
179
		'post_type_features'               => array( 'Jetpack_Sync_Functions', 'get_post_type_features' ),
180
		'shortcodes'                       => array( 'Jetpack_Sync_Functions', 'get_shortcodes' ),
181
		'rest_api_allowed_post_types'      => array( 'Jetpack_Sync_Functions', 'rest_api_allowed_post_types' ),
182
		'rest_api_allowed_public_metadata' => array( 'Jetpack_Sync_Functions', 'rest_api_allowed_public_metadata' ),
183
		'sso_is_two_step_required'         => array( 'Jetpack_SSO_Helpers', 'is_two_step_required' ),
184
		'sso_should_hide_login_form'       => array( 'Jetpack_SSO_Helpers', 'should_hide_login_form' ),
185
		'sso_match_by_email'               => array( 'Jetpack_SSO_Helpers', 'match_by_email' ),
186
		'sso_new_user_override'            => array( 'Jetpack_SSO_Helpers', 'new_user_override' ),
187
		'sso_bypass_default_login_form'    => array( 'Jetpack_SSO_Helpers', 'bypass_login_forward_wpcom' ),
188
		'wp_version'                       => array( 'Jetpack_Sync_Functions', 'wp_version' ),
189
		'get_plugins'                      => array( 'Jetpack_Sync_Functions', 'get_plugins' ),
190
		'active_modules'                   => array( 'Jetpack', 'get_active_modules' ),
191
		'hosting_provider'                 => array( 'Jetpack_Sync_Functions', 'get_hosting_provider' ),
192
		'locale'                           => 'get_locale',
193
		'site_icon_url'                    => array( 'Jetpack_Sync_Functions', 'site_icon_url' ),
194
		'roles'                            =>  array( 'Jetpack_Sync_Functions', 'roles' ),
195
	);
196
197
	public static function get_callable_whitelist() {
198
		/**
199
		 * Filter the list of callables that are manageable via the JSON API.
200
		 *
201
		 * @module sync
202
		 *
203
		 * @since 4.8
204
		 *
205
		 * @param array The default list of callables.
206
		 */
207
		return apply_filters( 'jetpack_sync_callable_whitelist', self::$default_callable_whitelist );
208
	}
209
210
	static $blacklisted_post_types = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $blacklisted_post_types.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
211
		'ai1ec_event',
212
		'bwg_album',
213
		'bwg_gallery',
214
		'customize_changeset', // WP built-in post type for Customizer changesets
215
		'http',
216
		'idx_page',
217
		'postman_sent_mail',
218
		'rssap-feed',
219
		'rssmi_feed_item',
220
		'secupress_log_action',
221
		'snitch',
222
		'wp_automatic',
223
	);
224
225
	static $default_post_checksum_columns = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_post_checksum_columns.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
226
		'ID',
227
		'post_modified',
228
	);
229
230
	static $default_post_meta_checksum_columns = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_post_meta_checksum_columns.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
231
		'meta_id',
232
		'meta_value'
233
	);
234
235
	static $default_comment_checksum_columns = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_comment_checksum_columns.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
236
		'comment_ID',
237
		'comment_content',
238
	);
239
240
	static $default_comment_meta_checksum_columns = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_comment_meta_checksum_columns.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
241
		'meta_id',
242
		'meta_value'
243
	);
244
245
	static $default_option_checksum_columns = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_option_checksum_columns.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
246
		'option_name',
247
		'option_value',
248
	);
249
250
	static $default_multisite_callable_whitelist = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_multisite_callable_whitelist.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
251
		'network_name'                        => array( 'Jetpack', 'network_name' ),
252
		'network_allow_new_registrations'     => array( 'Jetpack', 'network_allow_new_registrations' ),
253
		'network_add_new_users'               => array( 'Jetpack', 'network_add_new_users' ),
254
		'network_site_upload_space'           => array( 'Jetpack', 'network_site_upload_space' ),
255
		'network_upload_file_types'           => array( 'Jetpack', 'network_upload_file_types' ),
256
		'network_enable_administration_menus' => array( 'Jetpack', 'network_enable_administration_menus' ),
257
	);
258
259
	public static function get_multisite_callable_whitelist() {
260
		/**
261
		 * Filter the list of multisite callables that are manageable via the JSON API.
262
		 *
263
		 * @module sync
264
		 *
265
		 * @since 4.8
266
		 *
267
		 * @param array The default list of multisite callables.
268
		 */
269
		return apply_filters( 'jetpack_sync_multisite_callable_whitelist', self::$default_multisite_callable_whitelist );
270
	}
271
272
	static $post_meta_whitelist = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $post_meta_whitelist.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
273
		'_feedback_akismet_values',
274
		'_feedback_email',
275
		'_feedback_extra_fields',
276
		'_g_feedback_shortcode',
277
		'_jetpack_post_thumbnail',
278
		'_menu_item_classes',
279
		'_menu_item_menu_item_parent',
280
		'_menu_item_object',
281
		'_menu_item_object_id',
282
		'_menu_item_orphaned',
283
		'_menu_item_type',
284
		'_menu_item_xfn',
285
		'_publicize_facebook_user',
286
		'_publicize_twitter_user',
287
		'_thumbnail_id',
288
		'_wp_attached_file',
289
		'_wp_attachment_backup_sizes',
290
		'_wp_attachment_context',
291
		'_wp_attachment_image_alt',
292
		'_wp_attachment_is_custom_background',
293
		'_wp_attachment_is_custom_header',
294
		'_wp_attachment_metadata',
295
		'_wp_page_template',
296
		'_wp_trash_meta_comments_status',
297
		'_wpas_mess',
298
		'content_width',
299
		'custom_css_add',
300
		'custom_css_preprocessor',
301
		'enclosure',
302
		'imagedata',
303
		'nova_price',
304
		'publicize_results',
305
		'sharing_disabled',
306
		'switch_like_status',
307
		'videopress_guid',
308
		'vimeo_poster_image',
309
		'advanced_seo_description', // Jetpack_SEO_Posts::DESCRIPTION_META_KEY
310
	);
311
312
	public static function get_post_meta_whitelist() {
313
		/**
314
		 * Filter the list of post meta data that are manageable via the JSON API.
315
		 *
316
		 * @module sync
317
		 *
318
		 * @since 4.8
319
		 *
320
		 * @param array The default list of meta data keys.
321
		 */
322
		return apply_filters( 'jetpack_sync_post_meta_whitelist', self::$post_meta_whitelist );
323
	}
324
325
	static $comment_meta_whitelist = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $comment_meta_whitelist.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
326
		'hc_avatar',
327
		'hc_post_as',
328
		'hc_wpcom_id_sig',
329
		'hc_foreign_user_id'
330
	);
331
332
	// TODO: move this to server? - these are theme support values
0 ignored issues
show
Coding Style Best Practice introduced by
Comments for TODO tasks are often forgotten in the code; it might be better to use a dedicated issue tracker.
Loading history...
333
	// that should be synced as jetpack_current_theme_supports_foo option values
334
	static $default_theme_support_whitelist = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_theme_support_whitelist.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
335
		'post-thumbnails',
336
		'post-formats',
337
		'custom-header',
338
		'custom-background',
339
		'custom-logo',
340
		'menus',
341
		'automatic-feed-links',
342
		'editor-style',
343
		'widgets',
344
		'html5',
345
		'title-tag',
346
		'jetpack-social-menu',
347
		'jetpack-responsive-videos',
348
		'infinite-scroll',
349
		'site-logo',
350
	);
351
352
	static function is_whitelisted_option( $option ) {
353
		foreach ( self::$default_options_whitelist as $whitelisted_option ) {
354
			if ( $whitelisted_option[0] === '/' && preg_match( $whitelisted_option, $option ) ) {
355
				return true;
356
			} elseif ( $whitelisted_option === $option ) {
357
				return true;
358
			}
359
		}
360
361
		return false;
362
	}
363
364
	static $default_capabilities_whitelist = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_capabilities_whitelist.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
365
		'switch_themes',
366
		'edit_themes',
367
		'edit_theme_options',
368
		'install_themes',
369
		'activate_plugins',
370
		'edit_plugins',
371
		'install_plugins',
372
		'edit_users',
373
		'edit_files',
374
		'manage_options',
375
		'moderate_comments',
376
		'manage_categories',
377
		'manage_links',
378
		'upload_files',
379
		'import',
380
		'unfiltered_html',
381
		'edit_posts',
382
		'edit_others_posts',
383
		'edit_published_posts',
384
		'publish_posts',
385
		'edit_pages',
386
		'read',
387
		'publish_pages',
388
		'edit_others_pages',
389
		'edit_published_pages',
390
		'delete_pages',
391
		'delete_others_pages',
392
		'delete_published_pages',
393
		'delete_posts',
394
		'delete_others_posts',
395
		'delete_published_posts',
396
		'delete_private_posts',
397
		'edit_private_posts',
398
		'read_private_posts',
399
		'delete_private_pages',
400
		'edit_private_pages',
401
		'read_private_pages',
402
		'delete_users',
403
		'create_users',
404
		'unfiltered_upload',
405
		'edit_dashboard',
406
		'customize',
407
		'delete_site',
408
		'update_plugins',
409
		'delete_plugins',
410
		'update_themes',
411
		'update_core',
412
		'list_users',
413
		'remove_users',
414
		'add_users',
415
		'promote_users',
416
		'delete_themes',
417
		'export',
418
		'edit_comment',
419
		'upload_plugins',
420
		'upload_themes',
421
	);
422
423
	public static function get_capabilities_whitelist() {
424
		/**
425
		 * Filter the list of capabilities that we care about
426
		 *
427
		 * @module sync
428
		 *
429
		 * @since 5.5
430
		 *
431
		 * @param array The default list of capabilities.
432
		 */
433
		return apply_filters( 'jetpack_sync_capabilities_whitelist', self::$default_capabilities_whitelist );
434
	}
435
436
	static function get_max_sync_execution_time() {
437
		$max_exec_time = intval( ini_get( 'max_execution_time' ) );
438
		if ( 0 === $max_exec_time ) {
439
			// 0 actually means "unlimited", but let's not treat it that way
440
			$max_exec_time = 60;
441
		}
442
		return floor( $max_exec_time / 3 );
443
	}
444
445
	static $default_network_options_whitelist = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_network_options_whitelist.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
446
		'site_name',
447
		'jetpack_protect_key',
448
		'jetpack_protect_global_whitelist',
449
		'active_sitewide_plugins',
450
	);
451
452
	static $default_taxonomy_whitelist = array();
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_taxonomy_whitelist.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
453
	static $default_dequeue_max_bytes = 500000; // very conservative value, 1/2 MB
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_dequeue_max_bytes.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
454
	static $default_upload_max_bytes = 600000; // a little bigger than the upload limit to account for serialization
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_upload_max_bytes.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
455
	static $default_upload_max_rows = 500;
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_upload_max_rows.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
456
	static $default_sync_wait_time = 10; // seconds, between syncs
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_sync_wait_time.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
457
	static $default_sync_wait_threshold = 5; // only wait before next send if the current send took more than X seconds
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_sync_wait_threshold.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
458
	static $default_enqueue_wait_time = 10; // wait between attempting to continue a full sync, via requests
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_enqueue_wait_time.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
459
	static $default_max_queue_size = 1000;
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_max_queue_size.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
460
	static $default_max_queue_lag = 900; // 15 minutes
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_max_queue_lag.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
461
	static $default_queue_max_writes_sec = 100; // 100 rows a second
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_queue_max_writes_sec.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
462
	static $default_post_types_blacklist = array();
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_post_types_blacklist.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
463
	static $default_post_meta_whitelist = array();
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_post_meta_whitelist.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
464
	static $default_comment_meta_whitelist = array();
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_comment_meta_whitelist.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
465
	static $default_disable = 0; // completely disable sending data to wpcom
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_disable.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
466
	static $default_sync_via_cron = 1; // use cron to sync
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_sync_via_cron.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
467
	static $default_render_filtered_content = 0; // render post_filtered_content
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_render_filtered_content.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
468
	static $default_max_enqueue_full_sync = 100; // max number of items to enqueue at a time when running full sync
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_max_enqueue_full_sync.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
469
	static $default_max_queue_size_full_sync = 1000; // max number of total items in the full sync queue
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_max_queue_size_full_sync.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
470
	static $default_sync_callables_wait_time = MINUTE_IN_SECONDS; // seconds before sending callables again
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_sync_callables_wait_time.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
471
	static $default_sync_constants_wait_time = HOUR_IN_SECONDS; // seconds before sending constants again
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_sync_constants_wait_time.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
472
	static $default_sync_queue_lock_timeout = 120; // 2 minutes
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_sync_queue_lock_timeout.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
473
	static $default_cron_sync_time_limit = 30; // 30 seconds
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_cron_sync_time_limit.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
474
}
475