| 1 |
<?php |
| 2 |
|
| 3 |
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure. |
| 4 |
namespace Yoast\WP\SEO\Bulk_Editor\Infrastructure\Posts; |
| 5 |
|
| 6 |
/** |
| 7 |
* Provides the fields matched by the bulk editor's catch-all search. |
| 8 |
*/ |
| 9 |
trait Searchable_Fields_Trait { |
| 10 |
|
| 11 |
/** |
| 12 |
* The fields matched by the catch-all search, as a map of indexable column to Yoast meta key suffix. |
| 13 |
* |
| 14 |
* The post title is searched separately by both collectors because it lives in the posts table, not here. |
| 15 |
* |
| 16 |
* @return array<string, string> The searchable fields. |
| 17 |
*/ |
| 18 |
protected function searchable_fields(): array { |
| 19 |
return [ |
| 20 |
'primary_focus_keyword' => 'focuskw', |
| 21 |
'title' => 'title', |
| 22 |
'description' => 'metadesc', |
| 23 |
'open_graph_title' => 'opengraph-title', |
| 24 |
'open_graph_description' => 'opengraph-description', |
| 25 |
]; |
| 26 |
} |
| 27 |
} |
| 28 |
|