[wp-trac] [WordPress Trac] #63216: simplify get_role() method in WP_Roles class

WordPress Trac noreply at wordpress.org
Wed Apr 2 21:08:29 UTC 2025


#63216: simplify get_role() method in WP_Roles class
-----------------------------+------------------------------
 Reporter:  dilipbheda       |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Role/Capability  |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+------------------------------

Comment (by spacedmonkey):

 Thanks for your ticket @dilipbheda .

 There is a rule with WordPress core, that we do not commit refactors for
 the sake of refactors. There is lots of code and if we refactored for the
 sake of it, it would be never ending task.

 Can you provide more context why this change is needed, other than the
 code is cleaner. Is there a performance benefit?

 Please read this docs for more information.


 https://make.wordpress.org/core/handbook/contribute/code-refactoring/

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


More information about the wp-trac mailing list