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

WordPress Trac noreply at wordpress.org
Fri Jul 12 08:31:08 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 pento):

 So, we have a bit of a problem, because PHP doesn't do method overloading.

 Changing the method signature of `Walker::walk()` caused an explosion of
 PHP warnings on WordPress.org when I deployed this change. The code still
 works as expected, it's just a sub-optimal experience.

 Example: https://3v4l.org/2iS9g

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


More information about the wp-trac mailing list