Fix onchange value outside of widgets screen

This commit is contained in:
Robin Cornett
2019-06-25 12:35:58 -04:00
parent ff3fe360da
commit c54d7f78ee
+3 -1
View File
@@ -13,6 +13,8 @@ if ( empty( $instance ) ) {
$instance = include 'term-defaults.php';
}
$onchange = is_callable( $this, 'get_field_id ' ) ? sprintf( 'term_postback(\'%s\', this.value );', esc_attr( $this->get_field_id( 'term' ) ) ) : '';
/**
* Define term specific taxonomy fields.
*/
@@ -23,7 +25,7 @@ return array(
'id' => 'taxonomy',
'label' => __( 'Taxonomy:', 'display-featured-image-genesis' ),
'flex' => true,
'onchange' => sprintf( 'term_postback(\'%s\', this.value );', esc_attr( $this->get_field_id( 'term' ) ) ),
'onchange' => '',
'choices' => $tax_options,
),
),