Lockdown the Visual Editor

Use the following code If you have completed your clients design and would prefer to lockdown the DMS Visual Editor, this will prevent your client from making any unwanted changes.

Admin Only Access

If you wish to lockdown the visual editor and only allow the admin access to the editor, open up your wp-config.php file and find the following code:

define('WP_DEBUG', false);

Add below that, the following code:

define( 'PL_EDITOR_LOCK', 'admin' );

Your changes will look similar to this:

define('WP_DEBUG', false);
define( 'PL_EDITOR_LOCK', 'admin' );

Save these changes and from now on, only the admin user will be able to access the Visual Editor.

Multiple User Access

If you work in a team and wish to have multiple users access to the Visual Editor but keep your client lockout, use this method. Open up your wp-config.php file and find the following code:

define('WP_DEBUG', false);

Add below that, the following code (remember to replace the usernames in the example below to your teams usernames):

define( 'PL_EDITOR_LOCK', 'andrew,bob,chris,daniel,eric' );

Your changes will look similar to this:

define('WP_DEBUG', false);
define( 'PL_EDITOR_LOCK', 'andrew,bob,chris,daniel,eric' );

Save these changes and from now on, only andrew, bob, chris, daniel and eric users will be able to access the Visual Editor.

If no users are defined, all users with edit_theme_options role will have access to the Visual Editor.