Post Meta Box Order V2

Post Meta Box Order version 2 comes with breaking changes.


Editing plugin source (before) unacceptably stupid approach and version 2 fixes this problem.

post_meta_box_order_force_override: If you want to force users? set it true



post_meta_box_order_hash: to change hash obviously.
Don’t forget, when hash changes, it will overwrite order that users have.


 add_filter('post_meta_box_order_hash', 'my_meta_box_order_hash' );

 function my_meta_box_order_hash( $default_hash ){
 	return '10072016foobarbaz';

post_meta_box_order_left_column: order items of left column


add_filter( 'post_meta_box_order_left_column', 'order_left_cols' );

function order_left_cols( $cols ) {
	array_unshift( $cols, 'slugdiv' );

	return $cols;

post_meta_box_order_right_column: order items of right column.

Sorry for breaking changes, I hate them but sometimes we need to break things to fix this kind of stupidness.




Published by Mustafa Uysal

troubleshooter at WPHandle and full-stack developer at the largest Turkish recipe website (#NYT)

Leave a comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: