#44908 closed enhancement (fixed)
Unecessary to set post_modified info in the wp_update_post of wp_generate_user_request_key as wp_insert_post handles it already
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 5.1 | Priority: | normal |
| Severity: | normal | Version: | 4.9.6 |
| Component: | Privacy | Keywords: | has-patch |
| Focuses: | Cc: |
Description
Hello,
Was reviewing some code specifically this wp_update_post from the wp_generate_user_request_key function found here;
https://github.com/WordPress/WordPress/blob/7ee752e40cf47feb2591711efb8074217b6961f2/wp-includes/user.php#L3515-L3523
In here it specifies the post_modified and post_modified_gmt which appear to get overwritten in wp_insert_post anyway so can probably be removed.
Cheers
Attachments (1)
Change History (9)
#1
@
7 years ago
- Keywords has-patch added
Added 44908.diff to clean-up and remove the unnecessary post_modified args as they get set within the wp_insert_post on $update here;
https://github.com/WordPress/WordPress/blob/f7ba175491b725a5f3d636072c8b432774d38ae3/wp-includes/post.php#L3506-L3508
Note: See
TracTickets for help on using
tickets.
Strip unnecessary post_modified args, they get overwritten in wp_insert_post when $update