[wp-trac] [WordPress Trac] #40702: Add WordCamps and meetup events to the News Dashboard widget

WordPress Trac noreply at wordpress.org
Wed May 10 22:32:38 UTC 2017

#40702: Add WordCamps and meetup events to the News Dashboard widget
 Reporter:  iandunn                              |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  4.8
Component:  Administration                       |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  needs-dev-note has-patch needs-      |     Focuses:
  unit-tests dev-feedback                        |  javascript, rest-api
Changes (by flixos90):

 * keywords:  needs-dev-note => needs-dev-note has-patch needs-unit-tests


 As discussed earlier today, while the primary priority was to get the
 feature ready for merge (which it apparently is now), it's desired that
 this feature should use the REST API. It would be a great example of how
 the API can be leveraged for admin functionality, and I honestly don't
 think we should use `admin-ajax.php` for a new feature like that.

 The original patches included a quickly-created proxy endpoint. During
 today's REST API chat this approach was discussed, and we came to the
 conclusion that instead a proper `WP_REST_Controller` class should be
 implemented and in addition, the endpoint should be split into two
 separate endpoints, as it was previously returning two types of resources
 (first a location resource, then a list of event resources). We decided to
 go for `community-events/events` and `community-events/location` and
 furthermore agreed that the events endpoint should be embeddable inside
 the location endpoint, so that the dashboard widget can still leverage
 only one API request.

 [attachment:40702.6.diff] introduces these two REST controllers and
 replaces the `admin-ajax.php` approach with a proper REST API approach,
 which is a lot more flexible and can be an example of how we can leverage
 the REST API for admin components in the future.

 I'm positive that we can do the necessary work to improve this feature and
 merge the endpoint by Friday in time for Beta 1. I will work on unit tests
 for the controller tomorrow.

Ticket URL: <https://core.trac.wordpress.org/ticket/40702#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list