[wp-trac] [WordPress Trac] #37616: Replace `is_super_admin()` calls with real capability checks

WordPress Trac noreply at wordpress.org
Mon Apr 10 22:00:01 UTC 2017


#37616: Replace `is_super_admin()` calls with real capability checks
-----------------------------+------------------------
 Reporter:  flixos90         |       Owner:
     Type:  task (blessed)   |      Status:  reviewing
 Priority:  normal           |   Milestone:  4.8
Component:  Role/Capability  |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:  multisite
-----------------------------+------------------------

Comment (by flixos90):

 In [changeset:"40406"]:
 {{{
 #!CommitTicketReference repository="" revision="40406"
 Multisite: Replace unnecessary `is_super_admin()` check when setting up
 the initial network.

 When using `is_super_admin()` in a non-multisite environment, the function
 is supposed to check for administrator capabilities. The process of
 querying all users and filtering them with that function can be optimized
 by only querying users with the administrator role instead.

 Fixes #40406. See #37616.
 }}}

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


More information about the wp-trac mailing list