#56037 closed enhancement (fixed)
Call update_post_parent_caches in wp_ajax_query_attachments function
Reported by: | spacedmonkey | Owned by: | peterwilsoncc |
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | good-first-bug has-patch needs-dev-note |
Focuses: | performance | Cc: |
Description
Call update_post_parent_caches in wp_ajax_query_attachments function to prime parent caches in a single request.
Change History (14)
#1
@
2 years ago
- Milestone 6.1 deleted
- Resolution set to duplicate
- Status changed from new to closed
#2
@
2 years ago
- Resolution duplicate deleted
- Status changed from closed to reopened
@hellofromTonya This is not a duplicate.
#4
follow-up:
↓ 5
@
2 years ago
Hello.
This is my first-time Contribution to WordPress. Can I get more information on where exactly we want to place the function?
Thank You
#5
in reply to:
↑ 4
@
2 years ago
Replying to albatross10:
Hello.
This is my first-time Contribution to WordPress. Can I get more information on where exactly we want to place the function?
Thank You
The function in question can be found in wp-admin/includes/ajax-actions.php file. update_post_parent_caches Expects an array on post objects. So pass the array posts into the function after line 3014.
This ticket was mentioned in PR #3069 on WordPress/wordpress-develop by bhavz-10.
2 years ago
#6
- Keywords has-patch added; needs-patch removed
Call update_post_parent_caches in wp_ajax_query_attachments function to prime parent caches in a single request.
Trac ticket: https://core.trac.wordpress.org/ticket/56037
#7
@
2 years ago
Hello @spacedmonkey
I have added a patch and a PR. I would be glad to work on any changes suggested.
Thank You
#9
@
2 years ago
@spacedmonkey
I have updated the PR as per your feedback.
Apologies since this is my first contribution.
#10
@
2 years ago
Hello @spacedmonkey
I made the recent changes in the PR as suggested by @peterwilsoncc
Thank You
#11
@
2 years ago
- Owner set to peterwilsoncc
- Resolution set to fixed
- Status changed from reopened to closed
In 53885:
peterwilsoncc commented on PR #3069:
2 years ago
#12
Merged in https://core.trac.wordpress.org/changeset/53885 / c2e2e55b0d
Duplicate of #56036.