[wp-trac] [WordPress Trac] #38342: Quick Draft: Leverage REST API endpoints
WordPress Trac
noreply at wordpress.org
Sat Nov 19 19:59:58 UTC 2016
#38342: Quick Draft: Leverage REST API endpoints
---------------------------------+-----------------------------------
Reporter: adamsilverstein | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: has-patch 4.8-early | Focuses: javascript, rest-api
---------------------------------+-----------------------------------
Comment (by joehoyle):
Added a new patch building on @adamsilverstein's latest one with:
1. Fix date/timezone offsets by passing the offset via
`wp_localize_script`.
2. Remove the WP_Query for the place holder count, instead hardcoding to
`1`.
For the filter, I think the solution here is fine - but we might want to
move it somewhere else, having said that we can't put it anywhere in the
admin files of course as the API request is outside of this context, so I
don't think it matters too much.
I'm also happy with formatting the date via `Intl` (see
caniuse.com/#search=Intl) as it's fairly well supported, and luckily, the
fallback works well given we only need the date.
I think this is looking actually very complete at this point - great work
so far. I'd like to see if we can remove
`wp_dashboard_get_recent_drafts_js_template` from being generated in PHP,
and instead put it in a JS file, like our other backbone templates. I'll
have a go at doing that next.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38342#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list