diff --git a/includes/podcast-functions.php b/includes/podcast-functions.php index fb81292..1ec2ede 100755 --- a/includes/podcast-functions.php +++ b/includes/podcast-functions.php @@ -99,12 +99,12 @@ function wpfc_podcast_add_head() { @@ -128,7 +128,9 @@ function wpfc_podcast_add_head() { */ function wpfc_podcast_add_item() { global $post; - $audio = str_ireplace( 'https://', 'http://', get_post_meta( $post->ID, 'sermon_audio', true ) ); + $audio_raw = str_ireplace( 'https://', 'http://', get_post_meta( $post->ID, 'sermon_audio', true ) ); + $audio_p = strrpos( $audio_raw, '/' ) + 1; + $audio = substr( $audio_raw, 0, $audio_p ) . rawurlencode( substr( $audio_raw, $audio_p ) ); $speaker = strip_tags( get_the_term_list( $post->ID, 'wpfc_preacher', '', ' & ', '' ) ); $series = strip_tags( get_the_term_list( $post->ID, 'wpfc_sermon_series', '', ', ', '' ) ); $topics = strip_tags( get_the_term_list( $post->ID, 'wpfc_sermon_topics', '', ', ', '' ) ); @@ -141,7 +143,7 @@ function wpfc_podcast_add_item() { @@ -172,7 +174,7 @@ function wpfc_podcast_add_item() { */ function wpfc_podcast_summary( $content ) { if ( \SermonManager::getOption( 'enable_podcast_html_description' ) ) { - $content = stripslashes( wp_filter_kses( wpautop( get_wpfc_sermon_meta( 'sermon_description' ) ) ) ); + $content = stripslashes( wpautop( wp_filter_kses( get_wpfc_sermon_meta( 'sermon_description' ) ) ) ); } else { $content = stripslashes( wp_filter_nohtml_kses( get_wpfc_sermon_meta( 'sermon_description' ) ) ); } @@ -228,7 +230,7 @@ function wpfc_bloginfo_rss_filter( $info, $show ) { break; case 'description': if ( \SermonManager::getOption( 'enable_podcast_html_description' ) ) { - $new_info = stripslashes( wp_filter_kses( wpautop( \SermonManager::getOption( 'itunes_summary' ) ) ) ); + $new_info = stripslashes( wpautop( wp_filter_kses( \SermonManager::getOption( 'itunes_summary' ) ) ) ); } else { $new_info = stripslashes( wp_filter_nohtml_kses( \SermonManager::getOption( 'itunes_summary' ) ) ); } diff --git a/includes/shortcodes.php b/includes/shortcodes.php index d2e2e9f..e64dea3 100755 --- a/includes/shortcodes.php +++ b/includes/shortcodes.php @@ -624,9 +624,6 @@ function displaySermons( $atts = array() ) { 'post_type' => 'wpfc_sermon', 'posts_per_page' => $args['per_page'], 'order' => $args['order'], - 'meta_key' => 'sermon_date', - 'meta_value_num' => time(), - 'meta_compare' => '<=', 'paged' => $my_page, ); @@ -643,13 +640,6 @@ function displaySermons( $atts = array() ) { $args['orderby'] = 'date'; } - // set the ordering options - if ( $args['orderby'] === 'date' ) { - $query_args['orderby'] = 'meta_value_num'; - } else { - $query_args['orderby'] = $args['orderby']; - } - // if we should show just specific sermons if ( $args['sermons'] ) { $posts_in = explode( ',', $args['sermons'] ); diff --git a/includes/template-tags.php b/includes/template-tags.php index 63b7dae..bf43b28 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -363,29 +363,8 @@ function wpfc_sermon_audio() { // render additional files function wpfc_sermon_attachments() { global $post; - $args = array( - 'post_type' => 'attachment', - 'numberposts' => - 1, - 'post_status' => null, - 'post_parent' => $post->ID, - 'exclude' => get_post_thumbnail_id() - ); - $attachments = get_posts( $args ); - $html = ''; - $html .= '
'; + $html = '
'; $html .= '

' . __( 'Download Files', 'sermon-manager' ) . ''; - if ( $attachments ) { - foreach ( $attachments as $attachment ) { - // skip audio, so we don't have double URLs - if ( get_wpfc_sermon_meta( 'sermon_audio' ) === wp_get_attachment_url( $attachment->ID ) ) { - continue; - } - - $html .= '
'; - $html .= $attachment->post_title; - $html .= ''; - } - } if ( get_wpfc_sermon_meta( 'sermon_audio' ) ) { $html .= '' . __( 'MP3', 'sermon-manager' ) . ''; } diff --git a/includes/types-taxonomies.php b/includes/types-taxonomies.php index de64eb8..62031fd 100755 --- a/includes/types-taxonomies.php +++ b/includes/types-taxonomies.php @@ -330,12 +330,13 @@ function wpfc_sermon_metaboxes() { 'id' => 'sermon_video', 'type' => 'textarea_code' ) ); - $cmb2->add_field( array( - 'name' => __( 'Video', 'sermon-manager' ), - 'desc' => __( 'Paste your link for Vimeo, Youtube, or other service here', 'sermon-manager' ), - 'id' => 'sermon_video_link', - 'type' => 'text' - ) ); + $cmb2->add_field( apply_filters( 'sm_cmb2_field_sermon_video_link', array( + 'name' => __( 'Video', 'sermon-manager' ), + 'desc' => __( 'Paste your link for Vimeo, Youtube, or other service here', 'sermon-manager' ), + 'id' => 'sermon_video_link', + 'type' => 'text' + ) ) + ); $cmb2->add_field( array( 'name' => __( 'Sermon Notes', 'sermon-manager' ), 'desc' => __( 'Upload a pdf file or enter an URL.', 'sermon-manager' ), diff --git a/readme.txt b/readme.txt index 9754f02..86e322d 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: http://wpforchurch.com/ Tags: church, sermon, sermons, preaching, podcasting Requires at least: 4.5 Tested up to: 4.8.1 -Stable tag: 2.4.10 +Stable tag: 2.4.11 Add audio and video sermons, manage speakers, series, and more to your church website. @@ -83,6 +83,12 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man 2. Sermon Files == Changelog == += 2.4.11 = +* Fix paragraphs in podcast feed description +* Fix podcasts not validating with exotic mp3 file names +* Fix double URLs appearing in sermon downloads +* Fix sermons not appearing in shortcodes + = 2.4.10 = * Fix filtering styling being broken diff --git a/sermons.php b/sermons.php index 1ef94fe..d96199a 100755 --- a/sermons.php +++ b/sermons.php @@ -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 Wordpress for Church for tutorials and support. -Version: 2.4.10 +Version: 2.4.11 Author: WP for Church Contributors: wpforchurch, jprummer, jamzth Author URI: http://www.wpforchurch.com/