ControlledChaos
3/12/2016 - 5:46 PM

Allow metabox dragging, but disable saving the new order on the server side.

Allow metabox dragging, but disable saving the new order on the server side.

<?php

function ccd_prevent_meta_box_order( $action ) {
   if ( 'meta-box-order' == $action /* && $wp_user == 'santa claus' */) {
      die( '-1' );
   }
}
add_action( 'check_ajax_referer', 'ccd_prevent_meta_box_order' );

?>

Disable Saving New Metabox Position

WordPress Snippet