[wp-trac] [WordPress Trac] #57147: custom post types no longer saving/retrieving correctly
WordPress Trac
noreply at wordpress.org
Thu Dec 15 12:53:58 UTC 2022
#57147: custom post types no longer saving/retrieving correctly
-------------------------------+----------------------
Reporter: wellituser | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Posts, Post Types | Version: 6.1
Severity: major | Resolution: invalid
Keywords: | Focuses:
-------------------------------+----------------------
Changes (by SergeyBiryukov):
* keywords: reporter-feedback =>
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
Thanks for the follow-up!
Yes, that is correct, these capabilities check for a particular post and
do require a post ID:
* `current_user_can( 'delete_post', $post_id )`
* `current_user_can( 'edit_post', $post_id )`
* `current_user_can( 'read_post', $post_id )`
* `current_user_can( 'publish_post', $post_id )`
[53408] / #44591 aimed to address this in a consistent way. Performing
these checks without passing in a post ID is not supported and could only
work by accident. See the discussion in #56962 for more details.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57147#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list