Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action(
- 'add_meta_boxes_test',
- function () {
- $taxonomy = array('tax_test1', 'tax_test2', 'tax_test3', 'tax_test4', 'tax_test5', 'tax_test6', 'tax_test7');
- $taxDivs = array('tagsdiv-tax_test1', 'tagsdiv-tax_test2', 'tagsdiv-tax_test3', 'tagsdiv-tax_test4', 'tagsdiv-tax_test5', 'tagsdiv-tax_test6', 'tagsdiv-tax_test7');
- foreach( $taxDivs as $div )
- remove_meta_box( $div, 'cpt_test_type', 'side' );
- foreach( $taxonomy as $tax ) {
- $tmpTax = get_taxonomy( $tax );
- $label = $tmpTax->labels->name;
- $tax_meta_box_id = $tax . 'div';
- add_meta_box(
- $tax_meta_box_id,
- $label,
- $tmpTax->meta_box_cb
- );
- }
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement