← All changes
|
jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php
+164
-44
12.7.3
→
16.3-beta
View file →
| @@ -27,8 +27,9 @@ | ||
| 27 | 27 | 'avatar_default', |
| 28 | 28 | 'avatar_rating', |
| 29 | 29 | 'blog_charset', |
| 30 | 30 | 'blog_public', |
| 31 | + 'wpcom_data_sharing_opt_out', | |
| 31 | 32 | 'blogdescription', |
| 32 | 33 | 'blogname', |
| 33 | 34 | 'carousel_background_color', |
| 34 | 35 | 'carousel_display_comments', |
| @@ -55,8 +56,9 @@ | ||
| 55 | 56 | 'default_role', |
| 56 | 57 | 'disabled_likes', |
| 57 | 58 | 'disabled_reblogs', |
| 58 | 59 | 'disallowed_keys', |
| 60 | + 'enable_blocks_comments', | |
| 59 | 61 | 'enable_header_ad', |
| 60 | 62 | 'gmt_offset', |
| 61 | 63 | 'gravatar_disable_hovercards', |
| 62 | 64 | 'highlander_comment_form_prompt', |
| @@ -62,9 +64,8 @@ | ||
| 62 | 64 | 'highlander_comment_form_prompt', |
| 63 | 65 | 'image_default_link_type', |
| 64 | 66 | 'infinite_scroll', |
| 65 | 67 | 'infinite_scroll_google_analytics', |
| 66 | - 'jetpack-memberships-connected-account-id', | |
| 67 | 68 | 'jetpack-memberships-has-connected-account', |
| 68 | 69 | 'jetpack-twitter-cards-site-tag', |
| 69 | 70 | 'jetpack_activated', |
| 70 | 71 | 'jetpack_allowed_xsite_search_ids', |
| @@ -77,19 +78,23 @@ | ||
| 77 | 78 | 'jetpack_autoupdate_translations', |
| 78 | 79 | 'jetpack_available_modules', |
| 79 | 80 | 'jetpack_comment_form_color_scheme', |
| 80 | 81 | 'jetpack_comment_likes_enabled', |
| 81 | - 'jetpack_connection_active_plugins', | |
| 82 | 82 | 'jetpack_excluded_extensions', |
| 83 | + 'jetpack_holiday_snow_enabled', | |
| 83 | 84 | 'jetpack_mailchimp', |
| 84 | 85 | 'jetpack_options', |
| 85 | 86 | 'jetpack_portfolio', |
| 86 | 87 | 'jetpack_portfolio_posts_per_page', |
| 88 | + 'jetpack_premium_analytics_enabled', | |
| 87 | 89 | 'jetpack_protect_global_whitelist', |
| 88 | 90 | 'jetpack_protect_key', |
| 89 | 91 | 'jetpack_publicize_options', |
| 90 | 92 | 'jetpack_relatedposts', |
| 93 | + 'jetpack_social_message_template', | |
| 94 | + 'jetpack_social_notes_config', | |
| 91 | 95 | 'jetpack_social_settings', |
| 96 | + 'jetpack_social_utm_settings', | |
| 92 | 97 | 'jetpack_sso_match_by_email', |
| 93 | 98 | 'jetpack_sso_require_two_step', |
| 94 | 99 | 'jetpack_sync_non_blocking', // is non-blocking Jetpack Sync flow enabled. |
| 95 | 100 | 'jetpack_sync_non_public_post_stati', |
| @@ -98,8 +103,9 @@ | ||
| 98 | 103 | 'jetpack_sync_settings_post_types_blacklist', |
| 99 | 104 | 'jetpack_sync_settings_taxonomies_blacklist', |
| 100 | 105 | 'jetpack_sync_settings_dedicated_sync_enabled', // is Dedicated Sync flow enabled. |
| 101 | 106 | 'jetpack_sync_settings_custom_queue_table_enabled', // is custom queue table enabled. |
| 107 | + 'jetpack_sync_settings_wpcom_rest_api_enabled', // is wpcom rest api enabled. | |
| 102 | 108 | 'jetpack_testimonial', |
| 103 | 109 | 'jetpack_testimonial_posts_per_page', |
| 104 | 110 | 'jetpack_wga', |
| 105 | 111 | 'large_size_h', |
| @@ -162,11 +168,16 @@ | ||
| 162 | 168 | 'uninstall_plugins', |
| 163 | 169 | 'uploads_use_yearmonth_folders', |
| 164 | 170 | 'users_can_register', |
| 165 | 171 | 'verification_services_codes', |
| 172 | + 'videopress_auto_subtitles_disabled', | |
| 173 | + 'videopress_player_preload_disabled', | |
| 174 | + 'videopress_playlist_index', | |
| 166 | 175 | 'videopress_private_enabled_for_site', |
| 176 | + 'videopress_share_menu_disabled', | |
| 167 | 177 | 'wordads_ccpa_enabled', |
| 168 | 178 | 'wordads_ccpa_privacy_policy_url', |
| 179 | + 'wordads_cmp_enabled', | |
| 169 | 180 | 'wordads_custom_adstxt', |
| 170 | 181 | 'wordads_custom_adstxt_enabled', |
| 171 | 182 | 'wordads_display_archive', |
| 172 | 183 | 'wordads_display_front_page', |
| @@ -172,14 +183,21 @@ | ||
| 172 | 183 | 'wordads_display_front_page', |
| 173 | 184 | 'wordads_display_page', |
| 174 | 185 | 'wordads_display_post', |
| 175 | 186 | 'wordads_second_belowpost', |
| 187 | + 'wordads_inline_enabled', | |
| 176 | 188 | 'woocommerce_custom_orders_table_enabled', |
| 177 | 189 | 'wp_mobile_app_promos', |
| 178 | 190 | 'wp_mobile_excerpt', |
| 179 | 191 | 'wp_mobile_featured_images', |
| 180 | 192 | 'wp_page_for_privacy_policy', |
| 193 | + 'wpcom_ai_site_prompt', | |
| 194 | + 'wpcom_classic_early_release', | |
| 195 | + 'wpcom_newsletter_send_default', | |
| 181 | 196 | 'wpcom_featured_image_in_email', |
| 197 | + 'jetpack_gravatar_in_email', | |
| 198 | + 'jetpack_author_in_email', | |
| 199 | + 'jetpack_post_date_in_email', | |
| 182 | 200 | 'wpcom_gifting_subscription', |
| 183 | 201 | 'wpcom_is_fse_activated', |
| 184 | 202 | 'wpcom_legacy_contact', |
| 185 | 203 | 'wpcom_locked_mode', |
| @@ -189,8 +207,22 @@ | ||
| 189 | 207 | 'wpcom_publish_posts_with_markdown', |
| 190 | 208 | 'wpcom_reader_views_enabled', |
| 191 | 209 | 'wpcom_site_setup', |
| 192 | 210 | 'wpcom_subscription_emails_use_excerpt', |
| 211 | + 'jetpack_subscriptions_reply_to', | |
| 212 | + 'jetpack_subscriptions_from_name', | |
| 213 | + 'jetpack_verbum_subscription_modal', | |
| 214 | + 'jetpack_blocks_disabled', | |
| 215 | + 'jetpack_newsletters_publishing_default_frequency', | |
| 216 | + 'jetpack_scheduled_plugins_update', | |
| 217 | + 'jetpack_waf_automatic_rules', | |
| 218 | + 'jetpack_waf_ip_allow_list', | |
| 219 | + 'jetpack_waf_ip_allow_list_enabled', | |
| 220 | + 'jetpack_waf_ip_block_list', | |
| 221 | + 'jetpack_waf_ip_block_list_enabled', | |
| 222 | + 'jetpack_waf_share_data', | |
| 223 | + 'jetpack_waf_share_debug_data', | |
| 224 | + 'jetpack_waf_automatic_rules_last_updated_timestamp', | |
| 193 | 225 | ); |
| 194 | 226 | |
| 195 | 227 | /** |
| 196 | 228 | * Return options whitelist filtered. |
| @@ -299,39 +331,44 @@ | ||
| 299 | 331 | * |
| 300 | 332 | * @var array Default whitelist of callables. |
| 301 | 333 | */ |
| 302 | 334 | public static $default_callable_whitelist = array( |
| 303 | - 'get_loaded_extensions' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_loaded_extensions' ), | |
| 304 | - 'get_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins' ), | |
| 305 | - 'get_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_themes' ), | |
| 306 | - 'get_plugins_action_links' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins_action_links' ), | |
| 307 | - 'has_file_system_write_access' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'file_system_write_access' ), | |
| 308 | - 'home_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'home_url' ), | |
| 309 | - 'hosting_provider' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_hosting_provider' ), | |
| 310 | - 'is_fse_theme' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_is_fse_theme' ), | |
| 311 | - 'is_main_network' => array( __CLASS__, 'is_multi_network' ), | |
| 312 | - 'is_multi_site' => 'is_multisite', | |
| 313 | - 'is_version_controlled' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'is_version_controlled' ), | |
| 314 | - 'locale' => 'get_locale', | |
| 315 | - 'main_network_site' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'main_network_site_url' ), | |
| 316 | - 'main_network_site_wpcom_id' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'main_network_site_wpcom_id' ), | |
| 317 | - 'paused_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_plugins' ), | |
| 318 | - 'paused_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_themes' ), | |
| 319 | - 'post_type_features' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_post_type_features' ), | |
| 320 | - 'post_types' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_post_types' ), | |
| 321 | - 'rest_api_allowed_post_types' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'rest_api_allowed_post_types' ), | |
| 322 | - 'rest_api_allowed_public_metadata' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'rest_api_allowed_public_metadata' ), | |
| 323 | - 'roles' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'roles' ), | |
| 324 | - 'shortcodes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_shortcodes' ), | |
| 325 | - 'site_icon_url' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'site_icon_url' ), | |
| 326 | - 'site_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'site_url' ), | |
| 327 | - 'taxonomies' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_taxonomies' ), | |
| 328 | - 'theme_support' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_theme_support' ), | |
| 329 | - 'timezone' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_timezone' ), | |
| 330 | - 'wp_get_environment_type' => 'wp_get_environment_type', | |
| 331 | - 'wp_max_upload_size' => 'wp_max_upload_size', | |
| 332 | - 'wp_version' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'wp_version' ), | |
| 333 | - 'active_modules' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_active_modules' ), | |
| 335 | + 'get_loaded_extensions' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_loaded_extensions' ), | |
| 336 | + 'get_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins' ), | |
| 337 | + 'get_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_themes' ), | |
| 338 | + 'get_plugins_action_links' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins_action_links' ), | |
| 339 | + 'has_file_system_write_access' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'file_system_write_access' ), | |
| 340 | + 'home_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'home_url' ), | |
| 341 | + 'hosting_provider' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_hosting_provider' ), | |
| 342 | + 'is_fse_theme' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_is_fse_theme' ), | |
| 343 | + 'is_main_network' => array( __CLASS__, 'is_multi_network' ), | |
| 344 | + 'is_multi_site' => 'is_multisite', | |
| 345 | + 'is_version_controlled' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'is_version_controlled' ), | |
| 346 | + 'locale' => 'get_locale', | |
| 347 | + 'main_network_site' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'main_network_site_url' ), | |
| 348 | + 'main_network_site_wpcom_id' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'main_network_site_wpcom_id' ), | |
| 349 | + 'paused_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_plugins' ), | |
| 350 | + 'paused_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_themes' ), | |
| 351 | + 'post_type_features' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_post_type_features' ), | |
| 352 | + 'post_types' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_post_types' ), | |
| 353 | + 'rest_api_allowed_post_types' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'rest_api_allowed_post_types' ), | |
| 354 | + 'rest_api_allowed_public_metadata' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'rest_api_allowed_public_metadata' ), | |
| 355 | + 'roles' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'roles' ), | |
| 356 | + 'shortcodes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_shortcodes' ), | |
| 357 | + 'site_icon_url' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'site_icon_url' ), | |
| 358 | + 'site_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'site_url' ), | |
| 359 | + 'taxonomies' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_taxonomies' ), | |
| 360 | + 'theme_support' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_theme_support' ), | |
| 361 | + 'timezone' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_timezone' ), | |
| 362 | + 'wp_get_environment_type' => 'wp_get_environment_type', | |
| 363 | + 'wp_max_upload_size' => 'wp_max_upload_size', | |
| 364 | + 'wp_version' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'wp_version' ), | |
| 365 | + 'active_modules' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_active_modules' ), | |
| 366 | + 'jetpack_connection_active_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_jetpack_connection_active_plugins' ), | |
| 367 | + 'jetpack_package_versions' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_jetpack_package_versions' ), | |
| 368 | + 'jetpack_sync_active_modules' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_jetpack_sync_active_modules' ), | |
| 369 | + // Carries the `blog_public` value, but reports -1 when the site is private. | |
| 370 | + 'jetpack_site_visibility' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_site_visibility' ), | |
| 334 | 371 | ); |
| 335 | 372 | |
| 336 | 373 | /** |
| 337 | 374 | * Array of post type attributes synced. |
| @@ -433,8 +470,16 @@ | ||
| 433 | 470 | 'wp_automatic', |
| 434 | 471 | 'wp_log', // WP Logging Plugin. |
| 435 | 472 | 'wpephpcompat_jobs', |
| 436 | 473 | 'wprss_feed_item', |
| 474 | + 'tribe-ea-record', // The Events Calendar Plugin - Store Event Aggregator record information. | |
| 475 | + 'wphb_minify_group', // Hummingbird Plugin - Used internally to keep data about assets minification. | |
| 476 | + 'bigcommerce_task', // BigCommerce Plugin - Store import queue. | |
| 477 | + 'secupress_log_err404', // SecuPress Plugin - Log 404 pages | |
| 478 | + 'iw_omnibus_price_log', // Omnibus Plugin - Log price changes. | |
| 479 | + 'od_url_metrics', // Optimization Detective - Log URL metrics. | |
| 480 | + 'ap_outbox', // ActivityPub Outbox; only used for broadcasting ActivityPub activity to followers. | |
| 481 | + 'shop_order_placehold', // WooCommerce placeholder - Used to maintain compatibility and references when switching between WP Posts-based order storage and the newer HPOS tables. | |
| 437 | 482 | ); |
| 438 | 483 | |
| 439 | 484 | /** |
| 440 | 485 | * Taxonomies that we're not syncing by default. |
| @@ -735,14 +780,17 @@ | ||
| 735 | 780 | '_wp_attachment_image_alt', |
| 736 | 781 | '_wp_attachment_is_custom_background', |
| 737 | 782 | '_wp_attachment_is_custom_header', |
| 738 | 783 | '_wp_attachment_metadata', |
| 784 | + '_wp_old_date', | |
| 739 | 785 | '_wp_page_template', |
| 740 | 786 | '_wp_trash_meta_comments_status', |
| 741 | 787 | '_wpas_feature_enabled', |
| 742 | - '_wpas_is_tweetstorm', | |
| 788 | + '_wpas_connection_overrides', | |
| 789 | + '_wpas_customize_per_network', | |
| 743 | 790 | '_wpas_mess', |
| 744 | 791 | '_wpas_options', |
| 792 | + '_jetpack_social_image_focal_point', // Publicize_Base::ATTACHMENT_IMAGE_FOCAL_POINT. | |
| 745 | 793 | 'advanced_seo_description', // Jetpack_SEO_Posts::DESCRIPTION_META_KEY. |
| 746 | 794 | 'content_width', |
| 747 | 795 | 'custom_css_add', |
| 748 | 796 | 'custom_css_preprocessor', |
| @@ -754,8 +802,9 @@ | ||
| 754 | 802 | 'switch_like_status', |
| 755 | 803 | 'videopress_guid', |
| 756 | 804 | 'vimeo_poster_image', |
| 757 | 805 | '_jetpack_blogging_prompt_key', |
| 806 | + 'footnotes', // Core footnotes block | |
| 758 | 807 | ); |
| 759 | 808 | |
| 760 | 809 | /** |
| 761 | 810 | * Get the post meta key whitelist. |
| @@ -785,8 +834,12 @@ | ||
| 785 | 834 | 'hc_avatar', |
| 786 | 835 | 'hc_foreign_user_id', |
| 787 | 836 | 'hc_post_as', |
| 788 | 837 | 'hc_wpcom_id_sig', |
| 838 | + 'jetpack_comment_identity_avatar', | |
| 839 | + 'jetpack_comment_identity_id', | |
| 840 | + 'jetpack_comment_identity_provider', | |
| 841 | + 'protocol', | |
| 789 | 842 | ); |
| 790 | 843 | |
| 791 | 844 | /** |
| 792 | 845 | * Get the comment meta whitelist. |
| @@ -807,8 +860,34 @@ | ||
| 807 | 860 | return apply_filters( 'jetpack_sync_comment_meta_whitelist', self::$comment_meta_whitelist ); |
| 808 | 861 | } |
| 809 | 862 | |
| 810 | 863 | /** |
| 864 | + * Comment types whitelist. | |
| 865 | + * | |
| 866 | + * @var array Comment types that are synced. | |
| 867 | + */ | |
| 868 | + public static $comment_types_whitelist = array( '', 'comment', 'trackback', 'pingback', 'review', 'note' ); | |
| 869 | + | |
| 870 | + /** | |
| 871 | + * Get the comment types whitelist. | |
| 872 | + * | |
| 873 | + * @return array | |
| 874 | + */ | |
| 875 | + public static function get_comment_types_whitelist() { | |
| 876 | + /** | |
| 877 | + * Comment types present in this list will be synced to WordPress.com. | |
| 878 | + * | |
| 879 | + * @module sync | |
| 880 | + * | |
| 881 | + * @since 1.6.3 | |
| 882 | + * @since-jetpack 7.6.0 | |
| 883 | + * | |
| 884 | + * @param array A list of comment types. | |
| 885 | + */ | |
| 886 | + return apply_filters( 'jetpack_sync_whitelisted_comment_types', self::$comment_types_whitelist ); | |
| 887 | + } | |
| 888 | + | |
| 889 | + /** | |
| 811 | 890 | * Default theme support whitelist. |
| 812 | 891 | * |
| 813 | 892 | * @todo move this to server? - these are theme support values |
| 814 | 893 | * that should be synced as jetpack_current_theme_supports_foo option values |
| @@ -834,8 +913,9 @@ | ||
| 834 | 913 | 'disable-layout-styles', // WP 6.1. Added via https://core.trac.wordpress.org/changeset/54159 |
| 835 | 914 | 'editor-color-palette', |
| 836 | 915 | 'editor-font-sizes', |
| 837 | 916 | 'editor-gradient-presets', |
| 917 | + 'editor-spacing-sizes', | |
| 838 | 918 | 'editor-style', // deprecated. |
| 839 | 919 | 'editor-styles', |
| 840 | 920 | 'html5', |
| 841 | 921 | 'infinite-scroll', |
| @@ -1150,8 +1230,15 @@ | ||
| 1150 | 1230 | */ |
| 1151 | 1231 | public static $default_comment_meta_whitelist = array(); |
| 1152 | 1232 | |
| 1153 | 1233 | /** |
| 1234 | + * Default for sync actions blacklist. | |
| 1235 | + * | |
| 1236 | + * @var array Empty array. | |
| 1237 | + */ | |
| 1238 | + public static $default_sync_actions_blacklist = array(); | |
| 1239 | + | |
| 1240 | + /** | |
| 1154 | 1241 | * Default for disabling sync across the site. |
| 1155 | 1242 | * |
| 1156 | 1243 | * @var int Bool-ish. Default to 0. |
| 1157 | 1244 | */ |
| @@ -1261,46 +1348,63 @@ | ||
| 1261 | 1348 | * |
| 1262 | 1349 | * @var array list of module names. |
| 1263 | 1350 | */ |
| 1264 | 1351 | public static $default_full_sync_config = array( |
| 1265 | - 'comments' => 1, | |
| 1266 | 1352 | 'constants' => 1, |
| 1267 | 1353 | 'functions' => 1, |
| 1268 | 1354 | 'options' => 1, |
| 1269 | - 'posts' => 1, | |
| 1270 | - 'term_relationships' => 1, | |
| 1271 | 1355 | 'terms' => 1, |
| 1272 | 1356 | 'themes' => 1, |
| 1357 | + 'users' => 1, | |
| 1358 | + 'posts' => 1, | |
| 1359 | + 'comments' => 1, | |
| 1273 | 1360 | 'updates' => 1, |
| 1274 | - 'users' => 1, | |
| 1361 | + 'term_relationships' => 1, | |
| 1275 | 1362 | ); |
| 1276 | 1363 | |
| 1277 | 1364 | /** |
| 1365 | + * Default Full Sync limits for one module. | |
| 1366 | + * | |
| 1367 | + * @var array list of limits. | |
| 1368 | + */ | |
| 1369 | + public static $default_full_sync_limits_per_module = array( | |
| 1370 | + 'chunk_size' => 100, | |
| 1371 | + 'max_chunks' => 10, | |
| 1372 | + ); | |
| 1373 | + /** | |
| 1278 | 1374 | * Default Full Sync max objects to send on a single request. |
| 1279 | 1375 | * |
| 1280 | 1376 | * @var array list of module => max. |
| 1281 | 1377 | */ |
| 1282 | 1378 | public static $default_full_sync_limits = array( |
| 1283 | - 'comments' => array( | |
| 1379 | + 'comments' => array( | |
| 1284 | 1380 | 'chunk_size' => 100, |
| 1285 | 1381 | 'max_chunks' => 10, |
| 1286 | 1382 | ), |
| 1287 | - 'posts' => array( | |
| 1288 | - 'chunk_size' => 100, | |
| 1383 | + 'posts' => array( | |
| 1384 | + 'chunk_size' => 500, | |
| 1289 | 1385 | 'max_chunks' => 1, |
| 1290 | 1386 | ), |
| 1291 | - 'term_relationships' => array( | |
| 1387 | + 'term_relationships' => array( | |
| 1292 | 1388 | 'chunk_size' => 1000, |
| 1293 | 1389 | 'max_chunks' => 10, |
| 1294 | 1390 | ), |
| 1295 | - 'terms' => array( | |
| 1391 | + 'terms' => array( | |
| 1296 | 1392 | 'chunk_size' => 1000, |
| 1297 | 1393 | 'max_chunks' => 10, |
| 1298 | 1394 | ), |
| 1299 | - 'users' => array( | |
| 1395 | + 'users' => array( | |
| 1300 | 1396 | 'chunk_size' => 100, |
| 1301 | 1397 | 'max_chunks' => 10, |
| 1302 | 1398 | ), |
| 1399 | + 'woocommerce' => array( | |
| 1400 | + 'chunk_size' => 100, | |
| 1401 | + 'max_chunks' => 10, | |
| 1402 | + ), | |
| 1403 | + 'woocommerce_hpos_orders' => array( | |
| 1404 | + 'chunk_size' => 100, | |
| 1405 | + 'max_chunks' => 10, | |
| 1406 | + ), | |
| 1303 | 1407 | ); |
| 1304 | 1408 | |
| 1305 | 1409 | /** |
| 1306 | 1410 | * Default for enabling dedicated Sync flow. |
| @@ -1314,5 +1418,21 @@ | ||
| 1314 | 1418 | * |
| 1315 | 1419 | * @var int Bool-ish. Default 0. |
| 1316 | 1420 | */ |
| 1317 | 1421 | public static $default_custom_queue_table_enabled = 0; |
| 1422 | + | |
| 1423 | + /** | |
| 1424 | + * Default for enabling wpcom rest api for Sync. | |
| 1425 | + * | |
| 1426 | + * @var int Bool-ish. Default 1. | |
| 1427 | + */ | |
| 1428 | + public static $default_wpcom_rest_api_enabled = 1; | |
| 1429 | + | |
| 1430 | + /** | |
| 1431 | + * A list of 'jetpack_options' specific keys we want to ignore. | |
| 1432 | + * | |
| 1433 | + * @var array | |
| 1434 | + */ | |
| 1435 | + public static $jetpack_options_blacklist = array( | |
| 1436 | + 'last_heartbeat', | |
| 1437 | + ); | |
| 1318 | 1438 | } |