Skip to content

Commit fecc2ca

Browse files
author
Nikola
committed
Release 2.11.2
2 parents cacfec8 + 6de8425 commit fecc2ca

File tree

5 files changed

+31
-16
lines changed

5 files changed

+31
-16
lines changed

includes/class-sm-dates-wp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public static function maybe_update_date( $post_ID, $post, $update ) {
176176

177177
if ( $update ) {
178178
// compare sermon date and if user changed it update sermon date and disable auto update
179-
if ( ! empty( $GLOBALS['sm_original_sermon_date'] ) && ! empty( $_POST['sermon_date'] ) ) {
179+
if ( ! empty( $_POST['sermon_date'] ) ) {
180180
$dt = DateTime::createFromFormat( SermonManager::getOption( 'date_format' ) ?: 'm/d/Y', $_POST['sermon_date'] );
181181
$dt_post = DateTime::createFromFormat( 'U', mysql2date( 'U', $post->post_date ) );
182182

includes/shortcodes.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -880,16 +880,6 @@ function displaySermons( $atts = array() ) {
880880
if ( $query->have_posts() ) {
881881
ob_start(); ?>
882882
<div id="wpfc_sermon">
883-
<form role="search" method="get" class="wpfc_searchform" action="<?php echo home_url( '/' ); ?>">
884-
<h4>Search</h4>
885-
<div>
886-
<input type="text" name="s" id="s" placeholder="Search by book, preacher, month & more.."/>
887-
<input type="hidden" name="sentence" value="1"/>
888-
<input type="hidden" name="post_type" value="wpfc_sermon"/>
889-
<button type="submit" id="searchsubmit" value="Search" class="btn btn-default"><i
890-
class="glyphicon glyphicon-search"></i></button>
891-
</div>
892-
</form>
893883
<div id="wpfc_loading">
894884
<?php while ( $query->have_posts() ): ?>
895885
<?php $query->the_post();

includes/template-tags.php

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
add_action( 'sermon_single', 'wpfc_sermon_single' );
1919
add_action( 'sermon_excerpt', 'wpfc_sermon_excerpt' );
2020
add_filter( 'the_content', 'add_wpfc_sermon_content' );
21+
add_filter( 'the_excerpt', 'add_wpfc_sermon_player' );
2122

2223
// Include template for displaying sermons
2324
function sermon_template_include( $template ) {
@@ -443,13 +444,13 @@ function wpfc_sermon_attachments() {
443444
$html = '<div id="wpfc-attachments" class="cf">';
444445
$html .= '<p><strong>' . __( 'Download Files', 'sermon-manager-for-wordpress' ) . '</strong>';
445446
if ( get_wpfc_sermon_meta( 'sermon_audio' ) ) {
446-
$html .= '<a href="' . get_wpfc_sermon_meta( 'sermon_audio' ) . '" class="sermon-attachments" download><span class="dashicons dashicons-media-audio"></span>' . __( 'MP3', 'sermon-manager-for-wordpress' ) . '</a>';
447+
$html .= '<a href="' . get_wpfc_sermon_meta( 'sermon_audio' ) . '" class="sermon-attachments" download="' . basename( get_wpfc_sermon_meta( 'sermon_audio' ) ) . '"><span class="dashicons dashicons-media-audio"></span>' . __( 'MP3', 'sermon-manager-for-wordpress' ) . '</a>';
447448
}
448449
if ( get_wpfc_sermon_meta( 'sermon_notes' ) ) {
449-
$html .= '<a href="' . get_wpfc_sermon_meta( 'sermon_notes' ) . '" class="sermon-attachments"><span class="dashicons dashicons-media-document"></span>' . __( 'Notes', 'sermon-manager-for-wordpress' ) . '</a>';
450+
$html .= '<a href="' . get_wpfc_sermon_meta( 'sermon_notes' ) . '" class="sermon-attachments" download="' . basename( get_wpfc_sermon_meta( 'sermon_notes' ) ) . '"><span class="dashicons dashicons-media-document"></span>' . __( 'Notes', 'sermon-manager-for-wordpress' ) . '</a>';
450451
}
451452
if ( get_wpfc_sermon_meta( 'sermon_bulletin' ) ) {
452-
$html .= '<a href="' . get_wpfc_sermon_meta( 'sermon_bulletin' ) . '" class="sermon-attachments"><span class="dashicons dashicons-media-document"></span>' . __( 'Bulletin', 'sermon-manager-for-wordpress' ) . '</a>';
453+
$html .= '<a href="' . get_wpfc_sermon_meta( 'sermon_bulletin' ) . '" class="sermon-attachments" download="' . basename( get_wpfc_sermon_meta( 'sermon_bulletin' ) ) . '"><span class="dashicons dashicons-media-document"></span>' . __( 'Bulletin', 'sermon-manager-for-wordpress' ) . '</a>';
453454
}
454455
$html .= '</p>';
455456
$html .= '</div>';
@@ -572,6 +573,24 @@ function wpfc_sermon_excerpt( $return = false ) {
572573
return $output;
573574
}
574575

576+
function add_wpfc_sermon_player() {
577+
$content = '';
578+
579+
if ( \SermonManager::getOption( 'archive_player' ) || \SermonManager::getOption( 'archive_meta' ) ) {
580+
$content = '<div class="wpfc_sermon cf">';
581+
if ( \SermonManager::getOption( 'archive_player' ) ) {
582+
$content .= wpfc_sermon_media();
583+
}
584+
if ( \SermonManager::getOption( 'archive_meta' ) ) {
585+
$content .= wpfc_sermon_attachments();
586+
}
587+
588+
$content .= '</div>';
589+
}
590+
591+
return $content;
592+
}
593+
575594
function add_wpfc_sermon_content( $content ) {
576595
if ( 'wpfc_sermon' == get_post_type() && in_the_loop() == true ) {
577596
if ( ! is_feed() && ( is_archive() || is_search() ) ) {

readme.txt

Lines changed: 7 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.5
66
Tested up to: 4.9.2
77
Requires PHP: 5.3
8-
Stable tag: 2.11.1
8+
Stable tag: 2.11.2
99
License: GPLv2
1010
License URI: https://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -102,6 +102,12 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man
102102
2. Sermon Files
103103

104104
## Changelog ##
105+
### 2.11.2 ###
106+
* Change: Remove accidentally added search form from PR #159
107+
* Fix: Attachments not being downloaded when clicked on them
108+
* Fix: Player not appearing in excerpt
109+
* Fix: Sermon dates not saving
110+
105111
### 2.11.1 ###
106112
* Fix: Fatal error on update because of not-loaded function
107113

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.11.1
6+
* Version: 2.11.2
77
* Author: WP for Church
88
* Author URI: https://www.wpforchurch.com/
99
* Requires at least: 4.5

0 commit comments

Comments
 (0)