[wp-trac] [WordPress Trac] #38702: REST API: Add accessor functions for post_status and post_parent
WordPress Trac
noreply at wordpress.org
Fri Feb 10 20:08:54 UTC 2017
#38702: REST API: Add accessor functions for post_status and post_parent
-------------------------------------------------+-------------------------
Reporter: rmccue | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future
Component: REST API | Release
Severity: normal | Version: 4.7
Keywords: 4.8-early has-patch needs-unit- | Resolution:
tests | Focuses:
-------------------------------------------------+-------------------------
Changes (by westonruter):
* keywords: 4.8-early => 4.8-early has-patch needs-unit-tests
Comment:
The first thing to do is to replace any current usages of
`$post->post_status` with simply `get_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 the `post_parent` itself is
modified in the customized state. In this case, there needs to be filters
applied on the `post_parent` value itself. However, there is no
`get_post_parent()` function with any filters currently in core.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38702#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list