Make WordPress Core


Ignore:
Timestamp:
07/05/2022 04:03:10 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Block Patterns: Update the value used for keywords.

Patterns on the Pattern Directory can have keywords for better discoverability while searching. The way these are stored 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.
Merges [53665] to the 6.0 branch.
See #56126.

Location:
branches/6.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.0

  • branches/6.0/tests/phpunit/data/blocks/pattern-directory/browse-keyword-11.json

    r51021 r53666  
    1010                        "spay_email": "",
    1111                        "wpop_description": "A heading preceded by a chapter number, and followed by a paragraph.",
     12                        "wpop_keywords": "",
    1213                        "wpop_viewport_width": 1000
    1314                },
     
    2627                        "spay_email": "",
    2728                        "wpop_description": "A large hero section with an example background image and a heading in the center.",
     29                        "wpop_keywords": "",
    2830                        "wpop_viewport_width": 1000
    2931                },
     
    4244                        "spay_email": "",
    4345                        "wpop_description": "A large hero section with a bright gradient background, a big heading and a filled button.",
     46                        "wpop_keywords": "",
    4447                        "wpop_viewport_width": 1000
    4548                },
Note: See TracChangeset for help on using the changeset viewer.