Changeset 2902901
- Timestamp:
- 04/23/2023 07:43:34 AM (3 years ago)
- Location:
- sermon-manager-for-wordpress/trunk
- Files:
-
- 4 edited
-
changelog.txt (modified) (1 diff)
-
includes/admin/settings/class-sm-settings-podcast.php (modified) (1 diff)
-
sermons.php (modified) (1 diff)
-
views/wpfc-podcast-feed.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sermon-manager-for-wordpress/trunk/changelog.txt
r2891898 r2902901 1 = 2.17.1.1 = 2 Add: New Checkbox added for the support of http:// or https:// inside the enclosure URL under the Podcast tab in the settings menu. 3 1 4 ### 2.17.1 ### 2 5 Fixed: Compability issues with PHP 8.x -
sermon-manager-for-wordpress/trunk/includes/admin/settings/class-sm-settings-podcast.php
r1953687 r2902901 211 211 'default' => 'no', 212 212 ), 213 array( 214 'title' => __( 'Use "https://" in Enclosure URL', 'sermon-manager-for-wordpress' ), 215 'type' => 'checkbox', 216 'id' => 'podcast_enclosure_url', 217 'desc' => __( 'Podcast RSS feed Enclosure URL. Uncheck if description looks messy.' ), 218 'desc_tip' => __( 'It is advisable to keep the checkbox unchecked, as selecting it will automatically replace all instances of "http://" with "https://" in the Enclosure URL of the podcast\'s RSS feed.', 'sermon-manager-for-wordpress' ), 219 'default' => 'no', 220 ), 213 221 214 222 array( -
sermon-manager-for-wordpress/trunk/sermons.php
r2891898 r2902901 4 4 * Plugin URI: https://www.wpforchurch.com/products/sermon-manager-for-wordpress/ 5 5 * Description: Add audio and video sermons, manage speakers, series, and more. 6 * Version: 2.17.1 6 * Version: 2.17.1.1 7 7 * Author: WP for Church 8 8 * Author URI: https://www.wpforchurch.com/ 9 9 * Requires at least: 4.5 10 * Tested up to: 5.9.3 10 * Tested up to wordpress: 6.2 11 * Tested up to PHP : 8.0.2 11 12 * 12 13 * Text Domain: sermon-manager-for-wordpress -
sermon-manager-for-wordpress/trunk/views/wpfc-podcast-feed.php
r2806220 r2902901 296 296 <?php endif; ?> 297 297 <?php 298 $podcast_enclosure_url = get_option("sermonmanager_podcast_enclosure_url"); 299 $use_https = ($podcast_enclosure_url == "yes")?true:false; 298 300 if ( $sermon_podcast_query->have_posts() ) : 299 301 while ( $sermon_podcast_query->have_posts() ) : … … 304 306 $audio_url_wp = $audio_id ? wp_get_attachment_url( intval( $audio_id ) ) : false; 305 307 $audio_url = $audio_id && $audio_url_wp ? $audio_url_wp : get_post_meta( $post->ID, 'sermon_audio', true ); 306 $audio_raw = str_ireplace( 'https://', 'http://', $audio_url );308 $audio_raw = $use_https ? str_ireplace( 'http://', 'https://', $audio_url ) : str_ireplace( 'https://', 'http://', $audio_url ); 307 309 $audio_p = strrpos( $audio_raw, '/' ) + 1; 308 310 $audio_raw = urldecode( $audio_raw ); … … 314 316 $topics = strip_tags( get_the_term_list( $post->ID, 'wpfc_sermon_topics', '', ', ', '' ) ); 315 317 $post_image = get_sermon_image_url( $settings['podcast_sermon_image_series'] ); 316 $post_image = str_ireplace( 'https://', 'http://', ! empty( $post_image ) ? $post_image : '' );318 $post_image = $use_https ? str_ireplace( 'http://', 'https://', ! empty( $post_image ) ? $post_image : '' ) : str_ireplace( 'https://', 'http://', ! empty( $post_image ) ? $post_image : '' ); 317 319 $audio_duration = get_post_meta( $post->ID, '_wpfc_sermon_duration', true ) ?: '0:00'; 318 320 $audio_file_size = get_post_meta( $post->ID, '_wpfc_sermon_size', 'true' ) ?: 0; … … 331 333 332 334 if ( $settings['podtrac'] ) { 333 $audio = 'http://dts.podtrac.com/redirect.mp3/' . esc_url( preg_replace( '#^https?://#', '', $audio ) );335 $audio = $use_https ? 'https://dts.podtrac.com/redirect.mp3/' . esc_url( preg_replace( '#^https?://#', '', $audio ) ) : 'http://dts.podtrac.com/redirect.mp3/' . esc_url( preg_replace( '#^https?://#', '', $audio ) ); 334 336 } else { 335 337 // As per RSS 2.0 spec, the enclosure URL must be HTTP only: 336 338 // http://www.rssboard.org/rss-specification#ltenclosuregtSubelementOfLtitemgt . 337 $audio = preg_replace( '/^https:/i', 'http:', $audio ); 339 // $audio = preg_replace( '/^https:/i', 'http:', $audio ); 340 $audio = $use_https ? preg_replace( '/^http:/i', 'https:', $audio ) : preg_replace( '/^https:/i', 'http:', $audio ); 338 341 } 339 342 ?>
Note: See TracChangeset
for help on using the changeset viewer.