mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 05:04:31 +00:00
Add unfiltered_upload cap, and allow for admins. Props Nazgul. fixes #4136
git-svn-id: https://develop.svn.wordpress.org/trunk@5303 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -262,6 +262,7 @@ function populate_options() {
|
||||
function populate_roles() {
|
||||
populate_roles_160();
|
||||
populate_roles_210();
|
||||
populate_roles_230();
|
||||
}
|
||||
|
||||
function populate_roles_160() {
|
||||
@@ -395,4 +396,12 @@ function populate_roles_210() {
|
||||
}
|
||||
}
|
||||
|
||||
function populate_roles_230() {
|
||||
$role = get_role( 'administrator' );
|
||||
|
||||
if ( !empty( $role ) ) {
|
||||
$role->add_cap( 'unfiltered_upload' );
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user