Completed
Push — update/sync-defaults-use-statu... ( cbaf86 )
by Marin
08:11
created

Defaults::is_multi_network()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Automattic\Jetpack\Sync;
4
5
require_once JETPACK__PLUGIN_DIR . 'modules/sso/class.jetpack-sso-helpers.php';
6
7
use Automattic\Jetpack\Status;
8
use Automattic\Jetpack\Sync\Functions;
9
10
/**
11
 * Just some defaults that we share with the server
12
 */
13
class Defaults {
14
15
	static $default_options_whitelist = array(
16
		'stylesheet',
17
		'blogname',
18
		'blogdescription',
19
		'blog_charset',
20
		'permalink_structure',
21
		'category_base',
22
		'tag_base',
23
		'sidebars_widgets',
24
		'comment_moderation',
25
		'default_comment_status',
26
		'page_on_front',
27
		'rss_use_excerpt',
28
		'subscription_options',
29
		'stb_enabled',
30
		'stc_enabled',
31
		'comment_registration',
32
		'show_avatars',
33
		'avatar_default',
34
		'avatar_rating',
35
		'highlander_comment_form_prompt',
36
		'jetpack_comment_form_color_scheme',
37
		'stats_options',
38
		'gmt_offset',
39
		'timezone_string',
40
		'jetpack_sync_non_public_post_stati',
41
		'jetpack_options',
42
		'site_icon', // (int) - ID of core's Site Icon attachment ID
43
		'default_post_format',
44
		'default_category',
45
		'large_size_w',
46
		'large_size_h',
47
		'thumbnail_size_w',
48
		'thumbnail_size_h',
49
		'medium_size_w',
50
		'medium_size_h',
51
		'thumbnail_crop',
52
		'image_default_link_type',
53
		'site_logo',
54
		'sharing-options',
55
		'sharing-services',
56
		'post_count',
57
		'default_ping_status',
58
		'sticky_posts',
59
		'blog_public',
60
		'default_pingback_flag',
61
		'require_name_email',
62
		'close_comments_for_old_posts',
63
		'close_comments_days_old',
64
		'thread_comments',
65
		'thread_comments_depth',
66
		'page_comments',
67
		'comments_per_page',
68
		'default_comments_page',
69
		'comment_order',
70
		'comments_notify',
71
		'moderation_notify',
72
		'social_notifications_like',
73
		'social_notifications_reblog',
74
		'social_notifications_subscribe',
75
		'comment_whitelist',
76
		'comment_max_links',
77
		'moderation_keys',
78
		'jetpack_wga',
79
		'disabled_likes',
80
		'disabled_reblogs',
81
		'jetpack_comment_likes_enabled',
82
		'twitter_via',
83
		'jetpack-memberships-connected-account-id',
84
		'jetpack-twitter-cards-site-tag',
85
		'wpcom_publish_posts_with_markdown',
86
		'wpcom_publish_comments_with_markdown',
87
		'jetpack_activated',
88
		'jetpack_available_modules',
89
		'jetpack_allowed_xsite_search_ids',
90
		'jetpack_autoupdate_plugins',
91
		'jetpack_autoupdate_plugins_translations',
92
		'jetpack_autoupdate_themes',
93
		'jetpack_autoupdate_themes_translations',
94
		'jetpack_autoupdate_core',
95
		'jetpack_autoupdate_translations',
96
		'carousel_background_color',
97
		'carousel_display_exif',
98
		'jetpack_portfolio',
99
		'jetpack_portfolio_posts_per_page',
100
		'jetpack_testimonial',
101
		'jetpack_testimonial_posts_per_page',
102
		'tiled_galleries',
103
		'gravatar_disable_hovercards',
104
		'infinite_scroll',
105
		'infinite_scroll_google_analytics',
106
		'wp_mobile_excerpt',
107
		'wp_mobile_featured_images',
108
		'wp_mobile_app_promos',
109
		'monitor_receive_notifications',
110
		'post_by_email_address',
111
		'jetpack_mailchimp',
112
		'jetpack_protect_key',
113
		'jetpack_protect_global_whitelist',
114
		'jetpack_sso_require_two_step',
115
		'jetpack_sso_match_by_email',
116
		'jetpack_relatedposts',
117
		'verification_services_codes',
118
		'users_can_register',
119
		'active_plugins',
120
		'uninstall_plugins',
121
		'advanced_seo_front_page_description', // Jetpack_SEO_Utils::FRONT_PAGE_META_OPTION
122
		'advanced_seo_title_formats', // Jetpack_SEO_Titles::TITLE_FORMATS_OPTION
123
		'jetpack_api_cache_enabled',
124
		'start_of_week',
125
		'blacklist_keys',
126
		'posts_per_page',
127
		'posts_per_rss',
128
		'show_on_front',
129
		'ping_sites',
130
		'uploads_use_yearmonth_folders',
131
		'date_format',
132
		'time_format',
133
		'admin_email',
134
		'new_admin_email',
135
		'default_email_category',
136
		'default_role',
137
		'page_for_posts',
138
		'mailserver_url',
139
		'mailserver_login', // Not syncing contents, only the option name
140
		'mailserver_pass', // Not syncing contents, only the option name
141
		'mailserver_port',
142
		'wp_page_for_privacy_policy',
143
		'enable_header_ad',
144
		'wordads_second_belowpost',
145
		'wordads_display_front_page',
146
		'wordads_display_post',
147
		'wordads_display_page',
148
		'wordads_display_archive',
149
		'wordads_custom_adstxt',
150
		'site_segment',
151
		'site_user_type',
152
		'site_vertical',
153
		'jetpack_excluded_extensions',
154
	);
155
156
	public static function get_options_whitelist() {
157
		/** This filter is already documented in json-endpoints/jetpack/class.wpcom-json-api-get-option-endpoint.php */
158
		$options_whitelist = apply_filters( 'jetpack_options_whitelist', self::$default_options_whitelist );
159
		/**
160
		 * Filter the list of WordPress options that are manageable via the JSON API.
161
		 *
162
		 * @module sync
163
		 *
164
		 * @since 4.8.0
165
		 *
166
		 * @param array The default list of options.
167
		 */
168
		return apply_filters( 'jetpack_sync_options_whitelist', $options_whitelist );
169
	}
170
171
	// Do not sync contents for these events, only the option name
172
	static $default_options_contentless = array(
173
		'mailserver_login',
174
		'mailserver_pass',
175
	);
176
177
	public static function get_options_contentless() {
178
		/**
179
		 * Filter the list of WordPress options that should be synced without content
180
		 *
181
		 * @module sync
182
		 *
183
		 * @since 6.1.0
184
		 *
185
		 * @param array The list of options synced without content.
186
		 */
187
		return apply_filters( 'jetpack_sync_options_contentless', self::$default_options_contentless );
188
	}
189
190
	static $default_constants_whitelist = array(
191
		'EMPTY_TRASH_DAYS',
192
		'WP_POST_REVISIONS',
193
		'AUTOMATIC_UPDATER_DISABLED',
194
		'ABSPATH',
195
		'WP_CONTENT_DIR',
196
		'FS_METHOD',
197
		'DISALLOW_FILE_EDIT',
198
		'DISALLOW_FILE_MODS',
199
		'WP_AUTO_UPDATE_CORE',
200
		'WP_HTTP_BLOCK_EXTERNAL',
201
		'WP_ACCESSIBLE_HOSTS',
202
		'JETPACK__VERSION',
203
		'IS_PRESSABLE',
204
		'DISABLE_WP_CRON',
205
		'ALTERNATE_WP_CRON',
206
		'WP_CRON_LOCK_TIMEOUT',
207
		'PHP_VERSION',
208
		'WP_MEMORY_LIMIT',
209
		'WP_MAX_MEMORY_LIMIT',
210
		'WP_DEBUG',
211
	);
212
213
	public static function get_constants_whitelist() {
214
		/**
215
		 * Filter the list of PHP constants that are manageable via the JSON API.
216
		 *
217
		 * @module sync
218
		 *
219
		 * @since 4.8.0
220
		 *
221
		 * @param array The default list of constants options.
222
		 */
223
		return apply_filters( 'jetpack_sync_constants_whitelist', self::$default_constants_whitelist );
224
	}
225
226
	static $default_callable_whitelist = array(
227
		'wp_max_upload_size'               => 'wp_max_upload_size',
228
		'is_main_network'                  => array( __CLASS__, 'is_multi_network' ),
229
		'is_multi_site'                    => 'is_multisite',
230
		'main_network_site'                => array( 'Automattic\\Jetpack\\Sync\\Functions', 'main_network_site_url' ),
231
		'site_url'                         => array( 'Automattic\\Jetpack\\Sync\\Functions', 'site_url' ),
232
		'home_url'                         => array( 'Automattic\\Jetpack\\Sync\\Functions', 'home_url' ),
233
		'single_user_site'                 => array( 'Jetpack', 'is_single_user_site' ),
234
		'updates'                          => array( 'Jetpack', 'get_updates' ),
235
		'has_file_system_write_access'     => array( 'Automattic\\Jetpack\\Sync\\Functions', 'file_system_write_access' ),
236
		'is_version_controlled'            => array( 'Automattic\\Jetpack\\Sync\\Functions', 'is_version_controlled' ),
237
		'taxonomies'                       => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_taxonomies' ),
238
		'post_types'                       => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_post_types' ),
239
		'post_type_features'               => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_post_type_features' ),
240
		'shortcodes'                       => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_shortcodes' ),
241
		'rest_api_allowed_post_types'      => array( 'Automattic\\Jetpack\\Sync\\Functions', 'rest_api_allowed_post_types' ),
242
		'rest_api_allowed_public_metadata' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'rest_api_allowed_public_metadata' ),
243
		'sso_is_two_step_required'         => array( 'Jetpack_SSO_Helpers', 'is_two_step_required' ),
244
		'sso_should_hide_login_form'       => array( 'Jetpack_SSO_Helpers', 'should_hide_login_form' ),
245
		'sso_match_by_email'               => array( 'Jetpack_SSO_Helpers', 'match_by_email' ),
246
		'sso_new_user_override'            => array( 'Jetpack_SSO_Helpers', 'new_user_override' ),
247
		'sso_bypass_default_login_form'    => array( 'Jetpack_SSO_Helpers', 'bypass_login_forward_wpcom' ),
248
		'wp_version'                       => array( 'Automattic\\Jetpack\\Sync\\Functions', 'wp_version' ),
249
		'get_plugins'                      => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins' ),
250
		'get_plugins_action_links'         => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins_action_links' ),
251
		'active_modules'                   => array( 'Jetpack', 'get_active_modules' ),
252
		'hosting_provider'                 => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_hosting_provider' ),
253
		'locale'                           => 'get_locale',
254
		'site_icon_url'                    => array( 'Automattic\\Jetpack\\Sync\\Functions', 'site_icon_url' ),
255
		'roles'                            => array( 'Automattic\\Jetpack\\Sync\\Functions', 'roles' ),
256
		'timezone'                         => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_timezone' ),
257
		'available_jetpack_blocks'         => array( 'Jetpack_Gutenberg', 'get_availability' ), // Includes both Gutenberg blocks *and* plugins
258
		'paused_themes'                    => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_themes' ),
259
		'paused_plugins'                   => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_plugins' ),
260
	);
261
262
263
	static $default_post_type_attributes = array(
264
		'name'                => '',
265
		'label'               => '',
266
		'labels'              => array(),
267
		'description'         => '',
268
		'public'              => false,
269
		'hierarchical'        => false,
270
		'exclude_from_search' => true,
271
		'publicly_queryable'  => null,
272
		'show_ui'             => false,
273
		'show_in_menu'        => null,
274
		'show_in_nav_menus'   => null,
275
		'show_in_admin_bar'   => false,
276
		'menu_position'       => null,
277
		'menu_icon'           => null,
278
		'supports'            => array(),
279
		'capability_type'     => 'post',
280
		'capabilities'        => array(),
281
		'cap'                 => array(),
282
		'map_meta_cap'        => true,
283
		'taxonomies'          => array(),
284
		'has_archive'         => false,
285
		'rewrite'             => true,
286
		'query_var'           => true,
287
		'can_export'          => true,
288
		'delete_with_user'    => null,
289
		'show_in_rest'        => false,
290
		'rest_base'           => false,
291
		'_builtin'            => false,
292
		'_edit_link'          => 'post.php?post=%d',
293
	);
294
295
	public static function get_callable_whitelist() {
296
		/**
297
		 * Filter the list of callables that are manageable via the JSON API.
298
		 *
299
		 * @module sync
300
		 *
301
		 * @since 4.8.0
302
		 *
303
		 * @param array The default list of callables.
304
		 */
305
		return apply_filters( 'jetpack_sync_callable_whitelist', self::$default_callable_whitelist );
306
	}
307
308
	static $blacklisted_post_types = array(
309
		'ai1ec_event',
310
		'bwg_album',
311
		'bwg_gallery',
312
		'customize_changeset', // WP built-in post type for Customizer changesets
313
		'dn_wp_yt_log',
314
		'http',
315
		'idx_page',
316
		'jetpack_migration',
317
		'postman_sent_mail',
318
		'rssap-feed',
319
		'rssmi_feed_item',
320
		'secupress_log_action',
321
		'sg_optimizer_jobs',
322
		'snitch',
323
		'wpephpcompat_jobs',
324
		'wprss_feed_item',
325
		'wp_automatic',
326
		'jp_sitemap_master',
327
		'jp_sitemap',
328
		'jp_sitemap_index',
329
		'jp_img_sitemap',
330
		'jp_img_sitemap_index',
331
		'jp_vid_sitemap',
332
		'jp_vid_sitemap_index',
333
		'vip-legacy-redirect',
334
	);
335
336
	static $default_post_checksum_columns = array(
337
		'ID',
338
		'post_modified',
339
	);
340
341
	static $default_post_meta_checksum_columns = array(
342
		'meta_id',
343
		'meta_value',
344
	);
345
346
	static $default_comment_checksum_columns = array(
347
		'comment_ID',
348
		'comment_content',
349
	);
350
351
	static $default_comment_meta_checksum_columns = array(
352
		'meta_id',
353
		'meta_value',
354
	);
355
356
	static $default_option_checksum_columns = array(
357
		'option_name',
358
		'option_value',
359
	);
360
361
	static $default_term_checksum_columns = array(
362
		'term_id',
363
		'name',
364
		'slug',
365
	);
366
367
	static $default_multisite_callable_whitelist = array(
368
		'network_name'                        => array( 'Jetpack', 'network_name' ),
369
		'network_allow_new_registrations'     => array( 'Jetpack', 'network_allow_new_registrations' ),
370
		'network_add_new_users'               => array( 'Jetpack', 'network_add_new_users' ),
371
		'network_site_upload_space'           => array( 'Jetpack', 'network_site_upload_space' ),
372
		'network_upload_file_types'           => array( 'Jetpack', 'network_upload_file_types' ),
373
		'network_enable_administration_menus' => array( 'Jetpack', 'network_enable_administration_menus' ),
374
	);
375
376
	public static function get_multisite_callable_whitelist() {
377
		/**
378
		 * Filter the list of multisite callables that are manageable via the JSON API.
379
		 *
380
		 * @module sync
381
		 *
382
		 * @since 4.8.0
383
		 *
384
		 * @param array The default list of multisite callables.
385
		 */
386
		return apply_filters( 'jetpack_sync_multisite_callable_whitelist', self::$default_multisite_callable_whitelist );
387
	}
388
389
	static $post_meta_whitelist = array(
390
		'_feedback_akismet_values',
391
		'_feedback_email',
392
		'_feedback_extra_fields',
393
		'_g_feedback_shortcode',
394
		'_jetpack_post_thumbnail',
395
		'_menu_item_classes',
396
		'_menu_item_menu_item_parent',
397
		'_menu_item_object',
398
		'_menu_item_object_id',
399
		'_menu_item_orphaned',
400
		'_menu_item_type',
401
		'_menu_item_xfn',
402
		'_publicize_facebook_user',
403
		'_publicize_twitter_user',
404
		'_thumbnail_id',
405
		'_wp_attached_file',
406
		'_wp_attachment_backup_sizes',
407
		'_wp_attachment_context',
408
		'_wp_attachment_image_alt',
409
		'_wp_attachment_is_custom_background',
410
		'_wp_attachment_is_custom_header',
411
		'_wp_attachment_metadata',
412
		'_wp_page_template',
413
		'_wp_trash_meta_comments_status',
414
		'_wpas_mess',
415
		'content_width',
416
		'custom_css_add',
417
		'custom_css_preprocessor',
418
		'enclosure',
419
		'imagedata',
420
		'nova_price',
421
		'publicize_results',
422
		'sharing_disabled',
423
		'switch_like_status',
424
		'videopress_guid',
425
		'vimeo_poster_image',
426
		'advanced_seo_description', // Jetpack_SEO_Posts::DESCRIPTION_META_KEY
427
	);
428
429
	public static function get_post_meta_whitelist() {
430
		/**
431
		 * Filter the list of post meta data that are manageable via the JSON API.
432
		 *
433
		 * @module sync
434
		 *
435
		 * @since 4.8.0
436
		 *
437
		 * @param array The default list of meta data keys.
438
		 */
439
		return apply_filters( 'jetpack_sync_post_meta_whitelist', self::$post_meta_whitelist );
440
	}
441
442
	static $comment_meta_whitelist = array(
443
		'hc_avatar',
444
		'hc_post_as',
445
		'hc_wpcom_id_sig',
446
		'hc_foreign_user_id',
447
	);
448
449
	public static function get_comment_meta_whitelist() {
450
		/**
451
		 * Filter the list of comment meta data that are manageable via the JSON API.
452
		 *
453
		 * @module sync
454
		 *
455
		 * @since 5.7.0
456
		 *
457
		 * @param array The default list of comment meta data keys.
458
		 */
459
		return apply_filters( 'jetpack_sync_comment_meta_whitelist', self::$comment_meta_whitelist );
460
	}
461
462
	// TODO: move this to server? - these are theme support values
463
	// that should be synced as jetpack_current_theme_supports_foo option values
464
	static $default_theme_support_whitelist = array(
465
		'post-thumbnails',
466
		'post-formats',
467
		'custom-header',
468
		'custom-background',
469
		'custom-logo',
470
		'menus',
471
		'automatic-feed-links',
472
		'editor-style',
473
		'widgets',
474
		'html5',
475
		'title-tag',
476
		'jetpack-social-menu',
477
		'jetpack-responsive-videos',
478
		'infinite-scroll',
479
		'site-logo',
480
	);
481
482
	static function is_whitelisted_option( $option ) {
483
		$whitelisted_options = self::get_options_whitelist();
484
		foreach ( $whitelisted_options as $whitelisted_option ) {
485
			if ( $whitelisted_option[0] === '/' && preg_match( $whitelisted_option, $option ) ) {
486
				return true;
487
			} elseif ( $whitelisted_option === $option ) {
488
				return true;
489
			}
490
		}
491
492
		return false;
493
	}
494
495
	static $default_capabilities_whitelist = array(
496
		'switch_themes',
497
		'edit_themes',
498
		'edit_theme_options',
499
		'install_themes',
500
		'activate_plugins',
501
		'edit_plugins',
502
		'install_plugins',
503
		'edit_users',
504
		'edit_files',
505
		'manage_options',
506
		'moderate_comments',
507
		'manage_categories',
508
		'manage_links',
509
		'upload_files',
510
		'import',
511
		'unfiltered_html',
512
		'edit_posts',
513
		'edit_others_posts',
514
		'edit_published_posts',
515
		'publish_posts',
516
		'edit_pages',
517
		'read',
518
		'publish_pages',
519
		'edit_others_pages',
520
		'edit_published_pages',
521
		'delete_pages',
522
		'delete_others_pages',
523
		'delete_published_pages',
524
		'delete_posts',
525
		'delete_others_posts',
526
		'delete_published_posts',
527
		'delete_private_posts',
528
		'edit_private_posts',
529
		'read_private_posts',
530
		'delete_private_pages',
531
		'edit_private_pages',
532
		'read_private_pages',
533
		'delete_users',
534
		'create_users',
535
		'unfiltered_upload',
536
		'edit_dashboard',
537
		'customize',
538
		'delete_site',
539
		'update_plugins',
540
		'delete_plugins',
541
		'update_themes',
542
		'update_core',
543
		'list_users',
544
		'remove_users',
545
		'add_users',
546
		'promote_users',
547
		'delete_themes',
548
		'export',
549
		'edit_comment',
550
		'upload_plugins',
551
		'upload_themes',
552
	);
553
554
	public static function get_capabilities_whitelist() {
555
		/**
556
		 * Filter the list of capabilities that we care about
557
		 *
558
		 * @module sync
559
		 *
560
		 * @since 5.5.0
561
		 *
562
		 * @param array The default list of capabilities.
563
		 */
564
		return apply_filters( 'jetpack_sync_capabilities_whitelist', self::$default_capabilities_whitelist );
565
	}
566
567
	static function get_max_sync_execution_time() {
568
		$max_exec_time = intval( ini_get( 'max_execution_time' ) );
569
		if ( 0 === $max_exec_time ) {
570
			// 0 actually means "unlimited", but let's not treat it that way
571
			$max_exec_time = 60;
572
		}
573
		return floor( $max_exec_time / 3 );
574
	}
575
576
	static function get_default_setting( $setting ) {
577
		$default_name = "default_$setting"; // e.g. default_dequeue_max_bytes
578
		return self::$$default_name;
579
	}
580
581
	static $default_network_options_whitelist = array(
582
		'site_name',
583
		'jetpack_protect_key',
584
		'jetpack_protect_global_whitelist',
585
		'active_sitewide_plugins',
586
	);
587
588
	/**
589
	 * A mapping of known importers to friendly names.
590
	 *
591
	 * Keys are the class name of the known importer.
592
	 * Values are the friendly name.
593
	 *
594
	 * @since 7.3.0
595
	 *
596
	 * @var array
597
	 */
598
	public static $default_known_importers = array(
599
		'Blogger_Importer'     => 'blogger',
600
		'LJ_API_Import'        => 'livejournal',
601
		'MT_Import'            => 'mt',
602
		'RSS_Import'           => 'rss',
603
		'WC_Tax_Rate_Importer' => 'woo-tax-rate',
604
		'WP_Import'            => 'wordpress',
605
	);
606
607
	/**
608
	 * Returns a list of known importers.
609
	 *
610
	 * @since 7.3.0
611
	 *
612
	 * @return array Known importers with importer class names as keys and friendly names as values.
613
	 */
614
	public static function get_known_importers() {
615
		/**
616
		 * Filter the list of known importers.
617
		 *
618
		 * @module sync
619
		 *
620
		 * @since 7.3.0
621
		 *
622
		 * @param array The default list of known importers.
623
		 */
624
		return apply_filters( 'jetpack_sync_known_importers', self::$default_known_importers );
625
	}
626
627
	/**
628
	 * Whether this is a system with a multiple networks.
629
	 * We currently need this static wrapper because we statically define our default list of callables.
630
	 *
631
	 * @since 7.6.0
632
	 *
633
	 * @uses Automattic\Jetpack\Status::is_multi_network
634
	 *
635
	 * @return boolean
636
	 */
637
	public static function is_multi_network() {
638
		$status = new Status();
639
		return $status->is_multi_network();
640
	}
641
642
	static $default_taxonomy_whitelist       = array();
643
	static $default_dequeue_max_bytes        = 500000; // very conservative value, 1/2 MB
644
	static $default_upload_max_bytes         = 600000; // a little bigger than the upload limit to account for serialization
645
	static $default_upload_max_rows          = 500;
646
	static $default_sync_wait_time           = 10; // seconds, between syncs
647
	static $default_sync_wait_threshold      = 5; // only wait before next send if the current send took more than X seconds
648
	static $default_enqueue_wait_time        = 10; // wait between attempting to continue a full sync, via requests
649
	static $default_max_queue_size           = 1000;
650
	static $default_max_queue_lag            = 900; // 15 minutes
651
	static $default_queue_max_writes_sec     = 100; // 100 rows a second
652
	static $default_post_types_blacklist     = array();
653
	static $default_post_meta_whitelist      = array();
654
	static $default_comment_meta_whitelist   = array();
655
	static $default_disable                  = 0; // completely disable sending data to wpcom
656
	static $default_network_disable          = 0; // completely disable sending data to wpcom network wide
657
	static $default_sync_via_cron            = 1; // use cron to sync
658
	static $default_render_filtered_content  = 0; // render post_filtered_content
659
	static $default_max_enqueue_full_sync    = 100; // max number of items to enqueue at a time when running full sync
660
	static $default_max_queue_size_full_sync = 1000; // max number of total items in the full sync queue
661
	static $default_sync_callables_wait_time = MINUTE_IN_SECONDS; // seconds before sending callables again
662
	static $default_sync_constants_wait_time = HOUR_IN_SECONDS; // seconds before sending constants again
663
	static $default_sync_queue_lock_timeout  = 120; // 2 minutes
664
	static $default_cron_sync_time_limit     = 30; // 30 seconds
665
666
}
667