diff --git a/inc/other-widget/widget-taxonomies.php b/inc/other-widget/widget-taxonomies.php index 711683ec..a65ac4f1 100644 --- a/inc/other-widget/widget-taxonomies.php +++ b/inc/other-widget/widget-taxonomies.php @@ -22,7 +22,7 @@ public static function veu_widget_description() { function widget( $args, $instance ) { $instance = static::get_defaults( $instance ); - + if ( ! isset( $instance['tax_name'] ) ) { $instance['tax_name'] = 'category'; } @@ -32,10 +32,10 @@ function widget( $args, $instance ) { if ( ! isset( $instance['form_design'] ) ) { $instance['form_design'] = 'list'; } - - - - ?> + if ( ! isset( $instance['form_sort'] ) ) { + $instance['form_sort'] = 'asc'; + } + ?>
@@ -53,6 +53,8 @@ function widget( $args, $instance ) { 'hierarchical' => true, 'title_li' => '', 'taxonomy' => $instance['tax_name'], + 'orderby' => 'name', + 'order' => $instance['form_sort'] ); $tax_args = apply_filters( 'veu_widget_taxlist_args', $tax_args ); // 9.13.0.0 @@ -76,6 +78,8 @@ function widget( $args, $instance ) { 'taxonomy' => $instance['tax_name'], 'name' => $name, 'value_field' => 'slug', + 'orderby' => 'name', + 'order' => $instance['form_sort'] ); $tax_args = apply_filters( 'veu_widget_taxlist_args', $tax_args ); // @@ -106,7 +110,7 @@ public static function get_defaults( $instance = array() ) { function form( $instance ) { $instance = static::get_defaults( $instance ); $taxs = get_taxonomies( array( 'public' => true ), 'objects' ); - ?> +?>
@@ -140,7 +144,15 @@ function form( $instance ) { /> -

+ + +
+ + +