Opened 8 years ago
Closed 8 years ago
#39059 closed defect (bug) (fixed)
Remove unnecessary `is_super_admin()` checks for editing others posts
Reported by: | flixos90 | Owned by: | flixos90 |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Role/Capability | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
This is part of the #37616 task. Since super admins have all capabilities anyway, the checks in wp-admin/edit-form-advanced.php
and wp-admin/includes/class-wp-posts-list-table.php
are not necessary.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
39059.diff looks good, @flixos90. Can we combine the first two
if
clauses now thatis_super_admin()
is removed?if ( post_type_supports($post_type, 'author') && current_user_can( .... ) )
That changes a bit more code, but leaves a cleaner read IMO.