[wp-trac] [WordPress Trac] #41146: Add filter for a site's class (WP_MS_Users_List_Table)
WordPress Trac
noreply at wordpress.org
Wed Mar 20 15:12:33 UTC 2019
#41146: Add filter for a site's class (WP_MS_Users_List_Table)
--------------------------------+-----------------------------
Reporter: kraftbj | Owner: kraftbj
Type: enhancement | Status: accepted
Priority: normal | Milestone: 5.2
Component: Networks and Sites | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: administration
--------------------------------+-----------------------------
Comment (by kraftbj):
Thanks @johnjamesjacoby and my apologies for overlooking the notification.
I agree on all fronts. I refreshed the patch since it didn't apply cleanly
anymore and added:
1. array_map with sanitize_html_class the values before output.
2. moved the array_unique to have two twice-nested calls instead of the
one with three.
3. conditional that verified that the array was an array and was not empty
4. left if outputting a span to avoid complicating the closing and to
preserve the same DOM tree as some defensive BC for someone CSSing based
on the element, not classes/ids.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41146#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list