Opened 10 years ago
Closed 10 years ago
#39059 closed defect (bug) (fixed)
Remove unnecessary `is_super_admin()` checks for editing others posts
| Reported by: | flixos90 | Owned by: | flixos90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.8 |
| Component: | Role/Capability | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | multisite |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
39059.diff looks good, @flixos90. Can we combine the first two
ifclauses 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.