[wp-trac] [WordPress Trac] #40702: Add WordCamps and meetup events to the News Dashboard widget
WordPress Trac
noreply at wordpress.org
Wed May 10 12:34:27 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: has-patch has-unit-tests | Focuses: javascript, rest-api
--------------------------------------+-----------------------------------
Comment (by swissspidy):
I agree with `wp_get_nearby_events()`. This shouldn't be added to core.
The upgrade routine should be enough, but I also recommend updating the
plugin as well. Most of the ~40 users will update it pretty quickly I
think.
Translator comments are usually written a bit different. I'd write
something like this
{{{
/* translators: 1: the city the user searched for, 2: meetup organization
documentation URL */
}}}
The URL itself doesn't need a translator comment as there's no placeholder
in it.
Few other observations:
* There's a typo in the short description of the
`maybe_anonymize_ip_address()` method (missing 'to').
* The `@return` lines shouldn't be aligned with the params.
* `true` and `false` in the docblocks shouldn't be in backticks.
* In dashboard.js, I think `$container.on( 'click', '.community-events-
toggle-location', app.toggleLocationForm );` and `$container.on( 'click',
'.community-events-cancel', app.toggleLocationForm ); ` can be combined by
using a `.community-events-toggle-location, .community-events-cancel'`
selector.
* The short descriptions in the docblocks in the JS need full stops at the
end.
* `rest_get_community_events_permissions_check()` is missing an `@since`
annotation
* To be more consistent with our REST routes, I feel like the community
events rest route should be in its own controller class, just like the
others. Right now it's a pretty odd exception.
* … that way it would also be better testable. Right now there aren't any
tests at all for that REST API endpoint.
See https://make.wordpress.org/core/handbook/best-practices/inline-
documentation-standards/ for help with the inline docs.
---
FYI I also mentioned some other things on the make/core post that aren't
strictly related to this patch.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40702#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list