Make WordPress Core


Ignore:
Timestamp:
07/05/2022 04:01:36 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.
See #56126.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/data/blocks/pattern-directory/search-button.json

    r51021 r53665  
    1010                        "spay_email": "",
    1111                        "wpop_description": "A large hero section with a bright gradient background, a big heading and a filled button.",
     12                        "wpop_keywords": "",
    1213                        "wpop_viewport_width": 1000
    1314                },
     
    2627                        "spay_email": "",
    2728                        "wpop_description": "Three small columns of text, each with an outlined button with rounded corners at the bottom.",
     29                        "wpop_keywords": "",
    2830                        "wpop_viewport_width": 1000
    2931                },
     
    4244                        "spay_email": "",
    4345                        "wpop_description": "Three filled buttons with rounded corners, side by side.",
     46                        "wpop_keywords": "",
    4447                        "wpop_viewport_width": 600
    4548                },
     
    5861                        "spay_email": "",
    5962                        "wpop_description": "Two buttons, one filled and one outlined, side by side.",
     63                        "wpop_keywords": "",
    6064                        "wpop_viewport_width": 500
    6165                },
Note: See TracChangeset for help on using the changeset viewer.