Skip to content

Commit

Permalink
Merge pull request #45 from WP-for-Church/dev
Browse files Browse the repository at this point in the history
Release 2.4.3
  • Loading branch information
Nikola Miljković authored Jun 28, 2017
2 parents 97bade2 + b968b5c commit a45b4b2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
28 changes: 14 additions & 14 deletions includes/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ function wpfc_render_audio( $url = '' ) {

$output = wp_audio_shortcode( $attr );
} else {
$output = '<audio controls preload="none" class="wpfc-sermon-player">';
$output = '<audio controls preload="metadata" class="wpfc-sermon-player">';
$output .= '<source src="' . $url . '">';
$output .= '</audio>';
}
Expand Down Expand Up @@ -379,13 +379,14 @@ function wpfc_sermon_attachments() {
$html .= '<p><strong>' . __( 'Download Files', 'sermon-manager' ) . '</strong>';
if ( $attachments ) {
foreach ( $attachments as $attachment ) {
// skip audio, so we don't have double URLs
// skip audio, so we don't have double URLs
if ( get_wpfc_sermon_meta( 'sermon_audio' ) === wp_get_attachment_url( $attachment->ID ) ) {
continue;
}

$html .= '<br/><a target="_blank" href="' . wp_get_attachment_url( $attachment->ID ) . '">';
$html .= $attachment->post_title;
$html .= '</a>';
}
}
if ( get_wpfc_sermon_meta( 'sermon_audio' ) ) {
Expand All @@ -397,7 +398,6 @@ function wpfc_sermon_attachments() {
if ( get_wpfc_sermon_meta( 'sermon_bulletin' ) ) {
$html .= '<a href="' . get_wpfc_sermon_meta( 'sermon_bulletin' ) . '" class="sermon-attachments"><span class="dashicons dashicons-media-document"></span>' . __( 'Bulletin', 'sermon-manager' ) . '</a>';
}
$html .= '</a>';
$html .= '</p>';
$html .= '</div>';

Expand Down Expand Up @@ -576,12 +576,12 @@ function wpfc_footer_preacher() {
* @return string|int|false
*/
function wpfc_sermon_time_filter( $the_time = 0, $d = '', $post = null ) {
// if the post is not set, try to get current one
if ( $post === null ) {
$post = the_post();
}

if ( 'wpfc_sermon' == get_post_type( $post ) ) {
// if the post is not set, try to get current one
if ( $post === null ) {
$post = the_post();
}

// get the post
$post = get_post( $post );

Expand Down Expand Up @@ -629,13 +629,13 @@ function wpfc_sermon_time_filter( $the_time = 0, $d = '', $post = null ) {
*
* @return string|int|false
*/
function wpfc_sermon_date_filter( $the_date = 0, $d = '', $post = null ) {
// if the post is not set, try to get current one
if ( ! is_single() && $post === null ) {
$post = the_post();
}

function wpfc_sermon_date_filter( $the_date = 0, $d = '', $post = null ){
if ( 'wpfc_sermon' == get_post_type() ) {
// if the post is not set, try to get current one
if ( ! is_single() && $post === null ) {
$post = the_post();
}

// get the post
$post = get_post( $post );

Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: http://wpforchurch.com/
Tags: church, sermon, sermons, preaching, podcasting
Requires at least: 3.6
Tested up to: 4.8.0
Stable tag: 2.4.2
Stable tag: 2.4.3

Add audio and video sermons, manage speakers, series, and more to your church website.

Expand Down Expand Up @@ -84,6 +84,11 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man

== Changelog ==
= 2.4.3 =
* Fix HTML formatting
* Fix new player duration always being 0:00 on initial load
* Fix Sermon date breaking the website in some special circumstances

= 2.4.2 =
* Fix Sermon Manager interfering with regular post dates under some circumstances
* Fix fatal error when using UpdraftPlus
* Fix fatal error for longtime Sermon Manager users (thank you <3)
Expand Down
2 changes: 1 addition & 1 deletion sermons.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Sermon Manager for WordPress
Plugin URI: http://www.wpforchurch.com/products/sermon-manager-for-wordpress/
Description: Add audio and video sermons, manage speakers, series, and more. Visit <a href="http://wpforchurch.com" target="_blank">Wordpress for Church</a> for tutorials and support.
Version: 2.4.2
Version: 2.4.3
Author: WP for Church
Contributors: wpforchurch, jprummer, jamzth
Author URI: http://www.wpforchurch.com/
Expand Down

0 comments on commit a45b4b2

Please sign in to comment.