From 8703a5e784497f6e83eb3bd90caf80c5ee913796 Mon Sep 17 00:00:00 2001 From: akito-38 Date: Tue, 22 Oct 2024 21:43:31 +0900 Subject: [PATCH 1/3] =?UTF-8?q?add=EF=BC=9A[=E3=82=AB=E3=82=B9=E3=82=BF?= =?UTF-8?q?=E3=83=A0=E5=88=86=E9=A1=9E=E3=83=AA=E3=82=B9=E3=83=88=20?= =?UTF-8?q?=E3=82=A6=E3=82=A3=E3=82=B8=E3=82=A7=E3=83=83=E3=83=88=20]=20?= =?UTF-8?q?=E6=98=87=E9=A0=86=E3=83=BB=E9=99=8D=E9=A0=86=E3=82=92=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/other-widget/widget-taxonomies.php | 25 ++++++++++++++++++++----- readme.txt | 6 ++++-- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/inc/other-widget/widget-taxonomies.php b/inc/other-widget/widget-taxonomies.php index 711683ec..2ac24bf6 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,9 +32,11 @@ function widget( $args, $instance ) { if ( ! isset( $instance['form_design'] ) ) { $instance['form_design'] = 'list'; } + if ( ! isset( $instance['form_sort'] ) ) { + $instance['form_sort'] = 'asc'; + } - ?>
@@ -53,6 +55,8 @@ function widget( $args, $instance ) { 'hierarchical' => true, 'title_li' => '', 'taxonomy' => $instance['tax_name'], + 'orderby' => 'title', + 'order' => $instance['form_sort'] ); $tax_args = apply_filters( 'veu_widget_taxlist_args', $tax_args ); // 9.13.0.0 @@ -76,6 +80,8 @@ function widget( $args, $instance ) { 'taxonomy' => $instance['tax_name'], 'name' => $name, 'value_field' => 'slug', + 'orderby' => 'title', + 'order' => $instance['form_sort'] ); $tax_args = apply_filters( 'veu_widget_taxlist_args', $tax_args ); // @@ -106,7 +112,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 +146,15 @@ function form( $instance ) { /> -

+ + +
+ + +