Skip to content

Commit 64409d6

Browse files
author
Nikola Miljković
authored
Merge pull request #98 from WP-for-Church/dev
Release 2.6.2
2 parents 6bc6dd5 + 64ede99 commit 64409d6

6 files changed

Lines changed: 25 additions & 15 deletions

File tree

includes/class-sm-dates.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static function get( $format = '', $post = null, $force_unix_sanitation =
6464
// Add the time if time is not set. The way this is done is that it checks for post time, takes it, converts to
6565
// seconds and adds to Unix timestamp. It's so we don't have 00:00 time set for all sermons with old date format.
6666
if ( ! $has_time ) {
67-
$dt = DateTime::createFromFormat( 'U', get_post_time( 'U', true, $post->ID ) );
67+
$dt = DateTime::createFromFormat( 'U', mysql2date( 'U', $post->post_date_gmt ) );
6868

6969
$time = array(
7070
$dt->format( 'H' ),

includes/podcast-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ function wpfc_podcast_summary( $content ) {
195195
* @return string Modified date
196196
*/
197197
function wpfc_podcast_item_date( $time, $d = 'U', $gmt = false ) {
198-
return wpfc_sermon_date( 'D, d M Y H:i:s O' );
198+
return sm_get_the_date( 'D, d M Y H:i:s O' );
199199
}
200200

201201
/**

includes/sm-core-functions.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,17 @@
1818
*/
1919
function sm_get_the_date( $d = '', $post = null ) {
2020
if ( ! $the_date = SM_Dates::get( $d, $post ) ) {
21-
$the_date = get_the_date( $d, $post );
21+
$post = get_post( $post );
22+
23+
if ( ! $post ) {
24+
return false;
25+
}
26+
27+
if ( '' == $d ) {
28+
$the_date = mysql2date( get_option( 'date_format' ), $post->post_date );
29+
} else {
30+
$the_date = mysql2date( $d, $post->post_date );
31+
}
2232
}
2333

2434
/**

includes/widgets.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,26 +78,22 @@ function widget( $args, $instance ) {
7878
} ?></a>
7979
<span class="meta">
8080
<?php
81-
$terms = get_the_terms( $post->ID, 'wpfc_preacher' );
82-
83-
if ( $terms && ! is_wp_error( $terms ) ) :
84-
81+
if ( $terms = get_the_terms( $post->ID, 'wpfc_preacher' ) ) {
8582
$preacher_links = array();
8683

8784
foreach ( $terms as $term ) {
8885
$preacher_links[] = $term->name;
8986
}
9087

91-
$preacher = join( ", ", $preacher_links );
92-
echo $preacher;
93-
echo ', ';
88+
echo '<span class="preachers">', join( ", ", $preacher_links ), '</span>';
9489

95-
endif;
90+
echo '<span class="separator">, </span>';
91+
}
9692

97-
sm_the_date();
93+
echo '<span class="date-preached">', sm_get_the_date(), '</span>';
9894

9995
if ( \SermonManager::getOption( 'widget_show_key_verse' ) ) {
100-
wpfc_sermon_meta( 'bible_passage', '<br>' . __( 'Bible Text: ', 'sermon-manager' ), '' );
96+
echo '<span class="bible-passage"><br>', __( 'Bible Text: ', 'sermon-manager' ), get_wpfc_sermon_meta( 'bible_passage' ), '</span>';
10197
}
10298
?>
10399
</span>

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.5
66
Tested up to: 4.8.2
77
Requires PHP: 5.6
8-
Stable tag: 2.6.1
8+
Stable tag: 2.6.2
99
License: GPLv2
1010
License URI: https://www.gnu.org/licenses/gpl-2.0.html
1111

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

9191
== Changelog ==
92+
= 2.6.2 =
93+
* Add more `<span>` elements for more styling options
94+
* Fix podcast feed not working
95+
9296
= 2.6.1 =
9397
* Fix fatal error on old PHP versions
9498
* Fix custom preacher slug not working

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

0 commit comments

Comments
 (0)