[wp-trac] [WordPress Trac] #40702: Add WordCamps and meetup events to the News Dashboard widget
WordPress Trac
noreply at wordpress.org
Fri May 12 15:46:45 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 iandunn):
Replying to [comment:33 dd32]:
> [attachment:40702-duplicate-translations.diff] duplicates some of the
translations to be both within the HTML templates as well as within the JS
data array.
> Calling `wp_get_community_events_script_data()` just to fetch a static
string doesn't seem worthwhile.
I personally like it because it makes things DRY, which makes it more
maintainable and less prone to errors in the future. That's not a huge
deal, though, especially in this case. I don't have any objection to 40702
-duplicate-translations.diff being committed.
> [attachment:40702-localize.diff] seems clunky, and I think might fatal
in bulk mode (ie. `load-scripts.php?`). The proper way to do that would be
following the example of `wp_localize_jquery_ui_datepicker()` or
`wp_just_in_time_script_localization()` (although the latter lacks an is-
enqueued check, which it gets away with since it's not loading data).
I tested with `SCRIPT_DEBUG` set to `true` and `false`, and didn't notice
any errors. I agree that it's kind of clunky though.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40702#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list