Completed
Push — add/jps-override-user_email ( 1243a8...f9bd30 )
by
unknown
65:24 queued 55:27
created

Jetpack_Sync_Defaults   B

Complexity

Total Complexity 14

Size/Duplication

Total Lines 520
Duplicated Lines 0 %

Coupling/Cohesion

Components 7
Dependencies 0

Importance

Changes 0
Metric Value
wmc 14
lcom 7
cbo 0
dl 0
loc 520
rs 8.3333
c 0
b 0
f 0

9 Methods

Rating   Name   Duplication   Size   Complexity  
A get_options_whitelist() 0 14 1
A get_constants_whitelist() 0 12 1
A get_callable_whitelist() 0 12 1
A get_multisite_callable_whitelist() 0 12 1
A get_post_meta_whitelist() 0 12 1
A get_comment_meta_whitelist() 0 12 1
B is_whitelisted_option() 0 11 5
A get_capabilities_whitelist() 0 12 1
A get_max_sync_execution_time() 0 8 2
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
		'get_plugins_action_links'		   => array( 'Jetpack_Sync_functions', 'get_plugins_action_links' ),
191
		'active_modules'                   => array( 'Jetpack', 'get_active_modules' ),
192
		'hosting_provider'                 => array( 'Jetpack_Sync_Functions', 'get_hosting_provider' ),
193
		'locale'                           => 'get_locale',
194
		'site_icon_url'                    => array( 'Jetpack_Sync_Functions', 'site_icon_url' ),
195
		'roles'                            =>  array( 'Jetpack_Sync_Functions', 'roles' ),
196
	);
197
198
199
	static $default_post_type_attributes = array(
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $default_post_type_attributes.

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...
200
		'name'                => '',
201
		'label'               => '',
202
		'labels'              => array(),
203
		'description'         => '',
204
		'public'              => false,
205
		'hierarchical'        => false,
206
		'exclude_from_search' => true,
207
		'publicly_queryable'  => null,
208
		'show_ui'             => false,
209
		'show_in_menu'        => null,
210
		'show_in_nav_menus'   => null,
211
		'show_in_admin_bar'   => false,
212
		'menu_position'       => null,
213
		'menu_icon'           => null,
214
		'supports'            => array(),
215
		'capability_type'     => 'post',
216
		'capabilities'        => array(),
217
		'cap'                 => array(),
218
		'map_meta_cap'        => true,
219
		'taxonomies'          => array(),
220
		'has_archive'         => false,
221
		'rewrite'             => true,
222
		'query_var'           => true,
223
		'can_export'          => true,
224
		'delete_with_user'    => null,
225
		'show_in_rest'        => false,
226
		'rest_base'           => false,
227
		'_builtin'            => false,
228
		'_edit_link'          => 'post.php?post=%d',
229
	);
230
231
	public static function get_callable_whitelist() {
232
		/**
233
		 * Filter the list of callables that are manageable via the JSON API.
234
		 *
235
		 * @module sync
236
		 *
237
		 * @since 4.8
238
		 *
239
		 * @param array The default list of callables.
240
		 */
241
		return apply_filters( 'jetpack_sync_callable_whitelist', self::$default_callable_whitelist );
242
	}
243
244
	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...
245
		'ai1ec_event',
246
		'bwg_album',
247
		'bwg_gallery',
248
		'customize_changeset', // WP built-in post type for Customizer changesets
249
		'dn_wp_yt_log',
250
		'http',
251
		'idx_page',
252
		'jetpack_migration',
253
		'postman_sent_mail',
254
		'rssap-feed',
255
		'rssmi_feed_item',
256
		'secupress_log_action',
257
		'sg_optimizer_jobs',
258
		'snitch',
259
		'wpephpcompat_jobs',
260
		'wprss_feed_item',
261
		'wp_automatic',
262
	);
263
264
	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...
265
		'ID',
266
		'post_modified',
267
	);
268
269
	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...
270
		'meta_id',
271
		'meta_value'
272
	);
273
274
	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...
275
		'comment_ID',
276
		'comment_content',
277
	);
278
279
	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...
280
		'meta_id',
281
		'meta_value'
282
	);
283
284
	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...
285
		'option_name',
286
		'option_value',
287
	);
288
289
	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...
290
		'network_name'                        => array( 'Jetpack', 'network_name' ),
291
		'network_allow_new_registrations'     => array( 'Jetpack', 'network_allow_new_registrations' ),
292
		'network_add_new_users'               => array( 'Jetpack', 'network_add_new_users' ),
293
		'network_site_upload_space'           => array( 'Jetpack', 'network_site_upload_space' ),
294
		'network_upload_file_types'           => array( 'Jetpack', 'network_upload_file_types' ),
295
		'network_enable_administration_menus' => array( 'Jetpack', 'network_enable_administration_menus' ),
296
	);
297
298
	public static function get_multisite_callable_whitelist() {
299
		/**
300
		 * Filter the list of multisite callables that are manageable via the JSON API.
301
		 *
302
		 * @module sync
303
		 *
304
		 * @since 4.8
305
		 *
306
		 * @param array The default list of multisite callables.
307
		 */
308
		return apply_filters( 'jetpack_sync_multisite_callable_whitelist', self::$default_multisite_callable_whitelist );
309
	}
310
311
	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...
312
		'_feedback_akismet_values',
313
		'_feedback_email',
314
		'_feedback_extra_fields',
315
		'_g_feedback_shortcode',
316
		'_jetpack_post_thumbnail',
317
		'_menu_item_classes',
318
		'_menu_item_menu_item_parent',
319
		'_menu_item_object',
320
		'_menu_item_object_id',
321
		'_menu_item_orphaned',
322
		'_menu_item_type',
323
		'_menu_item_xfn',
324
		'_publicize_facebook_user',
325
		'_publicize_twitter_user',
326
		'_thumbnail_id',
327
		'_wp_attached_file',
328
		'_wp_attachment_backup_sizes',
329
		'_wp_attachment_context',
330
		'_wp_attachment_image_alt',
331
		'_wp_attachment_is_custom_background',
332
		'_wp_attachment_is_custom_header',
333
		'_wp_attachment_metadata',
334
		'_wp_page_template',
335
		'_wp_trash_meta_comments_status',
336
		'_wpas_mess',
337
		'content_width',
338
		'custom_css_add',
339
		'custom_css_preprocessor',
340
		'enclosure',
341
		'imagedata',
342
		'nova_price',
343
		'publicize_results',
344
		'sharing_disabled',
345
		'switch_like_status',
346
		'videopress_guid',
347
		'vimeo_poster_image',
348
		'advanced_seo_description', // Jetpack_SEO_Posts::DESCRIPTION_META_KEY
349
	);
350
351
	public static function get_post_meta_whitelist() {
352
		/**
353
		 * Filter the list of post meta data that are manageable via the JSON API.
354
		 *
355
		 * @module sync
356
		 *
357
		 * @since 4.8
358
		 *
359
		 * @param array The default list of meta data keys.
360
		 */
361
		return apply_filters( 'jetpack_sync_post_meta_whitelist', self::$post_meta_whitelist );
362
	}
363
364
	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...
365
		'hc_avatar',
366
		'hc_post_as',
367
		'hc_wpcom_id_sig',
368
		'hc_foreign_user_id'
369
	);
370
371
	public static function get_comment_meta_whitelist() {
372
		/**
373
		 * Filter the list of comment meta data that are manageable via the JSON API.
374
		 *
375
		 * @module sync
376
		 *
377
		 * @since 5.7.0
378
		 *
379
		 * @param array The default list of comment meta data keys.
380
		 */
381
		return apply_filters( 'jetpack_sync_comment_meta_whitelist', self::$comment_meta_whitelist );
382
	}
383
384
	// 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...
385
	// that should be synced as jetpack_current_theme_supports_foo option values
386
	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...
387
		'post-thumbnails',
388
		'post-formats',
389
		'custom-header',
390
		'custom-background',
391
		'custom-logo',
392
		'menus',
393
		'automatic-feed-links',
394
		'editor-style',
395
		'widgets',
396
		'html5',
397
		'title-tag',
398
		'jetpack-social-menu',
399
		'jetpack-responsive-videos',
400
		'infinite-scroll',
401
		'site-logo',
402
	);
403
404
	static function is_whitelisted_option( $option ) {
405
		foreach ( self::$default_options_whitelist as $whitelisted_option ) {
406
			if ( $whitelisted_option[0] === '/' && preg_match( $whitelisted_option, $option ) ) {
407
				return true;
408
			} elseif ( $whitelisted_option === $option ) {
409
				return true;
410
			}
411
		}
412
413
		return false;
414
	}
415
416
	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...
417
		'switch_themes',
418
		'edit_themes',
419
		'edit_theme_options',
420
		'install_themes',
421
		'activate_plugins',
422
		'edit_plugins',
423
		'install_plugins',
424
		'edit_users',
425
		'edit_files',
426
		'manage_options',
427
		'moderate_comments',
428
		'manage_categories',
429
		'manage_links',
430
		'upload_files',
431
		'import',
432
		'unfiltered_html',
433
		'edit_posts',
434
		'edit_others_posts',
435
		'edit_published_posts',
436
		'publish_posts',
437
		'edit_pages',
438
		'read',
439
		'publish_pages',
440
		'edit_others_pages',
441
		'edit_published_pages',
442
		'delete_pages',
443
		'delete_others_pages',
444
		'delete_published_pages',
445
		'delete_posts',
446
		'delete_others_posts',
447
		'delete_published_posts',
448
		'delete_private_posts',
449
		'edit_private_posts',
450
		'read_private_posts',
451
		'delete_private_pages',
452
		'edit_private_pages',
453
		'read_private_pages',
454
		'delete_users',
455
		'create_users',
456
		'unfiltered_upload',
457
		'edit_dashboard',
458
		'customize',
459
		'delete_site',
460
		'update_plugins',
461
		'delete_plugins',
462
		'update_themes',
463
		'update_core',
464
		'list_users',
465
		'remove_users',
466
		'add_users',
467
		'promote_users',
468
		'delete_themes',
469
		'export',
470
		'edit_comment',
471
		'upload_plugins',
472
		'upload_themes',
473
	);
474
475
	public static function get_capabilities_whitelist() {
476
		/**
477
		 * Filter the list of capabilities that we care about
478
		 *
479
		 * @module sync
480
		 *
481
		 * @since 5.5.0
482
		 *
483
		 * @param array The default list of capabilities.
484
		 */
485
		return apply_filters( 'jetpack_sync_capabilities_whitelist', self::$default_capabilities_whitelist );
486
	}
487
488
	static function get_max_sync_execution_time() {
489
		$max_exec_time = intval( ini_get( 'max_execution_time' ) );
490
		if ( 0 === $max_exec_time ) {
491
			// 0 actually means "unlimited", but let's not treat it that way
492
			$max_exec_time = 60;
493
		}
494
		return floor( $max_exec_time / 3 );
495
	}
496
497
	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...
498
		'site_name',
499
		'jetpack_protect_key',
500
		'jetpack_protect_global_whitelist',
501
		'active_sitewide_plugins',
502
	);
503
504
	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...
505
	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...
506
	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...
507
	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...
508
	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...
509
	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...
510
	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...
511
	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...
512
	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...
513
	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...
514
	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...
515
	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...
516
	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...
517
	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...
518
	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...
519
	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...
520
	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...
521
	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...
522
	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...
523
	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...
524
	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...
525
	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...
526
}
527