[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:35:36 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:35 obenland]:
> [attachment:40702.ajax-fix.diff] fixes a bug where submitted locations
don't persist across page loads because the transient key doesn't get
generated correctly since location information is missing in the user
setting.
>
> @iandunn Does that look sane?
:facepalm:
I can't believe I missed that in testing. I guess sleep is kinda important
after all...
`40702.ajax-fix.diff` looks and tests good to me.
I played around with an alternative approach in `40702.ajax-fix.2.diff`,
but I think your patch is better. I like that mine avoids sending the
unnecessary data in the AJAX response, but I don't like that it duplicates
the location trimming statement in both `ajax-actions.php` and
`includes/dashboard.php`. I could make that a DRY function, but that seems
a bit overkill.
I think your patch is simpler, which makes it more maintainable.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40702#comment:37>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list