From deedcf4a87668513f7facba3745ba644cfc6fa09 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Thu, 9 Nov 2023 18:24:33 +0100 Subject: [PATCH] update deprecated get_terms() syntax The old-style syntax was deprecated in WP 4.5. We already require 4.7, so there is no need to keep the deprecated parameter style. --- includes/class-widget.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/class-widget.php b/includes/class-widget.php index 11c51bb..1a1c65c 100644 --- a/includes/class-widget.php +++ b/includes/class-widget.php @@ -146,7 +146,13 @@ class Widget extends WP_Widget { $highlight = isset( $instance['highlight'] ) ? esc_attr( $instance['highlight'] ) : '0'; $highlight_time = isset( $instance['highlight_time'] ) ? esc_attr( $instance['highlight_time'] ) : '0'; $ajax = isset( $instance['ajax'] ) ? esc_attr( $instance['ajax'] ) : '0'; - $categories = get_terms( 'scliveticker_ticker', 'orderby=name&order=ASC' ); + $categories = get_terms( + array( + 'taxonomy' => 'scliveticker_ticker', + 'orderby' => 'name', + 'order' => 'ASC', + ) + ); include SCLIVETICKER_DIR . 'views/widget-form.php'; }