Post Meta Box Order version 2 comes with breaking changes.
Filters
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
Example:
[code] add_filter(‘post_meta_box_order_force_override’,’__return_true’);[/code]
post_meta_box_order_hash: to change hash obviously.
Don’t forget, when hash changes, it will overwrite order that users have.
Example:
[code]
add_filter(‘post_meta_box_order_hash’, ‘my_meta_box_order_hash’ );
function my_meta_box_order_hash( $default_hash ){
return ‘10072016foobarbaz’;
}
[/code]
post_meta_box_order_left_column: order items of left column
Example:
[code]
add_filter( ‘post_meta_box_order_left_column’, ‘order_left_cols’ );
function order_left_cols( $cols ) {
array_unshift( $cols, ‘slugdiv’ );
return $cols;
}
[/code]
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.
Cheers,
Leave a Reply