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/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/includes/template-tags.php b/includes/template-tags.php index 519655b..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 ) { @@ -443,13 +444,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 .= '
'; @@ -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 62508d7..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 @@ -102,6 +102,12 @@ 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 +* Fix: Attachments not being downloaded when clicked on them +* Fix: Player not appearing in excerpt +* Fix: Sermon dates not saving + ### 2.11.1 ### * Fix: Fatal error on update because of not-loaded function 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