Skip to content

Commit 10ad463

Browse files
author
Nikola Miljković
committed
Release 2.15.12
2 parents 8173124 + eedccea commit 10ad463

7 files changed

Lines changed: 58 additions & 9 deletions

File tree

assets/css/partials/_shortcodes.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ $overcast-color : #ff8800;
2424

2525
.subscribe {
2626
text-align: center;
27+
margin: 0;
2728

2829
li {
2930
display: inline-block;

assets/css/sermon.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/sermon.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/class-sm-dates-wp.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,39 @@ public static function save_terms_dates( $post_ID, $post, $update ) {
137137
$original_terms = $GLOBALS['sm_original_terms'];
138138
$updated_terms = isset( $_POST['tax_input'] ) ? $_POST['tax_input'] : null;
139139

140+
// Convert terms to term array of term IDs if it's not already that way.
141+
foreach ( $updated_terms as $taxonomy => $terms ) {
142+
if ( is_string( $terms ) ) {
143+
if ( '' === $terms ) {
144+
$updated_terms[ $taxonomy ] = array();
145+
continue;
146+
}
147+
148+
if ( strpos( $terms, ',' ) !== false ) {
149+
$terms = explode( ',', $terms );
150+
$terms = array_filter( $terms, 'trim' );
151+
}
152+
153+
if ( ! is_array( $terms ) ) {
154+
$terms = array( $terms );
155+
}
156+
157+
$updated_terms[ $taxonomy ] = array();
158+
159+
foreach ( $terms as $term ) {
160+
if ( is_int( $term ) ) {
161+
continue 1;
162+
}
163+
164+
$term = get_term_by( 'slug', $term, $taxonomy );
165+
166+
if ( ! $term instanceof WP_Error && $term && isset( $term->term_id ) ) {
167+
$updated_terms[ $taxonomy ][] = $term->term_id;
168+
}
169+
}
170+
}
171+
}
172+
140173
$updated_terms += array_fill_keys( sm_get_taxonomies(), array() );
141174

142175
if ( ! $updated_terms ) {

includes/sm-template-functions.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function render_wpfc_sorting( $args = array() ) {
6060
$action = '';
6161

6262
// Filters HTML fields data.
63-
$filters = array(
63+
$filters = apply_filters( 'render_wpfc_sorting_filters', array(
6464
array(
6565
'className' => 'sortPreacher',
6666
'taxonomy' => 'wpfc_preacher',
@@ -86,15 +86,15 @@ function render_wpfc_sorting( $args = array() ) {
8686
'taxonomy' => 'wpfc_service_type',
8787
'title' => __( 'Service Type', 'sermon-manager-for-wordpress' ),
8888
),
89-
);
89+
) );
9090

91-
$visibility_mapping = array(
91+
$visibility_mapping = apply_filters( 'render_wpfc_sorting_visibility_mapping', array(
9292
'wpfc_sermon_topics' => 'hide_topics',
9393
'wpfc_sermon_series' => 'hide_series',
9494
'wpfc_preacher' => 'hide_preachers',
9595
'wpfc_bible_book' => 'hide_books',
9696
'wpfc_service_type' => 'hide_service_types',
97-
);
97+
) );
9898

9999
// Save orig args for filters.
100100
$orig_args = $args;
@@ -607,7 +607,18 @@ function wpfc_get_term_dropdown( $taxonomy, $default = '' ) {
607607
$html .= '<option value="' . $term->slug . '" ' . ( ( '' === $default ? $current_slug === $term->slug : $default === $term->slug ) ? 'selected' : '' ) . '>' . $term->name . '</option>';
608608
}
609609

610-
return $html;
610+
/**
611+
* Allows you to filter the dropdown options (HTML).
612+
*
613+
* @var string $html The existing HTML.
614+
* @var array $taxonomy The taxonomy that is being used.
615+
* @var string $default The forced default value. See function PHPDoc.
616+
* @var array $terms The array of terms, books will already be ordered.
617+
* @var string $current_slug The term that is being requested.
618+
*
619+
* @since 2.15.12
620+
*/
621+
return apply_filters( 'wpfc_get_term_dropdown', $html, $taxonomy, $default, $terms, $current_slug );
611622
}
612623

613624
/**

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: church, sermon, sermons, preaching, podcasting, manage, managing, podcasts
55
Requires at least: 4.7.0
66
Tested up to: 5.0
77
Requires PHP: 5.3
8-
Stable tag: 2.15.11
8+
Stable tag: 2.15.12
99
License: GPLv2
1010
License URI: https://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -122,6 +122,10 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man
122122
2. Sermon Files
123123

124124
## Changelog ##
125+
### 2.15.12 ###
126+
* Fix: Fatal error when saving a sermon
127+
* Fix: Podcast buttons shortcode has unnecessary left margin (thanks @macbookandrew!)
128+
125129
### 2.15.11 ###
126130
* New: Add support for "The7" theme
127131
* Change: Add "sermon" order to [sermon_images] shortcode. It will order the series by newest sermon

sermons.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Sermon Manager for WordPress
44
* Plugin URI: https://www.wpforchurch.com/products/sermon-manager-for-wordpress/
55
* Description: Add audio and video sermons, manage speakers, series, and more.
6-
* Version: 2.15.11
6+
* Version: 2.15.12
77
* Author: WP for Church
88
* Author URI: https://www.wpforchurch.com/
99
* Requires at least: 4.5

0 commit comments

Comments
 (0)