Skip to content

Commit 02879b5

Browse files
author
Nikola Miljković
committed
Fix taxonomy list shortcode arguments
Fixes #214
1 parent 5784e6f commit 02879b5

4 files changed

Lines changed: 13 additions & 6 deletions

File tree

includes/admin/sm-cmb-functions.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ function cmb2_get_term_options( $taxonomy = 'category' ) {
156156
'hide_empty' => false,
157157
);
158158

159-
$terms = (array) get_terms( $taxonomy, $args );
159+
$terms = (array) get_terms(
160+
array(
161+
'taxonomy' => $taxonomy,
162+
) + $args );
160163

161164
// Initialize an empty array.
162165
$term_options = array();

includes/class-sm-shortcodes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ public function display_images( $atts = array() ) {
417417
// Default args.
418418
$args = array(
419419
'display' => 'series',
420-
'order' => 'DESC',
420+
'order' => 'ASC',
421421
'orderby' => 'name',
422422
'size' => 'sermon_medium',
423423
'hide_title' => false,

includes/vendor/taxonomy-images/public-filters.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ function sermon_images_plugin_get_terms( $default, $args = array() ) {
9494
return array();
9595
}
9696

97-
$terms = get_terms( $args['taxonomy'], $args['term_args'] );
97+
$terms = get_terms(
98+
array(
99+
'taxonomy' => $args['taxonomy'],
100+
) + $args['term_args'] );
98101
if ( is_wp_error( $terms ) ) {
99102
return array();
100103
}

readme.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,12 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man
104104

105105
## Changelog ##
106106
### 2.13.1 ###
107-
* New: Support for OceanWP theme
108107
* New: Add `list_podcasts` shortcode (thanks @macbookandrew!)
109-
* Fix: Wrappers do not get overriden
110-
* Fix: Feed showing PHP notice in some rare cases
108+
* New: Support for OceanWP theme
111109
* Fix: Archive page slug not applying
110+
* Fix: Feed showing PHP notice in some rare cases
111+
* Fix: Taxonomy list/images ignoring arguments
112+
* Fix: Wrappers do not get overriden
112113

113114
### 2.13.0 ###
114115
* New: Add a simpler way of overriding sermon render

0 commit comments

Comments
 (0)