[wp-trac] [WordPress Trac] #49871: REST API post link should be permalink for scheduled posts
WordPress Trac
noreply at wordpress.org
Thu Jul 2 13:35:48 UTC 2020
#49871: REST API post link should be permalink for scheduled posts
-------------------------------------------------+-------------------------
Reporter: Jules Colle | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future
| Release
Component: Permalinks | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch dev-feedback needs- | Focuses: rest-api
testing |
-------------------------------------------------+-------------------------
Changes (by earnjam):
* milestone: Awaiting Review => Future Release
Comment:
Given that we're
[https://github.com/WordPress/gutenberg/commit/527e7f1f4b9ca31d97ec92100990ad1b75743c93
now showing the future permalink in the editor] I think it makes sense to
return it from `get_permalink()`. That would also reveal it in the REST
API and will help simplify that editor code.
Regarding the patch, I think it works, but the loose comparison in
`'future' == get_post_status( get_query_var( 'p' ) )` feels risky
considering the moving parts. I'd feel better with a strict comparison.
Also some unit tests would help a lot to ensure we don't encounter
regressions like #30910.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49871#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list