Skip to content

Allows you to control who has file editor capabilities in the WordPress admin.

Notifications You must be signed in to change notification settings

mannieschumpert/file-editor-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

File Editor Control

Allows you to control who has file editor capabilities in the WordPress admin.

Usage

There's no UI. In your functions.php, add a filter that returns an array of user IDs that are allowed to edit files.

Of course you can always just copy the plugin code and put it in your functions directly.

Examples

Prevent all file editor access by passing an empty array:

add_filter( 'fec_allowed_file_editors', 'my_allowed_file_editors' );
function my_allowed_file_editors( $allowed_editors ){

	return array();
}

Change allowed users:

add_filter( 'fec_allowed_file_editors', 'my_allowed_file_editors' );
function my_allowed_file_editors( $allowed_editors ){

	return array( 2, 4 );
}

Reference

See my article for more info about this sort of functionality:

WordPress Capabilities Magic

About

Allows you to control who has file editor capabilities in the WordPress admin.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages