Opened 5 years ago
Last modified 4 days ago
#53195 new defect (bug)
Add $post or $post_id to the quick_edit_custom_box hook
| Reported by: | tomdevisser | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Quick/Bulk Edit | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | administration |
Description
Right now when you're adding a custom box to quick edit, you can't set an existing value without using JavaScript, cause you don't have acces to the post. For a more elaborate explanation, see the User Contributed Notes, top one by stevenlinx: https://developer.wordpress.org/reference/hooks/quick_edit_custom_box/
It would be more elegant if we could just use the post within the hook I think.
Change History (2)
This ticket was mentioned in PR #13489 on WordPress/wordpress-develop by @arkaprabhachowdhury.
4 days ago
#2
- Keywords has-patch has-unit-tests added; needs-patch removed
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This fixes #53195 by passing the WP_Post object used to populate the Quick Edit form as the fourth argument to the quick_edit_custom_box action for post list tables.
This gives callbacks access to the post context when rendering custom Quick Edit fields.
## Testing
Trac ticket: https://core.trac.wordpress.org/ticket/53195
## Use of AI Tools
AI assistance: Yes
Tool(s): ChatGPT/Codex
Model(s): GPT-5
Used for: Implementation, test coverage, and validation; the final patch and test results were reviewed before submission.