Doc WordPress WordPress Tricks, Tips & Snippets


Prevent change of positions of admin meta boxes

For some clients I prefer to really lock down the WordPress admin. They get confused if they accidently move one of the many meta boxes in the backend and then they'll call and tell me that the system wouldn't work anymore. So I was gald to find this little snippet which will prevent that any change of the meta boxes will be saved:

/* Prevent Save of backend Meta Box positions */
 add_action('check_ajax_referer', 'prevent_meta_box_order');
function prevent_meta_box_order($action) {
	if ('meta-box-order' == $action ) {

Just put this in your functions.php and you're set!

Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.