[wp-trac] [WordPress Trac] #63014: Enhance `_wp_after_delete_font_family()` performance using the `fields` argument in `get_children()`.
WordPress Trac
noreply at wordpress.org
Tue Feb 25 07:36:07 UTC 2025
#63014: Enhance `_wp_after_delete_font_family()` performance using the `fields`
argument in `get_children()`.
--------------------------+-----------------------------
Reporter: dilipbheda | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version:
Severity: normal | Keywords: has-patch
Focuses: performance |
--------------------------+-----------------------------
The `_wp_after_delete_font_family()` function can be optimized by
leveraging the `fields` argument in the `get_children()` function.
Currently, the function retrieves unnecessary data, which affects
performance.
Since we use only the `ID` field in the `wp_delete_post()` function from
the `get_children()` object, adding the `fields` argument will limit the
query to fetch only the required IDs, improving both performance and
efficiency.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63014>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list