[wp-trac] [WordPress Trac] #42066: List tables: consider a new method to generate the views links markup

WordPress Trac noreply at wordpress.org
Mon Jun 27 10:15:10 UTC 2022


#42066: List tables: consider a new method to generate the views links markup
-------------------------------------------------+-------------------------
 Reporter:  afercia                              |       Owner:  costdev
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.1
Component:  Administration                       |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing has-unit-    |     Focuses:
  tests dev-feedback                             |
-------------------------------------------------+-------------------------

Comment (by afercia):

 @costdev thanks for looking into this.

 > whether it should also cover the markup for class="current" aria-
 current="page" and instead change the "current" key to bool type.

 I'd say moving all the HTML to the new method would be cleaner.

 Aside:
 naming is hard. Other names in this context refer to 'views', 'get_views'
 so I'd propose to rename `get_admin_status_links` to `get_views_links`.

 As per backwards compatibility with plugins that extend the list table
 classes and with existing filters e.g. `apply_filters(
 "views_{$this->screen->id}", $views )` I definitely defer to your
 expertise.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/42066#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list