public function setSequentialPosition($position, MetaDataBinding $context)
    {
        add_action('do_meta_boxes', function ($post_type) use ($position, $context) {
            global $wp_meta_boxes;

            if ($context->getBindingName() !== $post_type) {
                return;
            }

            foreach ($wp_meta_boxes[$post_type]['side']['core'] as $key => $metaBox) {
                // Don't replace our recently positioned taxonomy
                if (preg_match('/^understory-taxonomy.+/', $key)) {
                    continue;
                }

                if (
                    is_array($metaBox)
                    && isset($metaBox['args'])
                    && is_array($metaBox['args'])
                    && isset($metaBox['args']['taxonomy'])
                    && $metaBox['args']['taxonomy'] === $this->getBindingName()
                ) {
                    $wp_meta_boxes[$post_type]['side']['core']['understory-taxonomy' . $position] = $metaBox;
                    unset($wp_meta_boxes[$post_type]['side']['core'][$key]);

                }

            }
        }, 10000, 1);
    }
public function setSequentialPosition($position, MetaDataBinding $context)
    {
        add_action('do_meta_boxes', function ($post_type) use ($position, $context) {
            global $wp_meta_boxes;

            if ($context->getBindingName() !== $post_type) {
                return;
            }

            foreach ($wp_meta_boxes[$post_type]['side']['core'] as $key => $metaBox) {
                // Don't replace our recently positioned taxonomy
                if (preg_match('/^understory-taxonomy.+/', $key)) {
                    continue;
                }

                if (
                    is_array($metaBox)
                    && isset($metaBox['args'])
                    && is_array($metaBox['args'])
                    && isset($metaBox['args']['taxonomy'])
                    && $metaBox['args']['taxonomy'] === $this->getBindingName()
                ) {
                    $wp_meta_boxes[$post_type]['side']['core']['understory-taxonomy' . $position] = $metaBox;
                    unset($wp_meta_boxes[$post_type]['side']['core'][$key]);

                }

            }
        }, 10000, 1);
    }
public function setSequentialPosition ( $ position , MetaDataBinding $ context ) { add_action ( 'do_meta_boxes' , function ( $ post_type ) use ( $ position , $ context ) { global $ wp_meta_boxes ; if ( $ context -> getBindingName ( ) !== $ post_type ) { return ; } foreach ( $ wp_meta_boxes [ $ post_type ] [ 'side' ] [ 'core' ] as $ key => $ metaBox ) { // Don't replace our recently positioned taxonomy if ( preg_match ( '/^understory-taxonomy.+/' , $ key ) ) { continue ; } if ( is_array ( $ metaBox ) && isset ( $ metaBox [ 'args' ] ) && is_array ( $ metaBox [ 'args' ] ) && isset ( $ metaBox [ 'args' ] [ 'taxonomy' ] ) && $ metaBox [ 'args' ] [ 'taxonomy' ] === $ this -> getBindingName ( ) ) { $ wp_meta_boxes [ $ post_type ] [ 'side' ] [ 'core' ] [ 'understory-taxonomy' . $ position ] = $ metaBox ; unset ( $ wp_meta_boxes [ $ post_type ] [ 'side' ] [ 'core' ] [ $ key ] ) ; } } } , 10000 , 1 ) ; }
Sets the Taxonomy Meta Box Order.
@param $position
@param MetaDataBinding $context
Sets the Taxonomy Meta Box Order .