taxonomy = esc_attr( $our_taxonomy ); $tax_args = array( 'hierarchical' => 0, 'taxonomy' => $this->taxonomy, ); $all_taxonomies = get_categories( $tax_args ); $choices = array(); $choices[0] = esc_html__( '— Select —', 'ns-customizer-utilities' ); if ( ! empty( $all_taxonomies ) && ! is_wp_error( $all_taxonomies ) ) { foreach ( $all_taxonomies as $tax ) { $choices[ $tax->term_id ] = $tax->name; } } $this->choices = $choices; parent::__construct( $manager, $id, $args ); } }