← All changes
|
jetpack_vendor/automattic/jetpack-sync/src/class-defaults.php
+102
-16
13.7.2
→
16.3-beta
View file →
| @@ -56,8 +56,9 @@ | ||
| 56 | 56 | 'default_role', |
| 57 | 57 | 'disabled_likes', |
| 58 | 58 | 'disabled_reblogs', |
| 59 | 59 | 'disallowed_keys', |
| 60 | + 'enable_blocks_comments', | |
| 60 | 61 | 'enable_header_ad', |
| 61 | 62 | 'gmt_offset', |
| 62 | 63 | 'gravatar_disable_hovercards', |
| 63 | 64 | 'highlander_comment_form_prompt', |
| @@ -78,19 +79,22 @@ | ||
| 78 | 79 | 'jetpack_available_modules', |
| 79 | 80 | 'jetpack_comment_form_color_scheme', |
| 80 | 81 | 'jetpack_comment_likes_enabled', |
| 81 | 82 | 'jetpack_excluded_extensions', |
| 83 | + 'jetpack_holiday_snow_enabled', | |
| 82 | 84 | 'jetpack_mailchimp', |
| 83 | 85 | 'jetpack_options', |
| 84 | 86 | 'jetpack_portfolio', |
| 85 | 87 | 'jetpack_portfolio_posts_per_page', |
| 88 | + 'jetpack_premium_analytics_enabled', | |
| 86 | 89 | 'jetpack_protect_global_whitelist', |
| 87 | 90 | 'jetpack_protect_key', |
| 88 | 91 | 'jetpack_publicize_options', |
| 89 | 92 | 'jetpack_relatedposts', |
| 93 | + 'jetpack_social_message_template', | |
| 90 | 94 | 'jetpack_social_notes_config', |
| 91 | 95 | 'jetpack_social_settings', |
| 92 | - 'jetpack_social_autoconvert_images', | |
| 96 | + 'jetpack_social_utm_settings', | |
| 93 | 97 | 'jetpack_sso_match_by_email', |
| 94 | 98 | 'jetpack_sso_require_two_step', |
| 95 | 99 | 'jetpack_sync_non_blocking', // is non-blocking Jetpack Sync flow enabled. |
| 96 | 100 | 'jetpack_sync_non_public_post_stati', |
| @@ -164,9 +168,13 @@ | ||
| 164 | 168 | 'uninstall_plugins', |
| 165 | 169 | 'uploads_use_yearmonth_folders', |
| 166 | 170 | 'users_can_register', |
| 167 | 171 | 'verification_services_codes', |
| 172 | + 'videopress_auto_subtitles_disabled', | |
| 173 | + 'videopress_player_preload_disabled', | |
| 174 | + 'videopress_playlist_index', | |
| 168 | 175 | 'videopress_private_enabled_for_site', |
| 176 | + 'videopress_share_menu_disabled', | |
| 169 | 177 | 'wordads_ccpa_enabled', |
| 170 | 178 | 'wordads_ccpa_privacy_policy_url', |
| 171 | 179 | 'wordads_cmp_enabled', |
| 172 | 180 | 'wordads_custom_adstxt', |
| @@ -183,8 +191,9 @@ | ||
| 183 | 191 | 'wp_mobile_featured_images', |
| 184 | 192 | 'wp_page_for_privacy_policy', |
| 185 | 193 | 'wpcom_ai_site_prompt', |
| 186 | 194 | 'wpcom_classic_early_release', |
| 195 | + 'wpcom_newsletter_send_default', | |
| 187 | 196 | 'wpcom_featured_image_in_email', |
| 188 | 197 | 'jetpack_gravatar_in_email', |
| 189 | 198 | 'jetpack_author_in_email', |
| 190 | 199 | 'jetpack_post_date_in_email', |
| @@ -202,9 +211,8 @@ | ||
| 202 | 211 | 'jetpack_subscriptions_reply_to', |
| 203 | 212 | 'jetpack_subscriptions_from_name', |
| 204 | 213 | 'jetpack_verbum_subscription_modal', |
| 205 | 214 | 'jetpack_blocks_disabled', |
| 206 | - 'jetpack_package_versions', | |
| 207 | 215 | 'jetpack_newsletters_publishing_default_frequency', |
| 208 | 216 | 'jetpack_scheduled_plugins_update', |
| 209 | 217 | 'jetpack_waf_automatic_rules', |
| 210 | 218 | 'jetpack_waf_ip_allow_list', |
| @@ -355,8 +363,12 @@ | ||
| 355 | 363 | 'wp_max_upload_size' => 'wp_max_upload_size', |
| 356 | 364 | 'wp_version' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'wp_version' ), |
| 357 | 365 | 'active_modules' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_active_modules' ), |
| 358 | 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' ), | |
| 359 | 371 | ); |
| 360 | 372 | |
| 361 | 373 | /** |
| 362 | 374 | * Array of post type attributes synced. |
| @@ -458,10 +470,16 @@ | ||
| 458 | 470 | 'wp_automatic', |
| 459 | 471 | 'wp_log', // WP Logging Plugin. |
| 460 | 472 | 'wpephpcompat_jobs', |
| 461 | 473 | 'wprss_feed_item', |
| 462 | - 'memberships_coupon', | |
| 463 | - 'memberships_gift', | |
| 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. | |
| 464 | 482 | ); |
| 465 | 483 | |
| 466 | 484 | /** |
| 467 | 485 | * Taxonomies that we're not syncing by default. |
| @@ -762,13 +780,17 @@ | ||
| 762 | 780 | '_wp_attachment_image_alt', |
| 763 | 781 | '_wp_attachment_is_custom_background', |
| 764 | 782 | '_wp_attachment_is_custom_header', |
| 765 | 783 | '_wp_attachment_metadata', |
| 784 | + '_wp_old_date', | |
| 766 | 785 | '_wp_page_template', |
| 767 | 786 | '_wp_trash_meta_comments_status', |
| 768 | 787 | '_wpas_feature_enabled', |
| 788 | + '_wpas_connection_overrides', | |
| 789 | + '_wpas_customize_per_network', | |
| 769 | 790 | '_wpas_mess', |
| 770 | 791 | '_wpas_options', |
| 792 | + '_jetpack_social_image_focal_point', // Publicize_Base::ATTACHMENT_IMAGE_FOCAL_POINT. | |
| 771 | 793 | 'advanced_seo_description', // Jetpack_SEO_Posts::DESCRIPTION_META_KEY. |
| 772 | 794 | 'content_width', |
| 773 | 795 | 'custom_css_add', |
| 774 | 796 | 'custom_css_preprocessor', |
| @@ -780,8 +802,9 @@ | ||
| 780 | 802 | 'switch_like_status', |
| 781 | 803 | 'videopress_guid', |
| 782 | 804 | 'vimeo_poster_image', |
| 783 | 805 | '_jetpack_blogging_prompt_key', |
| 806 | + 'footnotes', // Core footnotes block | |
| 784 | 807 | ); |
| 785 | 808 | |
| 786 | 809 | /** |
| 787 | 810 | * Get the post meta key whitelist. |
| @@ -811,8 +834,12 @@ | ||
| 811 | 834 | 'hc_avatar', |
| 812 | 835 | 'hc_foreign_user_id', |
| 813 | 836 | 'hc_post_as', |
| 814 | 837 | 'hc_wpcom_id_sig', |
| 838 | + 'jetpack_comment_identity_avatar', | |
| 839 | + 'jetpack_comment_identity_id', | |
| 840 | + 'jetpack_comment_identity_provider', | |
| 841 | + 'protocol', | |
| 815 | 842 | ); |
| 816 | 843 | |
| 817 | 844 | /** |
| 818 | 845 | * Get the comment meta whitelist. |
| @@ -833,8 +860,34 @@ | ||
| 833 | 860 | return apply_filters( 'jetpack_sync_comment_meta_whitelist', self::$comment_meta_whitelist ); |
| 834 | 861 | } |
| 835 | 862 | |
| 836 | 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 | + /** | |
| 837 | 890 | * Default theme support whitelist. |
| 838 | 891 | * |
| 839 | 892 | * @todo move this to server? - these are theme support values |
| 840 | 893 | * that should be synced as jetpack_current_theme_supports_foo option values |
| @@ -1177,8 +1230,15 @@ | ||
| 1177 | 1230 | */ |
| 1178 | 1231 | public static $default_comment_meta_whitelist = array(); |
| 1179 | 1232 | |
| 1180 | 1233 | /** |
| 1234 | + * Default for sync actions blacklist. | |
| 1235 | + * | |
| 1236 | + * @var array Empty array. | |
| 1237 | + */ | |
| 1238 | + public static $default_sync_actions_blacklist = array(); | |
| 1239 | + | |
| 1240 | + /** | |
| 1181 | 1241 | * Default for disabling sync across the site. |
| 1182 | 1242 | * |
| 1183 | 1243 | * @var int Bool-ish. Default to 0. |
| 1184 | 1244 | */ |
| @@ -1288,46 +1348,63 @@ | ||
| 1288 | 1348 | * |
| 1289 | 1349 | * @var array list of module names. |
| 1290 | 1350 | */ |
| 1291 | 1351 | public static $default_full_sync_config = array( |
| 1292 | - 'comments' => 1, | |
| 1293 | 1352 | 'constants' => 1, |
| 1294 | 1353 | 'functions' => 1, |
| 1295 | 1354 | 'options' => 1, |
| 1296 | - 'posts' => 1, | |
| 1297 | - 'term_relationships' => 1, | |
| 1298 | 1355 | 'terms' => 1, |
| 1299 | 1356 | 'themes' => 1, |
| 1357 | + 'users' => 1, | |
| 1358 | + 'posts' => 1, | |
| 1359 | + 'comments' => 1, | |
| 1300 | 1360 | 'updates' => 1, |
| 1301 | - 'users' => 1, | |
| 1361 | + 'term_relationships' => 1, | |
| 1302 | 1362 | ); |
| 1303 | 1363 | |
| 1304 | 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 | + /** | |
| 1305 | 1374 | * Default Full Sync max objects to send on a single request. |
| 1306 | 1375 | * |
| 1307 | 1376 | * @var array list of module => max. |
| 1308 | 1377 | */ |
| 1309 | 1378 | public static $default_full_sync_limits = array( |
| 1310 | - 'comments' => array( | |
| 1379 | + 'comments' => array( | |
| 1311 | 1380 | 'chunk_size' => 100, |
| 1312 | 1381 | 'max_chunks' => 10, |
| 1313 | 1382 | ), |
| 1314 | - 'posts' => array( | |
| 1315 | - 'chunk_size' => 100, | |
| 1383 | + 'posts' => array( | |
| 1384 | + 'chunk_size' => 500, | |
| 1316 | 1385 | 'max_chunks' => 1, |
| 1317 | 1386 | ), |
| 1318 | - 'term_relationships' => array( | |
| 1387 | + 'term_relationships' => array( | |
| 1319 | 1388 | 'chunk_size' => 1000, |
| 1320 | 1389 | 'max_chunks' => 10, |
| 1321 | 1390 | ), |
| 1322 | - 'terms' => array( | |
| 1391 | + 'terms' => array( | |
| 1323 | 1392 | 'chunk_size' => 1000, |
| 1324 | 1393 | 'max_chunks' => 10, |
| 1325 | 1394 | ), |
| 1326 | - 'users' => array( | |
| 1395 | + 'users' => array( | |
| 1327 | 1396 | 'chunk_size' => 100, |
| 1328 | 1397 | 'max_chunks' => 10, |
| 1329 | 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 | + ), | |
| 1330 | 1407 | ); |
| 1331 | 1408 | |
| 1332 | 1409 | /** |
| 1333 | 1410 | * Default for enabling dedicated Sync flow. |
| @@ -1345,8 +1422,17 @@ | ||
| 1345 | 1422 | |
| 1346 | 1423 | /** |
| 1347 | 1424 | * Default for enabling wpcom rest api for Sync. |
| 1348 | 1425 | * |
| 1349 | - * @var int Bool-ish. Default 0. | |
| 1426 | + * @var int Bool-ish. Default 1. | |
| 1350 | 1427 | */ |
| 1351 | - public static $default_wpcom_rest_api_enabled = 0; | |
| 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 | + ); | |
| 1352 | 1438 | } |