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

WordPress Trac noreply at wordpress.org
Wed May 10 23:30:12 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
-------------------------------------------------+-------------------------

Comment (by azaozz):

 Looking at 40702.6.diff, it seems really complicated. All that is needed
 here is a simple proxy to access the API at wp.org. Replacing ~20 lines of
 admin-ajax with ~500 lines of REST endpoints is.... too much? :)

 There seem to be a lot of "new" things. For example an admin can see
 another user/admin data. Don't see a good reason for this:
 {{{
  if ( $request['id'] !== get_current_user_id() ) {
     $user = get_userdata( $request['id'] );
     ....
 }}}

 Then, if the other user's data is not set, it will be set wrong according
 to the current user's IP.

 Another weakness perhaps is the need for `get_item_schema()`. Setting this
 means that the API at wp.org has to be more or less "frozen". What if we
 need to fix something there? I mean, this is a proxy, nothing more.
 Perhaps two REST controllers are too much? Starting to think this is not a
 very good example on how to use the REST API :)

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


More information about the wp-trac mailing list