public function __construct()
    {
        $query_args = Meta_Box_Attribute::get_attribute_content('key_value', 'query_args');
        $taxonomy = '<p class="description description-thin">
			<label for="{{field.id}}_taxonomy">Taxonomy</label>
			<select ng-model="field.options.taxonomy" class="form-control" id="{{field.id}}_taxonomy">';
        foreach (mbb_get_taxonomies() as $taxonomy) {
            $taxonomy .= '<option value="' . $taxonomy . '">' . $taxonomy . '</option>';
        }
        $taxonomy .= '</select></p>';
        $field_type = '<label for="{{field.id}}_type">Field Type <br />
				<select ng-model="field.options.type" class="form-control" id="{{field.id}}_type">
					<option value="select">Select</option>
					<option value="select_tree">Select Tree</option>
					<option value="select_advanced">Select Advanced</option>
					<option value="checkbox_list">Checkbox List</option>
					<option value="checkbox_tree">Checkbox Tree</option>
				</select>
			</label>';
        $this->basic = array('id', 'name', 'desc', 'taxonomy' => array('type' => 'custom', 'content' => $taxonomy), 'field_type' => array('type' => 'custom', 'content' => $field_type), 'clone' => 'checkbox', 'parent' => 'checkbox');
        $args = Meta_Box_Attribute::get_attribute_content('key_value', 'options.args');
        $this->advanced['args'] = array('type' => 'custom', 'content' => $args, 'size' => 'wide');
        parent::__construct();
    }
function mbb_get_terms()
{
    $terms = array();
    $taxonomies = mbb_get_taxonomies();
    $taxes = array();
    foreach ($taxonomies as $tax) {
        if ($tax === 'post_format') {
            continue;
        }
        $taxes[] = $tax;
    }
    $items = get_terms($taxes);
    $hierachy = array();
    foreach ($items as $item) {
        $hierachy[$item->taxonomy][$item->term_id] = $item->name;
    }
    return $hierachy;
}