summaryrefslogtreecommitdiffstatshomepage
path: root/src/wp-includes/rest-api/endpoints/class-wp-rest-block-patterns-controller.php
Commit message (Collapse)AuthorAge
* Coding Standards: Apply changes after running `composer format`.Jonathan Desrosiers2024-06-13
| | | | | | | | | This applies several formatting related changes made while running `composer format`. Follow up to [55720], [58171], [58271], [58282], [58283], [58292], [58299], [58303], [58332]. See #51857, #60719, #60895, #61021, #61118, #61228, #61276, #61324. git-svn-id: https://develop.svn.wordpress.org/trunk@58408 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: resolve patterns server side.Ella2024-06-03
| | | | | | | | | | | | | | See https://github.com/WordPress/gutenberg/pull/60349. See https://github.com/WordPress/gutenberg/pull/61757. See https://github.com/WordPress/wordpress-develop/pull/6673. Fixes #61228. Props ellatrix, antonvlasenko. git-svn-id: https://develop.svn.wordpress.org/trunk@58303 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Cache schema in block pattern and menu item endpoints.K. Adam White2023-06-28
| | | | | | | | | | | Performance improvement to add schema caching to pattern and menu item REST endpoints, so identical schema object are not needlessly regenerated. Props spacedmonkey. Fixes #58657. See [45811]. git-svn-id: https://develop.svn.wordpress.org/trunk@56093 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: allow filtering block patterns by source.Isabel Brison2023-06-27
| | | | | | | | | | Extends the REST API endpoint for block patterns to provide a source attribute that can be used to filter patterns. Props aaronrobertshaw, mukesh27, talldanwp, ramonopoly. Fixes 58622. git-svn-id: https://develop.svn.wordpress.org/trunk@56063 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve documentation for block pattern properties.Sergey Biryukov2023-02-01
| | | | | | | | | | | | | | | | | | | Includes: * Adding the `templateTypes` property to the `WP_Block_Patterns_Registry::register()` DocBlock. * Adding `@since` notes for the `postTypes` and `templateTypes` properties to: * `_register_theme_block_patterns()` * `WP_Block_Patterns_Registry::register()` * Bringing some consistency to the order of properties between: * `_register_theme_block_patterns()` * `WP_Block_Patterns_Registry::register()` * `WP_REST_Block_Patterns_Controller::prepare_item_for_response()` * `WP_REST_Block_Patterns_Controller::get_item_schema()` Follow-up to [52943], [53152], [54263], [55168]. See #56792. git-svn-id: https://develop.svn.wordpress.org/trunk@55173 602fd350-edb4-49c9-b593-d223f7449a82
* Add: Template types to the patterns API.Jorge Costa2023-01-31
| | | | | | | | | | | Backports https://github.com/WordPress/gutenberg/pull/45814 into the core. This commit adds a new templateType property to the patterns registration API. This property allows a pattern to specify which template it makes sense on, e.g.: 404, single-post, single-product, category. Props youknowriad, ntsekouras, spacedmonkey. git-svn-id: https://develop.svn.wordpress.org/trunk@55168 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Migrate old to the new pattern categories.Tonya Mork2023-01-24
| | | | | | | | | | | | | | | | | | | Adds a new non-public `WP_REST_Block_Patterns_Controller::migrate_pattern_categories()` method to automatically migrate existing content's pattern categories to the new ones introduced in [55098]. Old to New `'buttons'` to `'call-to-action'` `'columns'` to `'text'` `'query'` to `'posts'` Reference: * Part of [https://github.com/WordPress/gutenberg/pull/46144 Gutenberg PR 46144] Follow-up to [55098], [53152]. Props ntsekouras, annezazu, jameskoster, joen, hellofromTonya, mcsf, paaljoachim, ryelle. Fixes #57532. git-svn-id: https://develop.svn.wordpress.org/trunk@55125 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Remove leading whitespace from some translated strings.David Baumwald2022-09-29
| | | | | | | | | | | Merges [https://github.com/WordPress/gutenberg/pull/44314 Gutenberg PR #44314] into trunk. Follow-up to [54263] and [54269]. Props kebbet, bernhard-reiter. See #56467. git-svn-id: https://develop.svn.wordpress.org/trunk@54356 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Add post types property to wp-rest-block-patterns-controller.php.Jorge Costa2022-09-20
| | | | | | | | | Backports PHP changes in WordPress/gutenberg#41791 to the core. Adds the post types property to the rest API patterns endpoint. Props mcsf, ntsekouras, matveb. See #56467. git-svn-id: https://develop.svn.wordpress.org/trunk@54263 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Various docblock corrections and improvements for changes introduced ↵John Blackbourn2022-04-28
| | | | | | | | | in 6.0. See #54729 git-svn-id: https://develop.svn.wordpress.org/trunk@53302 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add `inserter` field to the schema of Patterns endpointGreg Ziółkowski2022-04-19
| | | | | | | | | | | | | Backports changes from https://github.com/WordPress/gutenberg/pull/40416. Adds the missing `inserter` field to the Patterns item schema. This field was omitted from the response, and patterns that should be hidden in the inserter were visible. Props mamaduka, ndiego. See #55567. Follow-up [53152]. git-svn-id: https://develop.svn.wordpress.org/trunk@53210 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Don't load remote patterns twice in the controllerGreg Ziółkowski2022-04-19
| | | | | | | | | | | | | | This PR aims to fix an issue with fetching remote patterns multiple times inside the WP_REST_Block_Patterns_Controller::get_items method. Follow-up [53152]. Props antonvlasenko. See #55567. git-svn-id: https://develop.svn.wordpress.org/trunk@53209 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Fix incorrect casing of patterns endpoint schema propertiesGreg Ziółkowski2022-04-13
| | | | | | | | | | | Follow-up [53154]. Props talldanwp. See #55505. git-svn-id: https://develop.svn.wordpress.org/trunk@53171 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Use snake case convention for field names in Block PatternsGreg Ziółkowski2022-04-12
| | | | | | | | | | | | | Backports the same changes applied in Gutenberg: https://github.com/WordPress/gutenberg/pull/40254. Follow-up for [53152]. Props jsnajdr, timothyblynjacobs. See #55505. git-svn-id: https://develop.svn.wordpress.org/trunk@53154 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Bring new endpoints for Block Patterns from Gutenberg pluginGreg Ziółkowski2022-04-12
Related Gutenberg issue: https://github.com/WordPress/gutenberg/issues/39889. Backporting changes from the Gutenberg plugin: - new Block Patterns REST API endpoint - new Block Pattern Categories REST API endpoint - updates to Query Loop related patterns - support for custom taxonomies in Query Loop block Props hellofromtonya, peterwilsoncc, ntsekouras, zieladam, ironprogrammer, spacedmonkey, timothyblynjacobs, antonvlasenko, jsnajdr. See #55505. git-svn-id: https://develop.svn.wordpress.org/trunk@53152 602fd350-edb4-49c9-b593-d223f7449a82