Skip to content

Commit

Permalink
Add option to enable sermon series image fallback in the feed
Browse files Browse the repository at this point in the history
Closes #92
  • Loading branch information
Nikola Miljković committed Oct 9, 2018
1 parent 4f9e32a commit 27521e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions includes/admin/settings/class-sm-settings-podcast.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,14 @@ public function get_settings() {
'desc' => 'URL to use for the Overcast link in the <code>[list_podcasts]</code> shortcode. Shortcode key to include/exclude: <code>overcast</code>.',
'desc_tip' => 'Leave empty to disable.',
),
array(
'title' => __( 'Sermon Image', 'sermon-manager-for-wordpress' ),
'type' => 'checkbox',
'id' => 'podcast_sermon_image_series',
'desc' => __( 'Fallback to series image if sermon does not have its own image.', 'sermon-manager-for-wordpress' ),
'desc_tip' => __( 'Default disabled.', 'sermon-manager-for-wordpress' ),
'default' => 'no',
),

array(
'type' => 'sectionend',
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man
## Changelog ##
### 2.15.3 ###
* New: Add option to disable "views" count for editors and admins
* New: Add option to enable sermon series image fallback in the feed
* Fix: Podcast shortcode SVG icons not working in Firefox
* Fix: Getting 404 on filtering
* Fix: Sermon Manager errors out when output buffering is disabled
Expand Down
2 changes: 1 addition & 1 deletion views/wpfc-podcast-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
$speaker = $speakers_terms ? $speakers_terms[0]->name : '';
$series = strip_tags( get_the_term_list( $post->ID, 'wpfc_sermon_series', '', ', ', '' ) );
$topics = strip_tags( get_the_term_list( $post->ID, 'wpfc_sermon_topics', '', ', ', '' ) );
$post_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'large' );
$post_image = get_sermon_image_url( SermonManager::getOption( 'podcast_sermon_image_series' ) );
$post_image = str_ireplace( 'https://', 'http://', ! empty( $post_image['0'] ) ? $post_image['0'] : '' );
$audio_duration = get_post_meta( $post->ID, '_wpfc_sermon_duration', true ) ?: '0:00';
$audio_file_size = get_post_meta( $post->ID, '_wpfc_sermon_size', 'true' ) ?: 0;
Expand Down

0 comments on commit 27521e8

Please sign in to comment.