[wp-trac] [WordPress Trac] #40748: Use REST API for Community Events

WordPress Trac noreply at wordpress.org
Sun May 14 20:09:29 UTC 2017


#40748: Use REST API for Community Events
-------------------------------------------------+-------------------------
 Reporter:  iandunn                              |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  REST API                             |  Release
 Severity:  normal                               |     Version:  trunk
 Keywords:  has-patch dev-feedback needs-unit-   |  Resolution:
  tests                                          |     Focuses:  javascript
-------------------------------------------------+-------------------------
Changes (by azaozz):

 * milestone:  4.8.1 => Future Release


Comment:

 Looking at the REST API patches on #40702, think there is a
 misunderstanding here. Why is the scope so much expanded and the
 functionality so different when trying to switch from admin-ajax to REST?

 Generally the scope for this bit of code is to do one thing only: return a
 little bit of data once per page load for use in the "WordPress Events and
 News" dashboard widget. Everything else is pretty pointless at this stage.

 - It is not meant to be a general use REST API endpoint.
 - It is not meant to be used by plugins and themes for any other purpose.
 - It is not meant to make all WP installs into proxies to access
 geolocation data from wordpress.org's API.
 - It is not meant to support any form of arbitrary usage.

 It is meant to do only one thing: provide a small amount of data for the
 dashboard widget.

 On top of that I think this conversion sends out the wrong message. No
 matter how I try to look at it, the example is negative. It replaces '''24
 lines''' of simple, straightforward, easy to read and understand code with
 exactly '''498 lines''' of much more complex, harder to read and
 understand code contained in two new files! In addition the new code seems
 to introduce bugs, edge cases and unneeded functionality. How can we
 expect plugin authors to want to do something like that in their plugins?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40748#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list