[wp-trac] [WordPress Trac] #41146: Add filter for a site's class (WP_MS_Users_List_Table)
    WordPress Trac 
    noreply at wordpress.org
       
    Mon Jun 26 18:40:32 UTC 2017
    
    
  
#41146: Add filter for a site's class (WP_MS_Users_List_Table)
--------------------------------+------------------------------
 Reporter:  kraftbj             |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Networks and Sites  |     Version:
 Severity:  normal              |  Resolution:
 Keywords:  needs-patch         |     Focuses:  administration
--------------------------------+------------------------------
Changes (by desrosj):
 * keywords:  has-patch => needs-patch
Comment:
 Thanks for the initial patch @kraftbj. This sounds like a good addition.
 Some thoughts:
 - I think that this filter should pass an array of classes instead of a
 string. This will help prevent situations where someone adds a class but
 forgets to add a space, causing classes to bleed together.
 - The filter should be on its own line to make it more readable.
 - An `array_unique()` call would also help prevent duplicate classes.
 - Now that there is a filter, whatever value is output into the class
 attribute will need to be passed through `esc_attr()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41146#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list