#57473 closed defect (bug) (fixed)
Unclear Documentation for wp_insert_post for post_modified property
Reported by: | dshanske | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.2 | Priority: | low |
Severity: | trivial | Version: | |
Component: | Posts, Post Types | Keywords: | good-first-bug has-patch commit |
Focuses: | docs | Cc: |
Description
The documentation for wp_insert_post implies that post_modified and post_modified_gmt can be set using this, but it cannot if this is an update, only if it is a new post.
Personally, I actually wanted to be able to have this not updated for minor edits, which is why I was looking at the code, but noticed the explanation is misleading.
Change History (5)
This ticket was mentioned in PR #3850 on WordPress/wordpress-develop by @mehulkaklotar.
2 years ago
#2
- Keywords has-patch added; needs-patch removed
#3
@
2 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to 6.2
- Owner set to audrasjb
- Status changed from new to accepted
Thanks for the ticket @dshanske and for the patch @mehulkaklotar!
The patch removes post_modified
and post_modified_gmt
params from wp_insert_post()
docblock, which looks good to me, since those params are not used in this function.
Self assigning for commit
.
@audrasjb commented on PR #3850:
2 years ago
#5
Committed in https://core.trac.wordpress.org/changeset/55080
Trac ticket: https://core.trac.wordpress.org/ticket/57473