Block Patterns: Update the value used for keywords.

Patterns on the [https://wordpress.org/patterns/ Pattern Directory] can have keywords for better discoverability while searching. The way these are stored [69548ff1f0 was changed from a taxonomy to meta value], but the `/wp/v2/pattern-directory/patterns` endpoint was still pulling from that old value.

The correct property to use for this field is `meta.wpop_keywords`, which returns a single string with comma-separated keywords.

Props ryelle, TimothyBlynJacobs.
See #56126.

git-svn-id: https://develop.svn.wordpress.org/trunk@53665 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2022-07-05 16:01:36 +00:00
parent 8fa608877b
commit ccbdd73187
6 changed files with 17 additions and 6 deletions

View File

@@ -9,6 +9,7 @@
"meta": {
"spay_email": "",
"wpop_description": "A heading preceded by a chapter number, and followed by a paragraph.",
"wpop_keywords": "blog post",
"wpop_viewport_width": 1000
},
"category_slugs": [ "text" ],
@@ -25,6 +26,7 @@
"meta": {
"spay_email": "",
"wpop_description": "A large hero section with an example background image and a heading in the center.",
"wpop_keywords": "header, hero",
"wpop_viewport_width": 1000
},
"category_slugs": [ "header" ],
@@ -41,6 +43,7 @@
"meta": {
"spay_email": "",
"wpop_description": "A large hero section with a bright gradient background, a big heading and a filled button.",
"wpop_keywords": "call to action, hero section",
"wpop_viewport_width": 1000
},
"category_slugs": [ "header" ],

View File

@@ -9,6 +9,7 @@
"meta": {
"spay_email": "",
"wpop_description": "Three filled buttons with rounded corners, side by side.",
"wpop_keywords": "",
"wpop_viewport_width": 600
},
"category_slugs": [ "buttons" ],
@@ -25,6 +26,7 @@
"meta": {
"spay_email": "",
"wpop_description": "Two buttons, one filled and one outlined, side by side.",
"wpop_keywords": "",
"wpop_viewport_width": 500
},
"category_slugs": [ "buttons" ],

View File

@@ -9,6 +9,7 @@
"meta": {
"spay_email": "",
"wpop_description": "A heading preceded by a chapter number, and followed by a paragraph.",
"wpop_keywords": "",
"wpop_viewport_width": 1000
},
"category_slugs": [ "text" ],
@@ -25,6 +26,7 @@
"meta": {
"spay_email": "",
"wpop_description": "A large hero section with an example background image and a heading in the center.",
"wpop_keywords": "",
"wpop_viewport_width": 1000
},
"category_slugs": [ "header" ],
@@ -41,6 +43,7 @@
"meta": {
"spay_email": "",
"wpop_description": "A large hero section with a bright gradient background, a big heading and a filled button.",
"wpop_keywords": "",
"wpop_viewport_width": 1000
},
"category_slugs": [ "header" ],

View File

@@ -9,6 +9,7 @@
"meta": {
"spay_email": "",
"wpop_description": "A large hero section with a bright gradient background, a big heading and a filled button.",
"wpop_keywords": "",
"wpop_viewport_width": 1000
},
"category_slugs": [ "header" ],
@@ -25,6 +26,7 @@
"meta": {
"spay_email": "",
"wpop_description": "Three small columns of text, each with an outlined button with rounded corners at the bottom.",
"wpop_keywords": "",
"wpop_viewport_width": 1000
},
"category_slugs": [ "columns" ],
@@ -41,6 +43,7 @@
"meta": {
"spay_email": "",
"wpop_description": "Three filled buttons with rounded corners, side by side.",
"wpop_keywords": "",
"wpop_viewport_width": 600
},
"category_slugs": [ "buttons" ],
@@ -57,6 +60,7 @@
"meta": {
"spay_email": "",
"wpop_description": "Two buttons, one filled and one outlined, side by side.",
"wpop_keywords": "",
"wpop_viewport_width": 500
},
"category_slugs": [ "buttons" ],