[wp-trac] [WordPress Trac] #47678: Modernize/simplify current_user_can()

WordPress Trac noreply at wordpress.org
Mon Jul 15 21:54:28 UTC 2019


#47678: Modernize/simplify current_user_can()
-------------------------------------+-------------------------------------
 Reporter:  jrf                      |       Owner:  pento
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  5.3
Component:  Role/Capability          |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch has-unit-      |     Focuses:  performance, coding-
  tests commit                       |  standards
-------------------------------------+-------------------------------------

Comment (by peterwilsoncc):

 I've found WPdirectory does a slightly better job of finding code,
 searching `extends [A-Za-z_]*Walker` returns the following:

 * Themes: [https://wpdirectory.net/search/01DFVS3VNYJJR948DPTT9APEC1 1496
 matches]
 * Plugins: [https://wpdirectory.net/search/01DFVS7CTWSBHN2SYKF5F3BMR9 1127
 matches]

 As custom walkers are more common in themes, I'm concerned about breaking
 BC as themes are less likely to be open-source than plugins. Most sites
 run a custom theme.

 Custom walkers are required for relatively common features, for example
 adding data attributes and IDs to `Walker_Nav_Menu > ul` for use with
 generic JavaScript libraries.

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


More information about the wp-trac mailing list