From 82a23c5d01ae795630e143cf54250889fec2fddd Mon Sep 17 00:00:00 2001 From: Robin Cornett Date: Sat, 16 Nov 2019 16:20:03 -0500 Subject: [PATCH] Fix dynamic widget term field --- includes/widgets/fields/term-taxonomy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/widgets/fields/term-taxonomy.php b/includes/widgets/fields/term-taxonomy.php index 5f835bc..a11f85d 100644 --- a/includes/widgets/fields/term-taxonomy.php +++ b/includes/widgets/fields/term-taxonomy.php @@ -13,7 +13,7 @@ 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' ) ) ) : ''; +$onchange = method_exists( $this, 'get_field_id' ) ? sprintf( 'term_postback(\'%s\', this.value );', esc_attr( $this->get_field_id( 'term' ) ) ) : ''; /** * Define term specific taxonomy fields. @@ -25,7 +25,7 @@ return array( 'id' => 'taxonomy', 'label' => __( 'Taxonomy:', 'display-featured-image-genesis' ), 'flex' => true, - 'onchange' => '', + 'onchange' => $onchange, 'choices' => $tax_options, ), ),