-
Notifications
You must be signed in to change notification settings - Fork 566
Closed
Labels
Description
Expected Behavior:
Preview image would be removed after AJAX is done processing the new term addition
Actual Behavior:
Preview image retains, though the text field is cleared.
Steps to reproduce (I have confirmed I can reproduce this issue on the trunk branch):
- Use code below for quick setup.
- Add an image
- Add term
- Watch the preview not clear.
CMB2 Field Registration Code:
MAKE SURE TO CHANGE TAXONOMY.
add_action( 'cmb2_admin_init', 'cycle_metabox' );
function cycle_metabox() {
$adverts_box = new_cmb2_box( array(
'id' => $prefix . 'graphic_adverts',
'object_types' => array( 'term' ),
'taxonomies' => array( 'actor-hack' ),
) );
$banner_advert_id = $adverts_box->add_field( array(
'id' => $prefix . 'graphic_advert',
'description' => __( 'Used as default adverts for products in this category', 'nnn-products' ),
'type' => 'group',
'options' => array(
'group_title' => __( 'Advert {#}', 'nnn-products' ),
'add_button' => __( 'Add Another Advert', 'nnn-products' ),
'remove_button' => __( 'Remove Advert', 'nnn-products' ),
'sortable' => true,
),
) );
$adverts_box->add_group_field( $banner_advert_id, array(
'name' => __( 'Banner', 'nnn-products' ),
'id' => 'banner',
'type' => 'file',
) );
$adverts_box->add_group_field( $banner_advert_id, array(
'name' => __( 'Link', 'nnn-products' ),
'id' => 'link',
'type' => 'text_url',
) );
}