[wp-trac] [WordPress Trac] #57756: Improve performance of get_block_templates function
WordPress Trac
noreply at wordpress.org
Wed Apr 26 14:50:22 UTC 2023
#57756: Improve performance of get_block_templates function
-------------------------+--------------------------
Reporter: oandregal | Owner: oandregal
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.3
Component: Themes | Version: 5.8
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
-------------------------+--------------------------
Changes (by desrosj):
* keywords: has-patch commit => has-patch
* status: closed => reopened
* resolution: fixed =>
Comment:
Worked with @oandregal to get this committed. Great work all!
I did have one follow up question. When I was reading through it, I
noticed the inline comment preceding a few template related function
calls. It's something like:
{{{
/*
* Structure of a wp_template item:
*
* - slug
* - path
* - theme
* - type
* - title (optional)
* - postTypes (optional)
*/
}}}
My brain rejected this and I think was looking for something similar to
`@param array $template {}` syntax. I know that's not correct and this is
just an inline comment block, but I'm wondering if there's a better way to
document this without repetition.
Instead, could we possibly just expand the `$template_item` documentation
for `_add_block_template_info()` and
`_add_block_template_part_area_info()` to fully document what a template
contains and let that speak to the structure of a `wp_template` item?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57756#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list