[wp-trac] [WordPress Trac] #63216: simplify get_role() method in WP_Roles class
WordPress Trac
noreply at wordpress.org
Wed Apr 2 06:45:05 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 | Keywords: has-patch
Focuses: |
-----------------------------+-----------------------------
This update simplifies the `get_role()` method in the `WP_Roles` class by
removing an unnecessary `else` block. The method now directly returns
`null` when the role is not found, improving readability and maintaining
consistency with WordPress coding standards.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63216>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list