Opened 8 years ago
Last modified 3 years ago
#38702 new enhancement
REST API: Add accessor functions for post_status and post_parent
Reported by: | rmccue | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | REST API | Keywords: | has-patch needs-unit-tests |
Focuses: | Cc: |
Description
In order to enable better permission checks for Customiser Changesets, these need to be filterable.
See xwp/wp-customize-snapshots#32. Split from #38701.
Change History (6)
This ticket was mentioned in Slack in #core-restapi by kadamwhite. View the logs.
8 years ago
This ticket was mentioned in Slack in #core-restapi by kadamwhite. View the logs.
5 years ago
#4
@
5 years ago
@westonruter is this still a desired enhancement? We're turning over some long-forgotten bugs in triage today :)
Note: See
TracTickets for help on using
tickets.
The first thing to do is to replace any current usages of
$post->post_status
with simplyget_post_status( $post->ID )
.See https://github.com/xwp/wordpress-develop/pull/214
The lesser-important change to core is to handle permission checks for a post/page that has an
inherit
status when thepost_parent
itself is modified in the customized state. In this case, there needs to be filters applied on thepost_parent
value itself. However, there is noget_post_parent()
function with any filters currently in core.