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

WordPress Trac noreply at wordpress.org
Thu May 18 06:10:54 UTC 2017


#40702: Add WordCamps and meetup events to the News Dashboard widget
----------------------------+-----------------------------------
 Reporter:  iandunn         |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  4.8
Component:  Administration  |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  javascript, rest-api
----------------------------+-----------------------------------

Comment (by iandunn):

 [attachment:40702-geoip.2.diff] is a work in progress which tries to
 provide a better UX when the location is determined via IP geolocation.

 The API can't return the location for those requests (see #meta2823), so
 as of [meta5499], it just returns an `ip` param to let the client know
 that the location was successfully determined based on the IP address.
 Since the client doesn't know the name of the location, though, it has to
 show the user generic messages now.

 I think the UX is good, but the code still feels a bit clunky. I don't see
 a simpler way at the moment, though. I'd love to get some more eyes on it,
 and testing.

 In order to test it, you'll need to add this to an mu-plugin:

 {{{
 // test 40702-geoip.2.diff
 function change_user_agent( $agent ) {
         return str_replace( '4.8-beta1', '4.8-beta2', $agent );
 }
 add_filter( 'http_headers_useragent', 'change_user_agent' );
 }}}

 I'm also working on a `40702-geoip.3.diff`, which handles the additional
 case where a location is determined based on a user search, then saved,
 then the transient expires. In those cases, the client sends the
 coordinates in order to fetch new events, but the API doesn't return the
 location description anymore, so Core has to re-use the description it
 already has. That patch isn't in a usable state yet, though.

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


More information about the wp-trac mailing list