Completed
Push — add/jp-search-sync ( b7e8bf...cc3f34 )
by
unknown
932:06 queued 923:18
created

Search::init_before_send()   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 Method

Rating   Name   Duplication   Size   Complexity  
A Search::add_search_post_meta_whitelist() 0 3 1
1
<?php
2
/**
3
 * Configuration lists for Jetpack Search Fields
4
 *
5
 * Post Meta: list of post meta keys that are available in the index
6
 *   and how they are configured.
7
 *
8
 * Custom Taxonomy: list of custom taxonomies that are indexed.
9
 *
10
 * The reason we need an allowed list is that Elasticsearch runs into scaling problems
11
 * with more than 200k-ish total fields. The barrier to adding new fields is low,
12
 * just open a PR.
13
 *
14
 * Although the comments indicate specific plugins, you don't need to be running
15
 * that plugin for the indexing to work. The metakey just has to match.
16
 *
17
 * If you need a new meta key or taxonomy also consider using:
18
 *   jetpack-search-meta0 - jetpack-search-meta9
19
 *   jetpack-search-tag0 - jetpack-search-tag9
20
 *
21
 * @package automattic/jetpack-sync
22
 */
23
24
namespace Automattic\Jetpack\Sync\Modules;
25
26
/**
27
 * Class to handle sync for Jetpack Search.
28
 */
29
class Search extends Module {
30
31
	/**
32
	 * Sync module name.
33
	 *
34
	 * @access public
35
	 *
36
	 * @return string
37
	 */
38
	public function name() {
39
		return 'search';
40
	}
41
42
	/**
43
	 * Constructor.
44
	 */
45
	public function __construct() {
46
		// Post meta whitelists.
47
		add_filter( 'jetpack_sync_post_meta_whitelist', array( $this, 'add_search_post_meta_whitelist' ), 10 );
48
49
	}
50
51
	//
52
	// All the lists.
53
54
	/**
55
	 * Post meta search specification.
56
	 *
57
	 * We sync and index all meta keys in this list. Additionally there are a few
58
	 * options.
59
	 *
60
	 * 'metakey' => [ 'searchable_in_all_content' => true ],
61
	 *    Field will be included in the all_content fields
62
	 *
63
	 * 'metakey' => [ 'available' => false, 'alternatives' => [ 'metakey_processed' ] ],
64
	 *   Field not in meta.* but has data in an alternative field(s) name that
65
	 *   should work similarly. For instance, woocommerce total_sales does not go into
66
	 *   the index, but the percentage of sales does.
67
	 *
68
	 * @static
69
	 * @access private
70
	 * @var array
71
	 */
72
	private static $postmeta_to_sync = array(
73
		// jetpack.
74
		'jetpack-search-meta0'               => array( 'searchable_in_all_content' => true ),
75
		'jetpack-search-meta1'               => array( 'searchable_in_all_content' => true ),
76
		'jetpack-search-meta2'               => array( 'searchable_in_all_content' => true ),
77
		'jetpack-search-meta3'               => array( 'searchable_in_all_content' => true ),
78
		'jetpack-search-meta4'               => array( 'searchable_in_all_content' => true ),
79
		'jetpack-search-meta5'               => array( 'searchable_in_all_content' => true ),
80
		'jetpack-search-meta6'               => array( 'searchable_in_all_content' => true ),
81
		'jetpack-search-meta7'               => array( 'searchable_in_all_content' => true ),
82
		'jetpack-search-meta8'               => array( 'searchable_in_all_content' => true ),
83
		'jetpack-search-meta9'               => array( 'searchable_in_all_content' => true ),
84
85
		// woocommerce.
86
		'entity_types'                       => array(),
87
		'exclude_product_categories'         => array(),
88
		'exclude_product_ids'                => array(),
89
		'free_shipping'                      => array(),
90
		'id_field'                           => array(),
91
		'individual_use'                     => array(),
92
		'limit_usage_to_x_items'             => array(),
93
		'maximum_amount'                     => array(),
94
		'minimum_amount'                     => array(),
95
		'post_id'                            => array(),
96
		'product_categories'                 => array( 'searchable_in_all_content' => true ),
97
		'product_ids'                        => array(),
98
		'total_sales'                        => array(
99
			'available'    => false,
100
			'alternatives' => array(
101
				'wc.percent_of_sales',
102
			),
103
		),
104
		'usage_limit'                        => array(),
105
		'usage_limit_per_user'               => array(),
106
		'_crosssell_ids'                     => array(),
107
		'_downloadable'                      => array(),
108
		'_featured'                          => array(),
109
		'_height'                            => array(),
110
		'_length'                            => array(),
111
		'_price'                             => array(
112
			'alternatives' => array(
113
				'wc.price',
114
				'wc.min_price',
115
				'wc.max_price',
116
			),
117
		),
118
		'_prices_include_tax'                => array(),
119
		'_product_attributes'                => array(),
120
		'_product_version'                   => array(),
121
		'_regular_price'                     => array(
122
			'alternatives' => array(
123
				'wc.regular_price',
124
			),
125
		),
126
		'_sale_price'                        => array(
127
			'alternatives' => array(
128
				'wc.sale_price',
129
			),
130
		),
131
		'_sale_price_dates_from'             => array(),
132
		'_sale_price_dates_to'               => array(),
133
		'_sku'                               => array( 'searchable_in_all_content' => true ),
134
		'_stock_status'                      => array(),
135
		'_wc_average_rating'                 => array(
136
			'alternatives' => array(
137
				'wc.ave_rating_score',
138
			),
139
		),
140
		'_wc_rating_count'                   => array(
141
			'alternatives' => array(
142
				'wc.rating', // wc.rating.count_1, wc.rating.count_2, ...
143
			),
144
		),
145
		'_wc_review_count'                   => array(),
146
		'_weight'                            => array(),
147
		'_width'                             => array(),
148
149
		// co-authors plus.
150
		'cap-description'                    => array( 'searchable_in_all_content' => true ),
151
		'cap-user_login'                     => array( 'searchable_in_all_content' => true ),
152
		'cap-user_email'                     => array(),
153
		'cap-last_name'                      => array( 'searchable_in_all_content' => true ),
154
		'cap-first_name'                     => array( 'searchable_in_all_content' => true ),
155
		'cap-display_name'                   => array( 'searchable_in_all_content' => true ),
156
		'cap-website'                        => array(),
157
		'cap-jabber'                         => array(),
158
		'cap-aim'                            => array(),
159
		'cap-twitter'                        => array(),
160
		'cap-facebook'                       => array(),
161
		'cap-google_plus'                    => array(),
162
		'cap-job_title'                      => array( 'searchable_in_all_content' => true ),
163
164
		// bbpress.
165
		'bbpl_like'                          => array(),
166
		'bbpress_discussion_comments_copied' => array(),
167
		'bbpress_discussion_tags_copied'     => array(),
168
		'bbpress_discussion_topic_id'        => array(),
169
		'bbpress_discussion_use_defaults'    => array(),
170
		'bbpress_page_header_bg'             => array(),
171
		'bbpress_title_bg'                   => array(),
172
		'use_bbpress_discussion_topic'       => array(),
173
174
		// wpml.
175
		'tm_meta_wpml'                       => array(),
176
		'wpml_language'                      => array(),
177
		'wpml_media_lang'                    => array(),
178
		'wpml_media_processed'               => array(),
179
180
		// blogger import.
181
		'blogger_author'                     => array( 'searchable_in_all_content' => true ),
182
		'blogger_blog'                       => array( 'searchable_in_all_content' => true ),
183
		'blogger_permalink'                  => array( 'searchable_in_all_content' => true ),
184
185
		// geo.
186
		'geo_address'                        => array( 'searchable_in_all_content' => true ),
187
		'geo_latitude'                       => array(),
188
		'geo_longitude'                      => array(),
189
		'geo_public'                         => array(),
190
		'geolocated'                         => array(),
191
		'geolocation_city'                   => array( 'searchable_in_all_content' => true ),
192
		'geolocation_country_long'           => array( 'searchable_in_all_content' => true ),
193
		'geolocation_country_short'          => array( 'searchable_in_all_content' => true ),
194
		'geolocation_formatted_address'      => array( 'searchable_in_all_content' => true ),
195
		'geolocation_lat'                    => array(),
196
		'geolocation_long'                   => array(),
197
		'geolocation_postcode'               => array( 'searchable_in_all_content' => true ),
198
		'geolocation_state_long'             => array( 'searchable_in_all_content' => true ),
199
		'geolocation_state_short'            => array( 'searchable_in_all_content' => true ),
200
201
		// wp-ultimate-recipe.
202
		'recipe_alternate_image'             => array(),
203
		'recipe_cook_time'                   => array(),
204
		'recipe_cook_time_text'              => array(),
205
		'recipe_description'                 => array( 'searchable_in_all_content' => true ),
206
		'recipe_ingredients'                 => array( 'searchable_in_all_content' => true ),
207
		'recipe_instructions'                => array( 'searchable_in_all_content' => true ),
208
		'recipe_notes'                       => array( 'searchable_in_all_content' => true ),
209
		'recipe_nutritional'                 => array( 'searchable_in_all_content' => true ),
210
		'recipe_passive_time'                => array(),
211
		'recipe_passive_time_text'           => array(),
212
		'recipe_prep_time'                   => array(),
213
		'recipe_prep_time_text'              => array(),
214
		'recipe_rating'                      => array(),
215
		'recipe_servings'                    => array(),
216
		'recipe_servings_normalized'         => array(),
217
		'recipe_servings_type'               => array(),
218
		'recipe_terms'                       => array( 'searchable_in_all_content' => true ),
219
		'recipe_terms_with_parents'          => array(),
220
		'recipe_title'                       => array( 'searchable_in_all_content' => true ),
221
		'recipe_user_ratings'                => array(),
222
		'recipe_user_ratings_rating'         => array(),
223
224
		// generic fields.
225
		// from advanced-custom-fields and metabox.io .
226
		'Link'                               => array(),
227
		'Location'                           => array(),
228
		'Title'                              => array( 'searchable_in_all_content' => true ),
229
		'ad_code'                            => array(),
230
		'address'                            => array(),
231
		'admin_mail'                         => array(),
232
		'admin_only'                         => array(),
233
		'advertisers'                        => array( 'searchable_in_all_content' => true ),
234
		'age'                                => array(),
235
		'aliases'                            => array(),
236
		'alternate_title'                    => array(),
237
		'amazon'                             => array(),
238
		'answer'                             => array( 'searchable_in_all_content' => true ),
239
		'area'                               => array(),
240
		'attention'                          => array(),
241
		'attr'                               => array(),
242
		'author'                             => array( 'searchable_in_all_content' => true ),
243
		'author_name'                        => array( 'searchable_in_all_content' => true ),
244
		'blog'                               => array(),
245
		'blog_id'                            => array(),
246
		'call_to_action'                     => array(),
247
		'campaign_preview'                   => array(),
248
		'canonical_url'                      => array(),
249
		'catch_text'                         => array(),
250
		'category'                           => array( 'searchable_in_all_content' => true ),
251
		'classificacao'                      => array(),
252
		'classification'                     => array(),
253
		'code'                               => array(),
254
		'codigo'                             => array(),
255
		'company'                            => array( 'searchable_in_all_content' => true ),
256
		'company_website'                    => array(),
257
		'config'                             => array(),
258
		'construction'                       => array(),
259
		'container_ids'                      => array(),
260
		'content'                            => array( 'searchable_in_all_content' => true ),
261
		'content_body-full_content'          => array( 'searchable_in_all_content' => true ),
262
		'copyright'                          => array(),
263
		'custom_page_title'                  => array( 'searchable_in_all_content' => true ),
264
		'custom_permalink'                   => array(),
265
		'customize'                          => array(),
266
		'data'                               => array(),
267
		'date'                               => array(),
268
		'day'                                => array(),
269
		'descripcion'                        => array( 'searchable_in_all_content' => true ),
270
		'description'                        => array( 'searchable_in_all_content' => true ),
271
		'display_settings'                   => array(),
272
		'display_type'                       => array(),
273
		'duration'                           => array(),
274
		'embed'                              => array(),
275
		'entity_ids'                         => array(),
276
		'entity_types'                       => array(),
277
		'event_subtitle'                     => array( 'searchable_in_all_content' => true ),
278
		'excluded_container_ids'             => array(),
279
		'exclusions'                         => array(),
280
		'experience'                         => array(),
281
		'external_url'                       => array(),
282
		'featured'                           => array(),
283
		'featured_image'                     => array(),
284
		'featured_post'                      => array(),
285
		'featured_story'                     => array(),
286
		'fee'                                => array(),
287
		'filter'                             => array(),
288
		'follow'                             => array(),
289
		'footer_text'                        => array(),
290
		'from_header'                        => array(),
291
		'fullscreen_view'                    => array(),
292
		'gallery'                            => array(),
293
		'genre'                              => array( 'searchable_in_all_content' => true ),
294
		'guests'                             => array( 'searchable_in_all_content' => true ),
295
		'has_variations'                     => array(),
296
		'hashtag'                            => array(),
297
		'header_image'                       => array(),
298
		'hidden_from_ui'                     => array(),
299
		'hide_on_screen'                     => array(),
300
		'homepage_order'                     => array(),
301
		'hours'                              => array(),
302
		'i18n'                               => array(),
303
		'id'                                 => array(),
304
		'image'                              => array(),
305
		'image_size'                         => array(),
306
		'image_source'                       => array(),
307
		'index'                              => array(),
308
		'intro_text'                         => array( 'searchable_in_all_content' => true ),
309
		'job_mention'                        => array( 'searchable_in_all_content' => true ),
310
		'keywords'                           => array( 'searchable_in_all_content' => true ),
311
		'latest_news'                        => array(),
312
		'layout'                             => array(),
313
		'link'                               => array(),
314
		'link_dump'                          => array( 'searchable_in_all_content' => true ),
315
		'link_url'                           => array(),
316
		'location'                           => array(),
317
		'logo'                               => array(),
318
		'main_title'                         => array( 'searchable_in_all_content' => true ),
319
		'maximum_entity_count'               => array(),
320
		'media'                              => array(),
321
		'mentions'                           => array(),
322
		'messages'                           => array(),
323
		'meta_description'                   => array( 'searchable_in_all_content' => true ),
324
		'meta_id'                            => array(),
325
		'meta_index'                         => array(),
326
		'meta_key'                           => array(),
327
		'meta_value'                         => array(),
328
		'modal-dialog-id'                    => array(),
329
		'name'                               => array( 'searchable_in_all_content' => true ),
330
		'nombre'                             => array( 'searchable_in_all_content' => true ),
331
		'notes'                              => array( 'searchable_in_all_content' => true ),
332
		'options'                            => array(),
333
		'order_by'                           => array(),
334
		'order_direction'                    => array(),
335
		'original_cats'                      => array(),
336
		'original_headers'                   => array(),
337
		'original_link'                      => array(),
338
		'original_message'                   => array(),
339
		'original_subject'                   => array(),
340
		'original_title'                     => array(),
341
		'original_to'                        => array(),
342
		'other_setting'                      => array(),
343
		'page_canonical'                     => array(),
344
		'page_layout'                        => array(),
345
		'page_sidebar'                       => array(),
346
		'page_tags'                          => array(),
347
		'panels_data'                        => array(),
348
		'parking'                            => array(),
349
		'pdf_upload'                         => array(),
350
		'photo'                              => array(),
351
		'play_time'                          => array(),
352
		'position'                           => array(),
353
		'post-rating'                        => array(),
354
		'post_background'                    => array(),
355
		'post_color'                         => array(),
356
		'post_sidebar'                       => array(),
357
		'post_subtitle'                      => array( 'searchable_in_all_content' => true ),
358
		'price'                              => array(),
359
		'publication'                        => array(),
360
		'rating'                             => array(),
361
		'ratings_average'                    => array(),
362
		'ratings_score'                      => array(),
363
		'ratings_users'                      => array(),
364
		'relation'                           => array(),
365
		'reply_to_header'                    => array(),
366
		'required'                           => array(),
367
		'returns'                            => array(),
368
		'review_post'                        => array(),
369
		'rule'                               => array(),
370
		'section'                            => array( 'searchable_in_all_content' => true ),
371
		'session_transcript'                 => array(),
372
		'settings'                           => array(),
373
		'sex'                                => array(),
374
		'shares_count'                       => array(),
375
		'show_description'                   => array( 'searchable_in_all_content' => true ),
376
		'show_page_title'                    => array(),
377
		'side'                               => array(),
378
		'sidebar'                            => array(),
379
		'site'                               => array(),
380
		'situation'                          => array(),
381
		'slide_template'                     => array(),
382
		'slug'                               => array(),
383
		'sortorder'                          => array(),
384
		'source'                             => array(),
385
		'start_date'                         => array(),
386
		'status'                             => array(),
387
		'styles'                             => array(),
388
		'subtitle'                           => array( 'searchable_in_all_content' => true ),
389
		'subtitulo'                          => array(),
390
		'success'                            => array(),
391
		'summary'                            => array( 'searchable_in_all_content' => true ),
392
		'synopsis'                           => array( 'searchable_in_all_content' => true ),
393
		'tel'                                => array(),
394
		'tema'                               => array(),
395
		'testimonial'                        => array(),
396
		'testimonial_author'                 => array(),
397
		'text_already_subscribed'            => array(),
398
		'text_error'                         => array(),
399
		'text_invalid_email'                 => array(),
400
		'text_not_subscribed'                => array(),
401
		'text_required_field_missing'        => array(),
402
		'text_subscribed'                    => array(),
403
		'text_unsubscribed'                  => array(),
404
		'thumbnail'                          => array(),
405
		'time'                               => array(),
406
		'time_jump_list'                     => array( 'searchable_in_all_content' => true ),
407
		'title'                              => array( 'searchable_in_all_content' => true ),
408
		'title_view'                         => array(),
409
		'titre'                              => array( 'searchable_in_all_content' => true ),
410
		'titulo'                             => array( 'searchable_in_all_content' => true ),
411
		'to_header'                          => array(),
412
		'toc'                                => array(),
413
		'transcript'                         => array( 'searchable_in_all_content' => true ),
414
		'transport_uri'                      => array(),
415
		'type'                               => array(),
416
		'url'                                => array(),
417
		'validation'                         => array(),
418
		'value'                              => array(),
419
		'values'                             => array(),
420
		'variation'                          => array(),
421
		'video'                              => array(),
422
		'video_type'                         => array(),
423
		'video_url'                          => array(),
424
		'videopress_guid'                    => array(),
425
		'website'                            => array(),
426
		'weight'                             => array(),
427
		'year'                               => array(),
428
429
	); // end indexed post meta.
430
431
	/**
432
	 * Postmeta being considered for indexing
433
	 *   but currently not in the index
434
	 *   this list is really only for documentation.
435
	 *
436
	 * @static
437
	 * @access private
438
	 * @var array
439
	 */
440
	private static $unindexed_postmeta = array(
441
442
		// Core.
443
		'_wp_attached_file'                          => array(),
444
		'_wp_attachment_context'                     => array(),
445
		'_wp_attachment_image_alt'                   => array(),
446
		'_wp_attachment_is_custom_header'            => array(),
447
		'_wp_attachment_metadata'                    => array(),
448
		'_wp_desired_post_slug'                      => array(),
449
		'_wp_old_date'                               => array(),
450
		'_wp_old_slug'                               => array(),
451
		'_wp_page_template'                          => array(),
452
453
		// WooCommerce products.
454
		// See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-product-data-store-cpt.php#L21 .
455
		'_backorders'                                => array(),
456
		'_default_attributes'                        => array(),
457
		'_download_expiry'                           => array(),
458
		'_download_limit'                            => array(),
459
		'_download_permissions_granted'              => array(),
460
		'_downloadable_files'                        => array(),
461
		'_file_paths'                                => array(),
462
		'_manage_stock'                              => array(),
463
		'_product_image_gallery'                     => array(),
464
		'_purchase_note'                             => array(),
465
		'_recorded_coupon_usage_counts'              => array(),
466
		'_recorded_sales'                            => array(),
467
		'_sold_individually'                         => array(),
468
		'_stock'                                     => array(),
469
		'_tax_class'                                 => array(),
470
		'_tax_status'                                => array(),
471
		'_thumbnail_id'                              => array(),
472
		'_upsell_ids'                                => array(),
473
		'_variation_description'                     => array(),
474
		'_virtual'                                   => array(),
475
		'_visibility'                                => array(),
476
		'coupon_amount'                              => array(),
477
		'default_source'                             => array(),
478
		'discount_type'                              => array(),
479
		'exclude_sale_items'                         => array(),
480
		'expiry_date'                                => array(),
481
482
		// Woocommerce orders and refunds.
483
		// See https://github.com/woocommerce/woocommerce/blob/8ed6e7436ff87c2153ed30edd83c1ab8abbdd3e9/includes/data-stores/class-wc-order-data-store-cpt.php#L27 .
484
		// See https://github.com/woocommerce/woocommerce/blob/b8a2815ae546c836467008739e7ff5150cb08e93/includes/data-stores/class-wc-order-refund-data-store-cpt.php#L20 .
485
		'_billing_address_1'                         => array(),
486
		'_billing_address_2'                         => array(),
487
		'_billing_address_index'                     => array(),
488
		'_billing_city'                              => array(),
489
		'_billing_company'                           => array(),
490
		'_billing_country'                           => array(),
491
		'_billing_email'                             => array(),
492
		'_billing_first_name'                        => array(),
493
		'_billing_last_name'                         => array(),
494
		'_billing_phone'                             => array(),
495
		'_billing_postcode'                          => array(),
496
		'_billing_state'                             => array(),
497
		'_cart_discount'                             => array(),
498
		'_cart_discount_tax'                         => array(),
499
		'_completed_date'                            => array(),
500
		'_created_via'                               => array(),
501
		'_customer_ip_address'                       => array(),
502
		'_customer_user_agent'                       => array(),
503
		'_date_completed'                            => array(),
504
		'_date_paid'                                 => array(),
505
		'_order_currency'                            => array(),
506
		'_order_key'                                 => array(),
507
		'_order_shipping'                            => array(),
508
		'_order_shipping_tax'                        => array(),
509
		'_order_stock_reduced'                       => array(),
510
		'_order_tax'                                 => array(),
511
		'_order_total'                               => array(),
512
		'_order_version'                             => array(),
513
		'_paid_date'                                 => array(),
514
		'_payment_method'                            => array(),
515
		'_payment_method_title'                      => array(),
516
		'_payment_tokens'                            => array(),
517
		'_recorded_coupon_usage_counts'              => array(),
518
		'_refund_amount'                             => array(),
519
		'_refund_reason'                             => array(),
520
		'_refunded_by'                               => array(),
521
		'_shipping_address_1'                        => array(),
522
		'_shipping_address_2'                        => array(),
523
		'_shipping_address_index'                    => array(),
524
		'_shipping_city'                             => array(),
525
		'_shipping_company'                          => array(),
526
		'_shipping_country'                          => array(),
527
		'_shipping_first_name'                       => array(),
528
		'_shipping_last_name'                        => array(),
529
		'_shipping_postcode'                         => array(),
530
		'_shipping_state'                            => array(),
531
		'_transaction_id'                            => array(),
532
533
		// aioseop.
534
		'_aioseop_description'                       => array(),
535
		'_aioseop_keywords'                          => array(),
536
		'_aioseop_title'                             => array(),
537
538
		// yoast.
539
		'_yoast_wpseo_authorship'                    => array(),
540
		'_yoast_wpseo_bctitle'                       => array(),
541
		'_yoast_wpseo_canonical'                     => array(),
542
		'_yoast_wpseo_content_score'                 => array(),
543
		'_yoast_wpseo_focuskw'                       => array(),
544
		'_yoast_wpseo_focuskw_text_input'            => array(),
545
		'_yoast_wpseo_google-plus-description'       => array(),
546
		'_yoast_wpseo_google-plus-image'             => array(),
547
		'_yoast_wpseo_linkdex'                       => array(),
548
		'_yoast_wpseo_meta-robots-adv'               => array(),
549
		'_yoast_wpseo_meta-robots-nofollow'          => array(),
550
		'_yoast_wpseo_meta-robots-noindex'           => array(),
551
		'_yoast_wpseo_metadesc'                      => array(),
552
		'_yoast_wpseo_metakeywords'                  => array(),
553
		'_yoast_wpseo_opengraph-description'         => array(),
554
		'_yoast_wpseo_opengraph-image'               => array(),
555
		'_yoast_wpseo_opengraph-title'               => array(),
556
		'_yoast_wpseo_primary_byline'                => array(),
557
		'_yoast_wpseo_primary_category'              => array(),
558
		'_yoast_wpseo_primary_product_cat'           => array(),
559
		'_yoast_wpseo_primary_sponsor-type'          => array(),
560
		'_yoast_wpseo_primary_tema_category'         => array(),
561
		'_yoast_wpseo_primary_wpdmcategory'          => array(),
562
		'_yoast_wpseo_primary_wt_portfolio_category' => array(),
563
		'_yoast_wpseo_redirect'                      => array(),
564
		'_yoast_wpseo_sitemap-include'               => array(),
565
		'_yoast_wpseo_sitemap-prio'                  => array(),
566
		'_yoast_wpseo_title'                         => array(),
567
		'_yoast_wpseo_twitter-description'           => array(),
568
		'_yoast_wpseo_twitter-image'                 => array(),
569
570
		// bbpress.
571
		'bbppu_read_by'                              => array(),
572
		'_bbp_activity_id'                           => array(),
573
		'_bbp_attachment'                            => array(),
574
		'_bbp_attachment_upload_error'               => array(),
575
		'_bbp_forum_id'                              => array(),
576
		'_bbp_forum_parent_id'                       => array(),
577
		'_bbp_forum_subforum_count'                  => array(),
578
		'_bbp_forum_type'                            => array(),
579
		'_bbp_group_ids'                             => array(),
580
		'_bbp_last_active_id'                        => array(),
581
		'_bbp_last_active_time'                      => array(),
582
		'_bbp_last_reply_id'                         => array(),
583
		'_bbp_last_topic_id'                         => array(),
584
		'_bbp_old_forum_id'                          => array(),
585
		'_bbp_old_sticky_status'                     => array(),
586
		'_bbp_old_topic_id'                          => array(),
587
		'_bbp_post_id'                               => array(),
588
		'_bbp_reply_count'                           => array(),
589
		'_bbp_reply_is_private'                      => array(),
590
		'_bbp_reply_to'                              => array(),
591
		'_bbp_revision_log'                          => array(),
592
		'_bbp_status'                                => array(),
593
		'_bbp_sticky_topics'                         => array(),
594
		'_bbp_topic_count'                           => array(),
595
		'_bbp_topic_id'                              => array(),
596
		'_bbp_total_reply_count'                     => array(),
597
		'_bbp_total_topic_count'                     => array(),
598
		'_bbp_voice_count'                           => array(),
599
600
		// ???
601
		'_locale'                                    => array(),
602
603
		// wp-job-manager.
604
		'_job_title'                                 => array(),
605
		'_job_description'                           => array(),
606
607
		// wpml.
608
		'_wpml_media_duplicate'                      => array(),
609
		'_wpml_media_featured'                       => array(),
610
611
		// generic fields.
612
		'ad_clicks_count'                            => array(),
613
		'email'                                      => array(),
614
		'usage_count'                                => array(),
615
		'user_mail'                                  => array(),
616
		'views'                                      => array(),
617
		'_EventAllDay'                               => array(),
618
		'_EventCost'                                 => array(),
619
		'_EventCurrencyPosition'                     => array(),
620
		'_EventCurrencySymbol'                       => array(),
621
		'_EventDuration'                             => array(),
622
		'_EventEndDate'                              => array(),
623
		'_EventEndDateUTC'                           => array(),
624
		'_EventOrganizerID'                          => array(),
625
		'_EventOrigin'                               => array(),
626
		'_EventShowMap'                              => array(),
627
		'_EventShowMapLink'                          => array(),
628
		'_EventStartDate'                            => array(),
629
		'_EventStartDateUTC'                         => array(),
630
		'_EventTimezone'                             => array(),
631
		'_EventTimezoneAbbr'                         => array(),
632
		'_EventURL'                                  => array(),
633
		'_EventVenueID'                              => array(),
634
		'_OrganizerEmail'                            => array(),
635
		'_OrganizerOrganizer'                        => array(),
636
		'_OrganizerOrigin'                           => array(),
637
		'_OrganizerPhone'                            => array(),
638
		'_OrganizerWebsite'                          => array(),
639
		'_VenueAddress'                              => array(),
640
		'_VenueCity'                                 => array(),
641
		'_VenueCountry'                              => array(),
642
		'_VenueOrigin'                               => array(),
643
		'_VenuePhone'                                => array(),
644
		'_VenueProvince'                             => array(),
645
		'_VenueShowMap'                              => array(),
646
		'_VenueShowMapLink'                          => array(),
647
		'_VenueState'                                => array(),
648
		'_VenueStateProvince'                        => array(),
649
		'_VenueURL'                                  => array(),
650
		'_VenueVenue'                                => array(),
651
		'_VenueVenueID'                              => array(),
652
		'_VenueZip'                                  => array(),
653
		'_default_attributes'                        => array(),
654
		'_description'                               => array(),
655
		'_edit_last'                                 => array(),
656
		'_feedback_all_fields'                       => array(),
657
		'_feedback_author'                           => array(),
658
		'_feedback_author_email'                     => array(),
659
		'_feedback_author_url'                       => array(),
660
		'_feedback_contact_form_url'                 => array(),
661
		'_feedback_ip'                               => array(),
662
		'_feedback_subject'                          => array(),
663
		'_file_paths'                                => array(),
664
		'_layout'                                    => array(),
665
		'_links_to'                                  => array(),
666
		'_links_to_target'                           => array(),
667
		'_mail'                                      => array(),
668
		'_mail_2'                                    => array(),
669
		'_messages'                                  => array(),
670
		'_numero'                                    => array(),
671
		'_post_restored_from'                        => array(),
672
		'_video_url'                                 => array(),
673
		'_website'                                   => array(),
674
675
	); // end unindexed post meta.
676
677
	/**
678
	 * List of indexed taxonomy slugs - VARCHAR(32)
679
	 *
680
	 * @access private
681
	 * @static
682
	 *
683
	 * @var array
684
	 */
685
	private static $taxonomies_to_sync = array(
686
687
		// Core.
688
		'link_category',
689
		'nav_menu',
690
		'post_format', // Special, limited to certain values.
691
692
		// bbpress.
693
		'topic',
694
		'topic-tag',
695
		'topics',
696
697
		// buddypress.
698
		'bp-email-type',
699
		'bp-email-type',
700
		'bp_docs_access',
701
		'bp_docs_associated_item',
702
		'bp_docs_comment_access',
703
		'bp_docs_doc_in_folder',
704
		'bp_docs_folder_in_group',
705
		'bp_docs_tag',
706
		'bp_member_type',
707
708
		// co-authors plus.
709
		'author',
710
711
		// events calendar plus.
712
		// the events calendar.
713
		'event-categories',
714
		'event-category',
715
		'event-tag',
716
		'event-tags',
717
		'event-type',
718
		'event-venue',
719
		'event_category',
720
		'event_location',
721
		'event_organizer',
722
		'event_tag',
723
		'event_type',
724
		'event_type_2',
725
		'event_users',
726
		'events_categories',
727
		'events_category',
728
		'events_feeds',
729
		'events_tags',
730
		'tribe_events_cat',
731
732
		// jetpack.
733
		'jetpack-portfolio-tag',
734
		'jetpack-portfolio-type',
735
		'jetpack-search-tag0',
736
		'jetpack-search-tag1',
737
		'jetpack-search-tag2',
738
		'jetpack-search-tag3',
739
		'jetpack-search-tag4',
740
		'jetpack-search-tag5',
741
		'jetpack-search-tag6',
742
		'jetpack-search-tag7',
743
		'jetpack-search-tag8',
744
		'jetpack-search-tag9',
745
746
		// nextgen gallery.
747
		'ngg_tag',
748
749
		// polylang.
750
		// wpml.
751
		'language',
752
		'post_translations',
753
		'term_language',
754
		'term_translations',
755
		'translation_priority',
756
757
		// woocommerce.
758
		'pa_accessory-type',
759
		'pa_actor',
760
		'pa_age',
761
		'pa_ambulance',
762
		'pa_amount',
763
		'pa_arm-roll',
764
		'pa_aspectratio',
765
		'pa_audiencerating',
766
		'pa_author',
767
		'pa_axle',
768
		'pa_battery',
769
		'pa_belakang',
770
		'pa_binding',
771
		'pa_body-type',
772
		'pa_bore-x-stroke-mm',
773
		'pa_box-cargo',
774
		'pa_brakes',
775
		'pa_brand',
776
		'pa_brands',
777
		'pa_bus',
778
		'pa_c',
779
		'pa_cabin-to-end',
780
		'pa_capacity',
781
		'pa_catalognumberlist',
782
		'pa_ce-keurmerk',
783
		'pa_chassis-front',
784
		'pa_chassis-rear',
785
		'pa_chassis-weight-kg',
786
		'pa_chip-log',
787
		'pa_clothing-size',
788
		'pa_clutch',
789
		'pa_clutch-type',
790
		'pa_collection',
791
		'pa_color',
792
		'pa_colors',
793
		'pa_colour',
794
		'pa_compactor',
795
		'pa_condition',
796
		'pa_cor',
797
		'pa_couleur',
798
		'pa_country',
799
		'pa_countryregion-of-manufacture',
800
		'pa_crane',
801
		'pa_creator',
802
		'pa_culoare',
803
		'pa_customerpackagetype',
804
		'pa_depan',
805
		'pa_depan-belakang',
806
		'pa_department',
807
		'pa_design',
808
		'pa_diameter',
809
		'pa_diameter-cakram',
810
		'pa_dimension-mm',
811
		'pa_dimensions',
812
		'pa_director',
813
		'pa_disc-diameter',
814
		'pa_drive-system',
815
		'pa_dump',
816
		'pa_ean',
817
		'pa_eanlist',
818
		'pa_edition',
819
		'pa_electric-battery',
820
		'pa_engine-model',
821
		'pa_engine-size',
822
		'pa_ethnicity',
823
		'pa_exhaust-brake',
824
		'pa_fabric',
825
		'pa_farbe',
826
		'pa_farg',
827
		'pa_farge',
828
		'pa_features',
829
		'pa_final-gear-ratio',
830
		'pa_finish',
831
		'pa_fire-fighting',
832
		'pa_fits',
833
		'pa_flat-bed',
834
		'pa_flavour',
835
		'pa_format',
836
		'pa_fragrance',
837
		'pa_frame',
838
		'pa_front',
839
		'pa_front-overhang',
840
		'pa_front-rear',
841
		'pa_front-tread',
842
		'pa_fuel-tank',
843
		'pa_fuel-type',
844
		'pa_garantie',
845
		'pa_geadviseerd-accu-type',
846
		'pa_gear-ratio',
847
		'pa_gender',
848
		'pa_genre',
849
		'pa_gewicht-exclusief-accu',
850
		'pa_gift-card-amount',
851
		'pa_grade-ability-tan-o',
852
		'pa_groesse',
853
		'pa_gtin',
854
		'pa_gvwr-gcwr',
855
		'pa_hardwareplatform',
856
		'pa_hazardousmaterialtype',
857
		'pa_height',
858
		'pa_hekmotor-of-boegmotor',
859
		'pa_helmet-size',
860
		'pa_hersteller',
861
		'pa_high-blow-tank',
862
		'pa_hoehe',
863
		'pa_inhoud',
864
		'pa_isadultproduct',
865
		'pa_isbn',
866
		'pa_iseligiblefortradein',
867
		'pa_itemdimensions',
868
		'pa_itempartnumber',
869
		'pa_kemudi-tipe',
870
		'pa_kleur',
871
		'pa_kopling-tipe',
872
		'pa_label',
873
		'pa_languages',
874
		'pa_lbs',
875
		'pa_legaldisclaimer',
876
		'pa_lengte-aansluitkabel',
877
		'pa_length',
878
		'pa_liquid-tank',
879
		'pa_location',
880
		'pa_losse-motor-complete-set',
881
		'pa_maat',
882
		'pa_main-brake',
883
		'pa_make',
884
		'pa_manufacturer',
885
		'pa_manufacturer-part-number',
886
		'pa_manufacturermaximumage',
887
		'pa_manufacturerminimumage',
888
		'pa_manufacturerpartswarrantydesc',
889
		'pa_masseinheit',
890
		'pa_material',
891
		'pa_mau-sac',
892
		'pa_maximum-power-ps-rpm',
893
		'pa_maximum-speed',
894
		'pa_maximum-torque-kgm-rpm',
895
		'pa_mediatype',
896
		'pa_megethos',
897
		'pa_merk',
898
		'pa_metal-type',
899
		'pa_min-turning-circle',
900
		'pa_mixer',
901
		'pa_model',
902
		'pa_model-tipe',
903
		'pa_model-type',
904
		'pa_modelo',
905
		'pa_mount',
906
		'pa_mpn',
907
		'pa_nicotine-strength',
908
		'pa_nos-of-cylinder',
909
		'pa_nos-of-tire',
910
		'pa_numberofdiscs',
911
		'pa_numberofitems',
912
		'pa_numberofpages',
913
		'pa_offset',
914
		'pa_open-cargo',
915
		'pa_operatingsystem',
916
		'pa_options',
917
		'pa_other-part-number',
918
		'pa_overall-height',
919
		'pa_overall-length',
920
		'pa_overall-width',
921
		'pa_overview',
922
		'pa_packagedimensions',
923
		'pa_packagequantity',
924
		'pa_pages',
925
		'pa_parking-brake',
926
		'pa_part-number',
927
		'pa_partnumber',
928
		'pa_pattern',
929
		'pa_pattern2',
930
		'pa_performa',
931
		'pa_pictureformat',
932
		'pa_pin-size',
933
		'pa_piston-displacement-cc',
934
		'pa_ploshhad',
935
		'pa_plug-type',
936
		'pa_power',
937
		'pa_product',
938
		'pa_productgroup',
939
		'pa_producttypename',
940
		'pa_publicationdate',
941
		'pa_publisher',
942
		'pa_quantity',
943
		'pa_rear',
944
		'pa_rear-overhang',
945
		'pa_rear-tread',
946
		'pa_refrigerated-box',
947
		'pa_region',
948
		'pa_regioncode',
949
		'pa_releasedate',
950
		'pa_rem-parkir',
951
		'pa_rem-pelambat',
952
		'pa_rem-utama',
953
		'pa_reverse',
954
		'pa_runningtime',
955
		'pa_scent',
956
		'pa_schachtlengte',
957
		'pa_seeds',
958
		'pa_series',
959
		'pa_setting',
960
		'pa_sex',
961
		'pa_shape',
962
		'pa_shirt-size',
963
		'pa_size',
964
		'pa_sizes',
965
		'pa_sku',
966
		'pa_sky-lift',
967
		'pa_sleeve-length',
968
		'pa_snelheidsregeling',
969
		'pa_staart',
970
		'pa_steering',
971
		'pa_steering-type',
972
		'pa_storlek',
973
		'pa_studio',
974
		'pa_stuwkracht-lbs',
975
		'pa_style',
976
		'pa_suspensions',
977
		'pa_taille',
978
		'pa_talla',
979
		'pa_tamanho',
980
		'pa_tamano',
981
		'pa_taxi',
982
		'pa_ticket-type',
983
		'pa_tire-size',
984
		'pa_total-chassis-weight',
985
		'pa_towing-truck',
986
		'pa_tradeinvalue',
987
		'pa_trailer-t-head',
988
		'pa_transmisi-tipe',
989
		'pa_transmission',
990
		'pa_transmission-type',
991
		'pa_types',
992
		'pa_ukuran',
993
		'pa_upc',
994
		'pa_upclist',
995
		'pa_variation',
996
		'pa_vehicle-carrier',
997
		'pa_vergelijkbaar-stuwkracht',
998
		'pa_vermogen',
999
		'pa_voltage',
1000
		'pa_volume',
1001
		'pa_warranty',
1002
		'pa_weight',
1003
		'pa_wheel-base',
1004
		'pa_wheel-configuration',
1005
		'pa_wheel-disc-size',
1006
		'pa_width',
1007
		'pa_zout-water-geschikt',
1008
		'product',
1009
		'product-category',
1010
		'product_brand',
1011
		'product_delivery_time',
1012
		'product_delivery_times',
1013
		'product_price_label',
1014
		'product_sale_labels',
1015
		'product_shipping_class',
1016
		'product_tag',
1017
		'product_type',
1018
		'product_unit',
1019
		'product_visibility',
1020
		'products',
1021
1022
		// wp-job-manager.
1023
		'job-category',
1024
		'job-location',
1025
		'job-type',
1026
		'job_cat',
1027
		'job_category',
1028
		'job_listing_category',
1029
		'job_listing_label',
1030
		'job_listing_region',
1031
		'job_listing_tag',
1032
		'job_listing_type',
1033
		'job_salary',
1034
		'job_tag',
1035
		'job_type',
1036
		'jobman_category',
1037
		'jobpost_category',
1038
		'jobpost_job_type',
1039
		'jobpost_location',
1040
		'resume_category',
1041
		'resume_groups',
1042
		'resume_job_type',
1043
		'resume_job_type',
1044
		'resume_languages',
1045
		'resume_region',
1046
		'resume_skill',
1047
		'resume_specialities',
1048
1049
		// generic.
1050
		'_resource',
1051
		'acadp_categories',
1052
		'acadp_locations',
1053
		'action-group',
1054
		'activity',
1055
		'actor',
1056
		'actors',
1057
		'ad-group',
1058
		'adace-ad-group',
1059
		'adace-sponsor',
1060
		'additional_features',
1061
		'adv_location',
1062
		'advanced_ads_groups',
1063
		'advert_category',
1064
		'affcoups_coupon_category',
1065
		'affcoups_coupon_type',
1066
		'ai_log_context',
1067
		'ai_log_level',
1068
		'al_product-cat',
1069
		'aol_ad_category',
1070
		'aol_ad_location',
1071
		'aol_ad_type',
1072
		'aol_application_status',
1073
		'area',
1074
		'article-slug',
1075
		'asgarosforum-category',
1076
		'asgarosforum-usergroup',
1077
		'attachment_category',
1078
		'attachment_tag',
1079
		'atum_location',
1080
		'avhec_catgroup',
1081
		'bartype',
1082
		'baths',
1083
		'beds',
1084
		'bepro_listing_types',
1085
		'blog_category',
1086
		'booked_custom_calendars',
1087
		'brand',
1088
		'brands',
1089
		'business_category',
1090
		'bwg_tag',
1091
		'byline',
1092
		'calendar_category',
1093
		'calendar_feed',
1094
		'calendar_type',
1095
		'campaign_category',
1096
		'campaign_tag',
1097
		'carousel_cat',
1098
		'carousels_category',
1099
		'case27_job_listing_tags',
1100
		'categories',
1101
		'category_media',
1102
		'category_portfolio',
1103
		'celebrity_cat',
1104
		'chapters',
1105
		'chronosly_category',
1106
		'city',
1107
		'classified_listing_type',
1108
		'client-types',
1109
		'clients_groups',
1110
		'cm-business-category',
1111
		'cmdm_category',
1112
		'cn_log_type',
1113
		'coderevolution_post_source',
1114
		'collection',
1115
		'community',
1116
		'companies',
1117
		'company',
1118
		'cont_category',
1119
		'content_audit',
1120
		'country',
1121
		'course',
1122
		'course-cat',
1123
		'course-category',
1124
		'course_cat',
1125
		'course_category',
1126
		'course_difficulty',
1127
		'course_tag',
1128
		'courses_type',
1129
		'cp_campaign',
1130
		'cp_recipe_category',
1131
		'csco_post_featured',
1132
		'ct_status',
1133
		'ctl-stories',
1134
		'cuisine',
1135
		'dc_vendor_shop',
1136
		'ddownload_category',
1137
		'ddownload_tag',
1138
		'dealstore',
1139
		'department',
1140
		'departments',
1141
		'department-company',
1142
		'developed-by',
1143
		'dfads_group',
1144
		'dgfw_gift_categories',
1145
		'director',
1146
		'district',
1147
		'dlm_download_category',
1148
		'dlm_download_tag',
1149
		'doc_tag',
1150
		'document-category',
1151
		'download_artist',
1152
		'download_category',
1153
		'download_tag',
1154
		'downloads_filter',
1155
		'dps_book',
1156
		'dt_gallery_category',
1157
		'dt_logos_category',
1158
		'dt_portfolio_category',
1159
		'dt_team_category',
1160
		'dt_testimonials_category',
1161
		'dtcast',
1162
		'dtcreator',
1163
		'dtdirector',
1164
		'dtnetworks',
1165
		'dtstudio',
1166
		'dtyear',
1167
		'dvteamtaxonomy',
1168
		'dwqa-question_category',
1169
		'dwqa-question_tag',
1170
		'eafl_category',
1171
		'easy-testimonial-category',
1172
		'ecwd_event_category',
1173
		'edd_log_type',
1174
		'edition',
1175
		'ef_editorial_meta',
1176
		'ef_usergroup',
1177
		'element_category',
1178
		'elementor_library_type',
1179
		'employees_category',
1180
		'encyclopedia-tag',
1181
		'envira-tag',
1182
		'epkb_post_type_1_category',
1183
		'espresso_event_categories',
1184
		'espresso_event_type',
1185
		'essential_grid_category',
1186
		'et_post_format',
1187
		'faq-group',
1188
		'faq-tags',
1189
		'faq-topic',
1190
		'faq_cat',
1191
		'faq_categories',
1192
		'faq_category',
1193
		'faqs-category',
1194
		'fdm-menu-section',
1195
		'feature',
1196
		'featured_item_category',
1197
		'featured_item_tag',
1198
		'feedback_type',
1199
		'feeds',
1200
		'fl-builder-template-type',
1201
		'flamingo_inbound_channel',
1202
		'follow_up_email_campaign',
1203
		'follow_up_email_type',
1204
		'following_users',
1205
		'football-team-taxo',
1206
		'fpd_design_category',
1207
		'gallery-category',
1208
		'gallery_cat',
1209
		'gallery_categories',
1210
		'gallery_category',
1211
		'gallery_entries',
1212
		'gallerycat',
1213
		'gd_event_tags',
1214
		'gd_eventcategory',
1215
		'gd_place_tags',
1216
		'gd_placecategory',
1217
		'genre',
1218
		'genres',
1219
		'gg_connect_hub',
1220
		'give_log_type',
1221
		'gn-genre',
1222
		'gn-location-1',
1223
		'gn-location-2',
1224
		'gn-location-3',
1225
		'gp_hubs',
1226
		'gp_portfolios',
1227
		'gp_videos',
1228
		'group',
1229
		'group-documents-category',
1230
		'groups',
1231
		'hashtags',
1232
		'hotel_facility',
1233
		'ia_invited_groups',
1234
		'ia_invitees',
1235
		'incsub_wiki_category',
1236
		'industry',
1237
		'ingredient',
1238
		'issue',
1239
		'issuem_issue',
1240
		'issuem_issue_tags',
1241
		'jbp_category',
1242
		'karma-slider-category',
1243
		'klaviyo_shop_cart_status',
1244
		'kwlogos-carousel',
1245
		'layout_category',
1246
		'layout_type',
1247
		'ld_course_category',
1248
		'ld_course_tag',
1249
		'ld_lesson_category',
1250
		'ld_lesson_tag',
1251
		'ld_topic_tag',
1252
		'lesson-tag',
1253
		'level',
1254
		'lingotek_hash',
1255
		'lingotek_profile',
1256
		'link_library_category',
1257
		'linkage',
1258
		'list-tags',
1259
		'listing-category',
1260
		'listing_amenities',
1261
		'listing_category',
1262
		'liveblog',
1263
		'llms_access_plan_visibility',
1264
		'llms_product_visibility',
1265
		'localisation',
1266
		'location',
1267
		'location-tag',
1268
		'locations',
1269
		'magazine',
1270
		'map_location_categories',
1271
		'masonry_gallery_category',
1272
		'mc-event-category',
1273
		'mec_category',
1274
		'mec_location',
1275
		'mec_organizer',
1276
		'media-category',
1277
		'media-tags',
1278
		'media_category',
1279
		'media_folder',
1280
		'member_cat',
1281
		'mentions',
1282
		'mesh_template_types',
1283
		'ml-slider',
1284
		'module',
1285
		'module-tag',
1286
		'module_width',
1287
		'movie_cat',
1288
		'mpp-component',
1289
		'mpp-status',
1290
		'mpp-type',
1291
		'muvicast',
1292
		'muvicountry',
1293
		'muvidirector',
1294
		'muviindex',
1295
		'muviquality',
1296
		'muviyear',
1297
		'news-category',
1298
		'news-tag',
1299
		'news_category',
1300
		'nova_menu',
1301
		'nova_menu_item_label',
1302
		'offer-types',
1303
		'organization',
1304
		'our_team_category',
1305
		'page_category',
1306
		'parisrestaurant',
1307
		'parissauna',
1308
		'partner_category',
1309
		'partners',
1310
		'paswdestinatari',
1311
		'paypal_ipn_type',
1312
		'pdf_lv_tag',
1313
		'pec_events_category',
1314
		'people',
1315
		'people-expertise',
1316
		'people-location',
1317
		'perfect_quotes_category',
1318
		'performer',
1319
		'person',
1320
		'personnal-category',
1321
		'pexcontentslider_category',
1322
		'pexfullslider_category',
1323
		'pexnivoslider_category',
1324
		'pexpricing_category',
1325
		'pexservice_category',
1326
		'pextestimonial_category',
1327
		'pf_feed_item_tag',
1328
		'pg_sas_type',
1329
		'photo_tag',
1330
		'phototype',
1331
		'pj-categs',
1332
		'pj-tags',
1333
		'pl-categs',
1334
		'placement',
1335
		'plan_status',
1336
		'platform',
1337
		'player',
1338
		'plugins_categories',
1339
		'podcast',
1340
		'pojo_sidebars',
1341
		'popup_category',
1342
		'pornstars',
1343
		'portada',
1344
		'portcat',
1345
		'portfolio-category',
1346
		'portfolio-gallery',
1347
		'portfolio-skills',
1348
		'portfolio-tag',
1349
		'portfolio-tags',
1350
		'portfolio-type',
1351
		'portfolio-types',
1352
		'portfolio_cat',
1353
		'portfolio_categories',
1354
		'portfolio_category',
1355
		'portfolio_cats',
1356
		'portfolio_client',
1357
		'portfolio_entries',
1358
		'portfolio_filter',
1359
		'portfolio_in',
1360
		'portfolio_label',
1361
		'portfolio_skills',
1362
		'portfolio_tag',
1363
		'portfolio_tags',
1364
		'portfolio_type',
1365
		'posicao',
1366
		'post-type',
1367
		'post_format',
1368
		'post_series',
1369
		'pp_editorial_meta',
1370
		'pp_notify_role',
1371
		'pp_usergroup',
1372
		'pricingcats',
1373
		'print_section',
1374
		'print_status',
1375
		'programs',
1376
		'project-attributes',
1377
		'project-cat',
1378
		'project-category',
1379
		'project-type',
1380
		'project_category',
1381
		'project_tag',
1382
		'projects_category',
1383
		'projects_tag',
1384
		'prominence',
1385
		'promotion-categories',
1386
		'property-city',
1387
		'property-feature',
1388
		'property-status',
1389
		'property-type',
1390
		'property-types',
1391
		'property_action_category',
1392
		'property_area',
1393
		'property_category',
1394
		'property_city',
1395
		'property_feature',
1396
		'property_status',
1397
		'property_type',
1398
		'province',
1399
		'provinces',
1400
		'publisher',
1401
		'pwb-brand',
1402
		'qmn_log_type',
1403
		'qualification',
1404
		'quality',
1405
		'question-category',
1406
		'question-tag',
1407
		'question-type',
1408
		'question_cat',
1409
		'question_category',
1410
		'question_tag',
1411
		'quiz',
1412
		'quiz-type',
1413
		'quote_status',
1414
		'rating',
1415
		'reaction',
1416
		'recipe-category',
1417
		'recipe_category',
1418
		'recipe_type',
1419
		'region',
1420
		'registrant-event',
1421
		'related_keywords',
1422
		'release-date',
1423
		'resource-type',
1424
		'resource_category',
1425
		'resource_type',
1426
		'resourcetype',
1427
		'review-type',
1428
		'review_category',
1429
		'rodzaj',
1430
		'role',
1431
		'room_category',
1432
		'room_tag',
1433
		'roomtype',
1434
		'rubriek_categorie',
1435
		'savedreply',
1436
		'schools',
1437
		'scope',
1438
		'scores_cat',
1439
		'sdm_categories',
1440
		'sdm_tags',
1441
		'season',
1442
		'secondary_html_features',
1443
		'section',
1444
		'sector',
1445
		'series',
1446
		'series_of_posts',
1447
		'services_group',
1448
		'serving',
1449
		'shop_cart_status',
1450
		'shop_cat',
1451
		'shop_order_status',
1452
		'shop_vendor',
1453
		'shop_warranty_status',
1454
		'shopp_category',
1455
		'shopr_category',
1456
		'show',
1457
		'simple_link_category',
1458
		'site-review-category',
1459
		'sizes',
1460
		'skill',
1461
		'skill_level',
1462
		'skills',
1463
		'sld_cat',
1464
		'slide-page',
1465
		'slide-types',
1466
		'slide_categories',
1467
		'slide_type',
1468
		'slider',
1469
		'slider-locations',
1470
		'slider_category',
1471
		'slides_category',
1472
		'slideshow',
1473
		'sm-category',
1474
		'snax_format',
1475
		'sngg_media_tags',
1476
		'solution_channel',
1477
		'source_domain',
1478
		'source_id',
1479
		'sp_league',
1480
		'sp_position',
1481
		'sp_role',
1482
		'sp_season',
1483
		'sp_venue',
1484
		'speaker',
1485
		'speakers',
1486
		'special-feature',
1487
		'specialty',
1488
		'spnl_log_type',
1489
		'sponsor_categories',
1490
		'sponsor_category',
1491
		'sponsor_type',
1492
		'spot_tag',
1493
		'st_af_category',
1494
		'st_af_tags',
1495
		'staff',
1496
		'staff-member-category',
1497
		'staff-member-group',
1498
		'staff_category',
1499
		'staffgroups',
1500
		'state',
1501
		'status',
1502
		'store',
1503
		'stores',
1504
		'studio',
1505
		'study_level',
1506
		'style',
1507
		'style_category',
1508
		'sub_transaction_action',
1509
		'sub_transaction_result',
1510
		'subcategory',
1511
		'subject',
1512
		'subscription_status',
1513
		'swift-slider-category',
1514
		'syn_sitegroup',
1515
		'szbl-content-tag',
1516
		'task-queue',
1517
		'tax_feature',
1518
		'tcb_symbols_tax',
1519
		'tcp_product_category',
1520
		'team',
1521
		'team-category',
1522
		'team_cat',
1523
		'team_categories',
1524
		'team_category',
1525
		'team_cats',
1526
		'team_department',
1527
		'team_designation',
1528
		'team_group',
1529
		'team_member_position',
1530
		'team_mfcategory',
1531
		'teams',
1532
		'tenant_categories',
1533
		'tenant_location',
1534
		'tender-category',
1535
		'test-type',
1536
		'testimonial-category',
1537
		'testimonial-group',
1538
		'testimonial-types',
1539
		'testimonial_categories',
1540
		'testimonial_category',
1541
		'testimonials-category',
1542
		'testimonials_category',
1543
		'th_events_cat',
1544
		'th_galleries_cat',
1545
		'thegem_clients_sets',
1546
		'thegem_news_sets',
1547
		'thegem_portfolios',
1548
		'thegem_quickfinders',
1549
		'thegem_teams',
1550
		'thegem_testimonials_sets',
1551
		'theme',
1552
		'themefusion_es_groups',
1553
		'themes_categories',
1554
		'themo_cpt_group',
1555
		'themo_project_type',
1556
		'themo_room_type',
1557
		'thirstylink-category',
1558
		'ticket_channel',
1559
		'ticket_priority',
1560
		'timeline_post_tag',
1561
		'tipo',
1562
		'tipologie',
1563
		'tips',
1564
		'tm-testimonials_category',
1565
		'tm_testimonial_group',
1566
		'tooltips_categories',
1567
		'tour_category',
1568
		'tour_destination',
1569
		'tour_facility',
1570
		'tour_phys',
1571
		'tour_type',
1572
		'tp_event_category',
1573
		'transmission',
1574
		'treatment-type',
1575
		'tribe_events_cat',
1576
		'truethemes-gallery-category',
1577
		'tsas-category',
1578
		'tshowcase-categories',
1579
		'tsml_region',
1580
		'ttshowcase_groups',
1581
		'tvo_tags',
1582
		'type',
1583
		'types',
1584
		'u_course_cat',
1585
		'u_department',
1586
		'u_event_cat',
1587
		'ufaq-category',
1588
		'ufaq-tag',
1589
		'um_hashtag',
1590
		'um_user_tag',
1591
		'uncodeblock_category',
1592
		'upg_cate',
1593
		'urp-review-category',
1594
		'us_portfolio_category',
1595
		'us_testimonial_category',
1596
		'user-group',
1597
		'user_category',
1598
		'user_status',
1599
		'vendor',
1600
		'venue',
1601
		'video-category',
1602
		'video-series',
1603
		'video-tag',
1604
		'video_category',
1605
		'video_tag',
1606
		'videos',
1607
		'videos_categories',
1608
		'voice_category',
1609
		'vtmin_rule_category',
1610
		'vtprd_rule_category',
1611
		'w2dc-category',
1612
		'w2dc-location',
1613
		'w2dc-tag',
1614
		'wcb_sponsor_level',
1615
		'wcb_track',
1616
		'wccf_checkout_field_field_type',
1617
		'wccf_checkout_field_status',
1618
		'wccf_order_field_field_type',
1619
		'wccf_order_field_status',
1620
		'wccf_product_field_field_type',
1621
		'wccf_product_field_status',
1622
		'wccf_product_prop_field_type',
1623
		'wccf_product_prop_status',
1624
		'wccf_user_field_field_type',
1625
		'wccf_user_field_status',
1626
		'wcfm_knowledgebase_category',
1627
		'wcm_task_category',
1628
		'wcpv_product_vendors',
1629
		'wcs-instructor',
1630
		'wcs-room',
1631
		'wcs-type',
1632
		'wdca_ad_categories',
1633
		'where',
1634
		'who',
1635
		'wiki-category',
1636
		'wiki_cats',
1637
		'wl_entity_type',
1638
		'workout_entries',
1639
		'works-category',
1640
		'wp-rest-api-log-method',
1641
		'wp-rest-api-log-source',
1642
		'wp-rest-api-log-status',
1643
		'wp-type-activity-types',
1644
		'wp-type-contacts-subtype',
1645
		'wp-type-group',
1646
		'wp_bannerize_tax',
1647
		'wp_log_type',
1648
		'wp_super_faq_category',
1649
		'wpbdm-region',
1650
		'wpbdp_category',
1651
		'wpbdp_tag',
1652
		'wpcm_make_model',
1653
		'wpdmcategory',
1654
		'wpfb_file_category',
1655
		'wpfcas-category',
1656
		'wpfd-category',
1657
		'wplead_list_category',
1658
		'wplss_logo_showcase_cat',
1659
		'wpm-testimonial-category',
1660
		'wpmf-category',
1661
		'wpostahs-slider-category',
1662
		'wprm_course',
1663
		'wprm_cuisine',
1664
		'wprm_ingredient',
1665
		'wprm_keyword',
1666
		'wprss_category',
1667
		'wps_forum',
1668
		'wpsc-variation',
1669
		'wpsc_log_type',
1670
		'wpsc_product_category',
1671
		'wpseo_locations_category',
1672
		'wpsisac_slider-category',
1673
		'wpsl_store_category',
1674
		'wpt_category',
1675
		'wpt_result',
1676
		'wpt_scale',
1677
		'wpv_sermons_category',
1678
		'wpvqgr_tag',
1679
		'writer',
1680
		'wyz_business_category',
1681
		'wyz_business_rating_category',
1682
		'wyz_business_tag',
1683
		'wzkb_category',
1684
		'year',
1685
		'years',
1686
		'yith_product_brand',
1687
		'yith_shop_vendor',
1688
		'yst_prominent_words',
1689
		'zipcode',
1690
		'zoninator_zones',
1691
		'zrf_field_group',
1692
	); // end taxonomies.
1693
1694
	/*
1695
	 * Taxonomies we know don't sync.
1696
	 * See also sync/src/class-defaults.php
1697
	 *
1698
	 * 'network'
1699
	 * 'post_status'
1700
	 * 'product_cat'
1701
	 * 'tags'
1702
	 *
1703
	 */
1704
1705
	//
1706
	// Hooks into sync.
1707
1708
	/**
1709
	 * Add Search post meta to the post meta whitelist.
1710
	 *
1711
	 * @param array $list Existing post meta whitelist.
1712
	 * @return array Updated post meta whitelist.
1713
	 */
1714
	public function add_search_post_meta_whitelist( $list ) {
1715
		return array_merge( $list, $this->get_all_postmeta_keys() );
1716
	}
1717
1718
	//
1719
	// Indexing functions for wp.com.
1720
1721
	/**
1722
	 *
1723
	 * Check whether a postmeta or taxonomy 'key' is in the indexable
1724
	 * list. This is called by the indexing code on wp.com to decide
1725
	 * whether to include something in the index.
1726
	 *
1727
	 * @static
1728
	 * @access public
1729
	 *
1730
	 * @param string $type Either 'postmeta' or 'taxonomy'.
1731
	 * @param string $key The postmeta key or taxonomy name.
1732
	 * @return boolean
1733
	 */
1734
	public static function is_indexable( $type, $key ) {
1735
		switch ( $type ) {
1736
			case 'postmeta':
1737
				return isset( self::$postmeta_to_sync[ $key ] );
1738
			case 'taxonomy':
1739
				return in_array( $key, self::$taxonomies_to_sync, true );
1740
		}
1741
		return false;
1742
	}
1743
1744
	/**
1745
	 *
1746
	 * Get the indexing spec for a postmeta key.
1747
	 *
1748
	 * @static
1749
	 * @access public
1750
	 *
1751
	 * @param string $key The postmeta key.
1752
	 * @return array The spec.
1753
	 */
1754
	public static function get_postmeta_spec( $key ) {
1755
		return self::$postmeta_to_sync[ $key ];
1756
	}
1757
1758
	/**
1759
	 * Get all post meta keys that get synced.
1760
	 *
1761
	 * @access public
1762
	 *
1763
	 * @return array List of post meta keys that get synced.
1764
	 */
1765
	public static function get_all_postmeta_keys() {
1766
		return array_keys( self::$postmeta_to_sync );
1767
	}
1768
1769
	/**
1770
	 * Get all unindexed postmeta.
1771
	 *  This is mostly for testing.
1772
	 *
1773
	 * @access public
1774
	 *
1775
	 * @return array List of postmeta that are not synced.
1776
	 */
1777
	public static function get_all_unindexed_postmeta_keys() {
1778
		return array_keys( self::$unindexed_postmeta );
1779
	}
1780
1781
	/**
1782
	 * Get all taxonomies that get synced.
1783
	 *  This is mostly for testing.
1784
	 *
1785
	 * @access public
1786
	 *
1787
	 * @return array List of taxonomies that get synced.
1788
	 */
1789
	public static function get_all_taxonomies() {
1790
		return self::$taxonomies_to_sync;
1791
	}
1792
1793
}
1794