diff --git a/includes/functions/metadata.php b/includes/functions/metadata.php index 144c439..c7284a9 100644 --- a/includes/functions/metadata.php +++ b/includes/functions/metadata.php @@ -362,9 +362,21 @@ function register_meta() { function resource_data_init() { $prefix = 'lc_resource_'; + $term_info = new_cmb2_box( + [ + 'id' => 'term_info', + 'title' => __( 'Tag Information', 'coop-library-framework' ), + 'object_types' => [ 'term' ], + 'taxonomies' => [ 'lc_goal', 'lc_topic' ], + 'context' => 'normal', + 'priority' => 'high', + 'show_names' => true, + ] + ); + $general_info = new_cmb2_box( [ - 'id' => '01_resource_data', + 'id' => '01_general_info', 'title' => __( 'General Information', 'coop-library-framework' ), 'object_types' => [ 'lc_resource' ], 'context' => 'normal', @@ -428,6 +440,17 @@ function resource_data_init() { ] ); + $term_info->add_field( + [ + 'name' => __( 'Order', 'coop-library-framework' ), + 'description' => __( 'The numeric order of this tag.', 'coop-library-framework' ), + 'id' => 'lc_term_order', + 'type' => 'text', + 'default' => 0, + 'sanitize_cb' => 'intval', + ] + ); + $general_info->add_field( [ 'name' => __( 'Favorites', 'coop-library-framework' ),