[glotpress-updates] [GlotPress] #272: API should always return json data and never the 404 of GlotPress itself

GlotPress noreply at wordpress.org
Wed Nov 13 21:22:10 UTC 2013


#272: API should always return json data and never the 404 of GlotPress itself
---------------------------+--------------------------
  Reporter:  markoheijnen  |      Owner:  markoheijnen
      Type:  enhancement   |     Status:  closed
  Priority:  normal        |  Milestone:  1.0
 Component:  general       |    Version:  0.1
Resolution:  fixed         |   Keywords:
---------------------------+--------------------------

Comment (by nbachiyski):

 We already have logic to send different content types to API requests.
 Unfortunately most of the current code was still using `gp_tmpl_*()`,
 instead of the `tmpl()` method of the route, so it couldn't reap the
 benefits.

 I thought this was a good time to switch to those and here is a patch.

 As a general rule the `gp_tmpl_*()` functions should be used only when we
 are outside of a route – inside other templates, or for example when we
 want to send 404 if we didn't find a route.

--
Ticket URL: <http://glotpress.trac.wordpress.org/ticket/272#comment:2>
GlotPress <http://glotpress.trac.wordpress.org>
Easy comin', easy goin'


More information about the glotpress-updates mailing list