From 81781a2699bb18db9ed7222e476dd625ca8ca03a Mon Sep 17 00:00:00 2001 From: Nikola Date: Wed, 24 Jan 2018 08:28:07 +0100 Subject: [PATCH 1/5] Remove accidentally added search form from PR #159 --- includes/shortcodes.php | 10 ---------- readme.txt | 3 +++ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/includes/shortcodes.php b/includes/shortcodes.php index a2952e0..a87b8b9 100755 --- a/includes/shortcodes.php +++ b/includes/shortcodes.php @@ -880,16 +880,6 @@ function displaySermons( $atts = array() ) { if ( $query->have_posts() ) { ob_start(); ?>
-
have_posts() ): ?> the_post(); diff --git a/readme.txt b/readme.txt index 62508d7..8af20bd 100755 --- a/readme.txt +++ b/readme.txt @@ -102,6 +102,9 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man 2. Sermon Files ## Changelog ## +### 2.11.2 ### +* Change: Remove accidentally added search form from PR #159 + ### 2.11.1 ### * Fix: Fatal error on update because of not-loaded function From a3e1d763f8ab9b5cf44b621099b3486bdc1b9026 Mon Sep 17 00:00:00 2001 From: Nikola Date: Wed, 24 Jan 2018 09:00:15 +0100 Subject: [PATCH 2/5] Fix attachments download --- includes/template-tags.php | 6 +++--- readme.txt | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/template-tags.php b/includes/template-tags.php index 519655b..251f052 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -443,13 +443,13 @@ function wpfc_sermon_attachments() { $html = '
'; $html .= '

' . __( 'Download Files', 'sermon-manager-for-wordpress' ) . ''; if ( get_wpfc_sermon_meta( 'sermon_audio' ) ) { - $html .= '' . __( 'MP3', 'sermon-manager-for-wordpress' ) . ''; + $html .= '' . __( 'MP3', 'sermon-manager-for-wordpress' ) . ''; } if ( get_wpfc_sermon_meta( 'sermon_notes' ) ) { - $html .= '' . __( 'Notes', 'sermon-manager-for-wordpress' ) . ''; + $html .= '' . __( 'Notes', 'sermon-manager-for-wordpress' ) . ''; } if ( get_wpfc_sermon_meta( 'sermon_bulletin' ) ) { - $html .= '' . __( 'Bulletin', 'sermon-manager-for-wordpress' ) . ''; + $html .= '' . __( 'Bulletin', 'sermon-manager-for-wordpress' ) . ''; } $html .= '

'; $html .= '
'; diff --git a/readme.txt b/readme.txt index 8af20bd..40dc7ba 100755 --- a/readme.txt +++ b/readme.txt @@ -104,6 +104,7 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man ## Changelog ## ### 2.11.2 ### * Change: Remove accidentally added search form from PR #159 +* Fix: Attachments not being downloaded when clicked on them ### 2.11.1 ### * Fix: Fatal error on update because of not-loaded function From 2a1efdaffc063daebb6d36c97a7c81db7b54c12a Mon Sep 17 00:00:00 2001 From: Nikola Date: Wed, 24 Jan 2018 20:04:36 +0100 Subject: [PATCH 3/5] Fix sermon dates not saving --- includes/class-sm-dates-wp.php | 2 +- readme.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/class-sm-dates-wp.php b/includes/class-sm-dates-wp.php index 78552e9..ecacd65 100644 --- a/includes/class-sm-dates-wp.php +++ b/includes/class-sm-dates-wp.php @@ -176,7 +176,7 @@ public static function maybe_update_date( $post_ID, $post, $update ) { if ( $update ) { // compare sermon date and if user changed it update sermon date and disable auto update - if ( ! empty( $GLOBALS['sm_original_sermon_date'] ) && ! empty( $_POST['sermon_date'] ) ) { + if ( ! empty( $_POST['sermon_date'] ) ) { $dt = DateTime::createFromFormat( SermonManager::getOption( 'date_format' ) ?: 'm/d/Y', $_POST['sermon_date'] ); $dt_post = DateTime::createFromFormat( 'U', mysql2date( 'U', $post->post_date ) ); diff --git a/readme.txt b/readme.txt index 40dc7ba..894ef95 100755 --- a/readme.txt +++ b/readme.txt @@ -105,6 +105,7 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man ### 2.11.2 ### * Change: Remove accidentally added search form from PR #159 * Fix: Attachments not being downloaded when clicked on them +* Fix: Sermon dates not saving ### 2.11.1 ### * Fix: Fatal error on update because of not-loaded function From 220bfba5da6a764990c4a11c88b983361cde518a Mon Sep 17 00:00:00 2001 From: Nikola Date: Wed, 24 Jan 2018 20:50:47 +0100 Subject: [PATCH 4/5] Fix player not appearing in excerpt content --- includes/template-tags.php | 19 +++++++++++++++++++ readme.txt | 1 + 2 files changed, 20 insertions(+) diff --git a/includes/template-tags.php b/includes/template-tags.php index 251f052..2565d83 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -18,6 +18,7 @@ add_action( 'sermon_single', 'wpfc_sermon_single' ); add_action( 'sermon_excerpt', 'wpfc_sermon_excerpt' ); add_filter( 'the_content', 'add_wpfc_sermon_content' ); +add_filter( 'the_excerpt', 'add_wpfc_sermon_player' ); // Include template for displaying sermons function sermon_template_include( $template ) { @@ -572,6 +573,24 @@ function wpfc_sermon_excerpt( $return = false ) { return $output; } +function add_wpfc_sermon_player() { + $content = ''; + + if ( \SermonManager::getOption( 'archive_player' ) || \SermonManager::getOption( 'archive_meta' ) ) { + $content = '
'; + if ( \SermonManager::getOption( 'archive_player' ) ) { + $content .= wpfc_sermon_media(); + } + if ( \SermonManager::getOption( 'archive_meta' ) ) { + $content .= wpfc_sermon_attachments(); + } + + $content .= '
'; + } + + return $content; +} + function add_wpfc_sermon_content( $content ) { if ( 'wpfc_sermon' == get_post_type() && in_the_loop() == true ) { if ( ! is_feed() && ( is_archive() || is_search() ) ) { diff --git a/readme.txt b/readme.txt index 894ef95..0807bce 100755 --- a/readme.txt +++ b/readme.txt @@ -105,6 +105,7 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man ### 2.11.2 ### * Change: Remove accidentally added search form from PR #159 * Fix: Attachments not being downloaded when clicked on them +* Fix: Player not appearing in excerpt * Fix: Sermon dates not saving ### 2.11.1 ### From 6de84258ed8c992411eb0cb84e19453a6ee27dae Mon Sep 17 00:00:00 2001 From: Nikola Date: Thu, 25 Jan 2018 21:13:24 +0100 Subject: [PATCH 5/5] Update version number --- readme.txt | 2 +- sermons.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index 0807bce..43c412f 100755 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: church, sermon, sermons, preaching, podcasting, manage, managing, podcasts Requires at least: 4.5 Tested up to: 4.9.2 Requires PHP: 5.3 -Stable tag: 2.11.1 +Stable tag: 2.11.2 License: GPLv2 License URI: https://www.gnu.org/licenses/gpl-2.0.html diff --git a/sermons.php b/sermons.php index 78012c7..9588a5a 100755 --- a/sermons.php +++ b/sermons.php @@ -3,7 +3,7 @@ * Plugin Name: Sermon Manager for WordPress * Plugin URI: https://www.wpforchurch.com/products/sermon-manager-for-wordpress/ * Description: Add audio and video sermons, manage speakers, series, and more. - * Version: 2.11.1 + * Version: 2.11.2 * Author: WP for Church * Author URI: https://www.wpforchurch.com/ * Requires at least: 4.5