Version Description
- Released on 03/30/2022
- Fixed publishing bug that was affecting multi-program users
- Allow podcast data to be saved to a post without a media URL (while excluding that post from podcast feeds)
Download this release
Release Info
Developer | benbeecroft |
Plugin | PowerPress Podcasting plugin by Blubrry |
Version | 8.7.14 |
Comparing to | |
See all releases |
Code changes from version 8.7.13 to 8.7.14
- powerpress-playlist.php +1 -0
- powerpress.php +4 -4
- powerpressadmin-jquery.php +10 -16
- powerpressadmin.php +63 -44
- readme.txt +6 -1
- views/episode-box.php +3 -2
powerpress-playlist.php
CHANGED
@@ -151,6 +151,7 @@ function powerpress_playlist_episodes($args)
|
|
151 |
add_filter( 'powerpress_where', function( $where ) {
|
152 |
$lang = apply_filters( 'wpml_current_language', false );
|
153 |
$where .= "AND language_code = '$lang' ";
|
|
|
154 |
|
155 |
return $where;
|
156 |
} );
|
151 |
add_filter( 'powerpress_where', function( $where ) {
|
152 |
$lang = apply_filters( 'wpml_current_language', false );
|
153 |
$where .= "AND language_code = '$lang' ";
|
154 |
+
$where .= "AND pm.meta_value NOT LIKE 'no%' ";
|
155 |
|
156 |
return $where;
|
157 |
} );
|
powerpress.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Blubrry PowerPress
|
4 |
Plugin URI: http://create.blubrry.com/resources/powerpress/
|
5 |
Description: <a href="https://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports Apple Podcasts (previously iTunes), Google Podcasts, Spotify, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
|
6 |
-
Version: 8.7.
|
7 |
Author: Blubrry
|
8 |
Author URI: https://blubrry.com/
|
9 |
Requires at least: 3.6
|
@@ -36,7 +36,7 @@ if( !function_exists('add_action') ) {
|
|
36 |
|
37 |
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
|
38 |
|
39 |
-
define('POWERPRESS_VERSION', '8.7.
|
40 |
|
41 |
// Translation support:
|
42 |
if ( !defined('POWERPRESS_ABSPATH') )
|
@@ -2311,9 +2311,9 @@ function powerpress_posts_where($where)
|
|
2311 |
$where .= " AND (";
|
2312 |
|
2313 |
if( powerpress_is_custom_podcast_feed() && get_query_var('feed') !== 'podcast' )
|
2314 |
-
$where .= " pp_{$wpdb->postmeta}.meta_key = '_". get_query_var('feed') .":enclosure' ";
|
2315 |
else
|
2316 |
-
$where .= " pp_{$wpdb->postmeta}.meta_key = 'enclosure' ";
|
2317 |
|
2318 |
// Include Podpress data if exists...
|
2319 |
if( !empty($powerpress_feed['process_podpress']) && get_query_var('feed') === 'podcast' )
|
3 |
Plugin Name: Blubrry PowerPress
|
4 |
Plugin URI: http://create.blubrry.com/resources/powerpress/
|
5 |
Description: <a href="https://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports Apple Podcasts (previously iTunes), Google Podcasts, Spotify, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
|
6 |
+
Version: 8.7.14
|
7 |
Author: Blubrry
|
8 |
Author URI: https://blubrry.com/
|
9 |
Requires at least: 3.6
|
36 |
|
37 |
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
|
38 |
|
39 |
+
define('POWERPRESS_VERSION', '8.7.14' );
|
40 |
|
41 |
// Translation support:
|
42 |
if ( !defined('POWERPRESS_ABSPATH') )
|
2311 |
$where .= " AND (";
|
2312 |
|
2313 |
if( powerpress_is_custom_podcast_feed() && get_query_var('feed') !== 'podcast' )
|
2314 |
+
$where .= " pp_{$wpdb->postmeta}.meta_key = '_". get_query_var('feed') .":enclosure' AND pp_{$wpdb->postmeta}.meta_value NOT LIKE 'no%' ";
|
2315 |
else
|
2316 |
+
$where .= " pp_{$wpdb->postmeta}.meta_key = 'enclosure' AND pp_{$wpdb->postmeta}.meta_value NOT LIKE 'no%' ";
|
2317 |
|
2318 |
// Include Podpress data if exists...
|
2319 |
if( !empty($powerpress_feed['process_podpress']) && get_query_var('feed') === 'podcast' )
|
powerpressadmin-jquery.php
CHANGED
@@ -215,7 +215,7 @@ function powerpress_admin_jquery_init()
|
|
215 |
}
|
216 |
if ($creds) {
|
217 |
$accessToken = powerpress_getAccessToken();
|
218 |
-
$req_url = sprintf('/2/media/%s/index.json?quota=true%s&published=true&cache=' . md5( rand(0, 999) . time() ), $blubrryProgramKeyword, $website_detection_string);
|
219 |
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '&' . POWERPRESS_BLUBRRY_API_QSA : '');
|
220 |
$req_url_programs = sprintf('/2/service/index.json?cache=' . md5( rand(0, 999) . time() ));
|
221 |
$req_url_programs .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '&' . POWERPRESS_BLUBRRY_API_QSA : '');
|
@@ -223,7 +223,7 @@ function powerpress_admin_jquery_init()
|
|
223 |
$results_programs = $auth->api($accessToken, $req_url_programs);
|
224 |
} else {
|
225 |
foreach ($api_url_array as $index => $api_url) {
|
226 |
-
$req_url = sprintf('%s/media/%s/index.json?quota=true%s&published=true&cache=' . md5( rand(0, 999) . time() ), rtrim($api_url, '/'), $blubrryProgramKeyword, $website_detection_string);
|
227 |
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '&' . POWERPRESS_BLUBRRY_API_QSA : '');
|
228 |
$req_url_programs = sprintf('%s/service/index.json?cache=' . md5( rand(0, 999) . time() ), rtrim($api_url, '/'));
|
229 |
$req_url_programs .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '&' . POWERPRESS_BLUBRRY_API_QSA : '');
|
@@ -452,6 +452,9 @@ window.onload = function() {
|
|
452 |
$QuotaData = $data;
|
453 |
continue;
|
454 |
}
|
|
|
|
|
|
|
455 |
|
456 |
if ($PublishedList == false && !empty($data['published'])) {
|
457 |
?>
|
@@ -464,8 +467,8 @@ window.onload = function() {
|
|
464 |
|
465 |
?>
|
466 |
<div class="media-item <?php echo(empty($data['published']) ? 'media-unpublished' : 'media-published'); ?>">
|
467 |
-
<strong class="media-name"><?php echo htmlspecialchars($data['name']); ?></strong>
|
468 |
-
<cite><?php echo powerpress_byte_size($data['length']); ?></cite>
|
469 |
<?php if (!empty($data['published'])) { ?>
|
470 |
<div class="media-published-date">
|
471 |
· <?php echo __('Published on', 'powerpress'); ?> <?php echo date(get_option('date_format'), $data['last_modified']); ?></div>
|
@@ -476,11 +479,11 @@ window.onload = function() {
|
|
476 |
onclick="SelectURL('<?php echo $data['url']; ?>'); return false;"><?php echo __('Select', 'powerpress'); ?></a>
|
477 |
<?php } else { ?>
|
478 |
<?php if (function_exists('curl_init')) { ?>
|
479 |
-
<a href="<?php echo admin_url() . wp_nonce_url("admin.php?action=powerpress-jquery-media-delete", 'powerpress-jquery-media-delete'); ?>&podcast-feed=<?php echo $FeedSlug; ?>&blubrryProgramKeyword=<?php echo urlencode($blubrryProgramKeyword); ?>&delete=<?php echo urlencode($data['name']); ?>"
|
480 |
-
onclick="return DeleteMedia('<?php echo $data['name']; ?>');"><?php echo __('Delete', 'powerpress'); ?></a> |
|
481 |
<?php } ?>
|
482 |
<a href="#"
|
483 |
-
onclick="SelectMedia('<?php echo $data['name']; ?>'); return false;"><?php echo __('Select', 'powerpress'); ?></a>
|
484 |
<?php } ?>
|
485 |
</div>
|
486 |
</div>
|
@@ -540,15 +543,6 @@ window.onload = function() {
|
|
540 |
}
|
541 |
?>
|
542 |
</p>
|
543 |
-
<p>
|
544 |
-
<?php
|
545 |
-
echo sprintf( __('No-Fault Hosting: You may upload a media file up to %s in size and be within the No-Fault maximum (25%% more than your %s quota).', 'powerpress'),
|
546 |
-
powerpress_byte_size($QuotaData['published']['no_fault_maximum']),
|
547 |
-
str_replace('.0', '', powerpress_byte_size($QuotaData['published']['total'])));
|
548 |
-
echo ' ';
|
549 |
-
echo '<a href="https://blubrry.com/support/nofault-documentation/" target="_blank">'. __('Learn More', 'powerpress') .'</a>';
|
550 |
-
?>
|
551 |
-
</p>
|
552 |
<p><?php
|
553 |
if( $QuotaData['published']['available'] != $QuotaData['published']['total'] )
|
554 |
{
|
215 |
}
|
216 |
if ($creds) {
|
217 |
$accessToken = powerpress_getAccessToken();
|
218 |
+
$req_url = sprintf('/2/media/%s/index.json?quota=true%s&published=true&detail=true&cache=' . md5( rand(0, 999) . time() ), $blubrryProgramKeyword, $website_detection_string);
|
219 |
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '&' . POWERPRESS_BLUBRRY_API_QSA : '');
|
220 |
$req_url_programs = sprintf('/2/service/index.json?cache=' . md5( rand(0, 999) . time() ));
|
221 |
$req_url_programs .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '&' . POWERPRESS_BLUBRRY_API_QSA : '');
|
223 |
$results_programs = $auth->api($accessToken, $req_url_programs);
|
224 |
} else {
|
225 |
foreach ($api_url_array as $index => $api_url) {
|
226 |
+
$req_url = sprintf('%s/media/%s/index.json?quota=true%s&published=true&detail=true&cache=' . md5( rand(0, 999) . time() ), rtrim($api_url, '/'), $blubrryProgramKeyword, $website_detection_string);
|
227 |
$req_url .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '&' . POWERPRESS_BLUBRRY_API_QSA : '');
|
228 |
$req_url_programs = sprintf('%s/service/index.json?cache=' . md5( rand(0, 999) . time() ), rtrim($api_url, '/'));
|
229 |
$req_url_programs .= (defined('POWERPRESS_BLUBRRY_API_QSA') ? '&' . POWERPRESS_BLUBRRY_API_QSA : '');
|
452 |
$QuotaData = $data;
|
453 |
continue;
|
454 |
}
|
455 |
+
if ($index === 'detail') {
|
456 |
+
continue;
|
457 |
+
}
|
458 |
|
459 |
if ($PublishedList == false && !empty($data['published'])) {
|
460 |
?>
|
467 |
|
468 |
?>
|
469 |
<div class="media-item <?php echo(empty($data['published']) ? 'media-unpublished' : 'media-published'); ?>">
|
470 |
+
<strong class="media-name"><?php echo !empty($data['name']) ? htmlspecialchars($data['name']) : ''; ?></strong>
|
471 |
+
<cite><?php echo !empty($data['length']) ? powerpress_byte_size($data['length']) : ''; ?></cite>
|
472 |
<?php if (!empty($data['published'])) { ?>
|
473 |
<div class="media-published-date">
|
474 |
· <?php echo __('Published on', 'powerpress'); ?> <?php echo date(get_option('date_format'), $data['last_modified']); ?></div>
|
479 |
onclick="SelectURL('<?php echo $data['url']; ?>'); return false;"><?php echo __('Select', 'powerpress'); ?></a>
|
480 |
<?php } else { ?>
|
481 |
<?php if (function_exists('curl_init')) { ?>
|
482 |
+
<a href="<?php echo admin_url() . wp_nonce_url("admin.php?action=powerpress-jquery-media-delete", 'powerpress-jquery-media-delete'); ?>&podcast-feed=<?php echo $FeedSlug; ?>&blubrryProgramKeyword=<?php echo urlencode($blubrryProgramKeyword); ?>&delete=<?php echo !empty($data['name']) ? urlencode($data['name']) : ''; ?>"
|
483 |
+
onclick="return DeleteMedia('<?php echo !empty($data['name']) ? htmlspecialchars($data['name']) : ''; ?>');"><?php echo __('Delete', 'powerpress'); ?></a> |
|
484 |
<?php } ?>
|
485 |
<a href="#"
|
486 |
+
onclick="SelectMedia('<?php echo !empty($data['name']) ? htmlspecialchars($data['name']) : ''; ?>'); return false;"><?php echo __('Select', 'powerpress'); ?></a>
|
487 |
<?php } ?>
|
488 |
</div>
|
489 |
</div>
|
543 |
}
|
544 |
?>
|
545 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
546 |
<p><?php
|
547 |
if( $QuotaData['published']['available'] != $QuotaData['published']['total'] )
|
548 |
{
|
powerpressadmin.php
CHANGED
@@ -1761,13 +1761,25 @@ function powerpress_edit_post($post_ID, $post)
|
|
1761 |
}
|
1762 |
else if( !empty($Powerpress['change_podcast']) || !empty($Powerpress['new_podcast']) )
|
1763 |
{
|
1764 |
-
// No URL specified, then it's not really a podcast
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1770 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1771 |
if( !empty($GeneralSettings['default_url']) && strpos($MediaURL, 'http://') !== 0 && strpos($MediaURL, 'https://') !== 0 && empty($Powerpress['hosting']) ) // If the url entered does not start with a http:// or https://
|
1772 |
{
|
1773 |
if( !empty($MediaURL) )
|
@@ -1790,11 +1802,10 @@ function powerpress_edit_post($post_ID, $post)
|
|
1790 |
$ContentType = powerpress_get_contenttype($UrlParts['path']);
|
1791 |
}
|
1792 |
|
1793 |
-
if( !$ContentType )
|
1794 |
{
|
1795 |
$error = __('Error', 'powerpress') ." [{$Powerpress['url']}]: " .__('Unable to determine content type of media (e.g. audio/mpeg). Verify file extension is correct and try again.', 'powerpress');
|
1796 |
powerpress_add_error($error);
|
1797 |
-
continue;
|
1798 |
}
|
1799 |
|
1800 |
//Set the duration specified by the user
|
@@ -1811,7 +1822,7 @@ function powerpress_edit_post($post_ID, $post)
|
|
1811 |
|
1812 |
if( $Powerpress['set_size'] == 0 || $Powerpress['set_duration'] == 0 )
|
1813 |
{
|
1814 |
-
if( !empty($Powerpress['hosting']) )
|
1815 |
{
|
1816 |
if( $Powerpress['set_size'] == 0 || $Powerpress['set_duration'] == 0 )
|
1817 |
{
|
@@ -1827,44 +1838,42 @@ function powerpress_edit_post($post_ID, $post)
|
|
1827 |
{
|
1828 |
$error = __('Error', 'powerpress') ." ({$Powerpress['url']}): {$MediaInfo['error']}";
|
1829 |
powerpress_add_error($error);
|
1830 |
-
continue;
|
1831 |
}
|
1832 |
}
|
1833 |
}
|
1834 |
else
|
1835 |
{
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
// Detect the file size
|
1860 |
-
if( empty($Powerpress['set_size']) && $MediaInfo['length'] > 0 )
|
1861 |
-
$FileSize = $MediaInfo['length'];
|
1862 |
-
}
|
1863 |
}
|
1864 |
}
|
1865 |
|
1866 |
// If we made if this far, we have the content type and file size...
|
1867 |
-
|
|
|
|
|
|
|
|
|
1868 |
$ToSerialize = array();
|
1869 |
if( !empty($Powerpress['hosting']) )
|
1870 |
$ToSerialize['hosting'] = 1;
|
@@ -2198,7 +2207,7 @@ function powerpress_create_subscribe_page()
|
|
2198 |
jQuery.ajax( {
|
2199 |
type: 'POST',
|
2200 |
url: '<?php echo admin_url(); ?>admin-ajax.php',
|
2201 |
-
data: { action: 'powerpress_create_subscribe_page', nonce: '<?php echo wp_create_nonce('powerpress-create-
|
2202 |
timeout: (30 * 1000),
|
2203 |
success: function(response) {
|
2204 |
|
@@ -2560,10 +2569,16 @@ function powerpress_get_media_info(FeedSlug)
|
|
2560 |
jQuery('#powerpress_duration_mm_'+FeedSlug).val( '' );
|
2561 |
jQuery('#powerpress_duration_ss_'+FeedSlug).val( '' );
|
2562 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2563 |
|
2564 |
-
if( Parts.length >
|
2565 |
{
|
2566 |
-
jQuery( '#powerpress_warning_'+FeedSlug ).html( Parts[
|
2567 |
jQuery( '#powerpress_warning_'+FeedSlug ).css('display', 'block');
|
2568 |
jQuery( '#powerpress_warning_'+FeedSlug ).addClass("updated");
|
2569 |
jQuery( '#powerpress_warning_'+FeedSlug ).removeClass("error");
|
@@ -2586,7 +2601,7 @@ function powerpress_get_media_info(FeedSlug)
|
|
2586 |
else
|
2587 |
{
|
2588 |
var Parts = response.split("\n", 5);
|
2589 |
-
if( Parts.length >
|
2590 |
{
|
2591 |
var server_error = response.replace(/\n/g, "<br \/>");
|
2592 |
jQuery( '#powerpress_warning_'+FeedSlug ).html( '<div style="text-align: left;">Server Error:</div><div style="text-align: left; font-weight: normal;">' + server_error +'<\/div>' );
|
@@ -2851,8 +2866,7 @@ function powerpress_media_info_ajax()
|
|
2851 |
$program_keyword = false;
|
2852 |
if( !empty($_POST['program_keyword']) ) {
|
2853 |
$program_keyword = $_POST['program_keyword'];
|
2854 |
-
}
|
2855 |
-
if( !empty($GeneralSettings['blubrry_program_keyword']) ) {
|
2856 |
$program_keyword = $GeneralSettings['blubrry_program_keyword'];
|
2857 |
}
|
2858 |
|
@@ -2900,6 +2914,7 @@ function powerpress_media_info_ajax()
|
|
2900 |
echo "$feed_slug\n"; // swap positions
|
2901 |
echo "{$MediaInfo['length']}\n";
|
2902 |
echo powerpress_readable_duration($MediaInfo['duration'], true) . "\n";
|
|
|
2903 |
if (isset($MediaInfo['warnings']))
|
2904 |
echo $MediaInfo['warnings'];
|
2905 |
|
@@ -4345,6 +4360,10 @@ function powerpress_get_media_info($file, $program_Keyword = false)
|
|
4345 |
}
|
4346 |
}
|
4347 |
|
|
|
|
|
|
|
|
|
4348 |
if ($Results && is_array($Results))
|
4349 |
return $Results;
|
4350 |
|
1761 |
}
|
1762 |
else if( !empty($Powerpress['change_podcast']) || !empty($Powerpress['new_podcast']) )
|
1763 |
{
|
1764 |
+
// No URL specified, then it's not really a podcast--display a warning
|
1765 |
+
// check some basic episode data and save if it's there
|
1766 |
+
if( empty($Powerpress['url']) && ( !empty($Powerpress['itunes_image']) || !empty($Powerpress['category']) || !empty($Powerpress['episode_title']) || !empty($Powerpress['feed_title']) || !empty($Powerpress['summary'] || !empty($Powerpress['subtitle']))) ) {
|
1767 |
+
$Powerpress['url'] = '';
|
1768 |
+
$error = __('WARNING: This post contains podcast data but no podcast sound file. ', 'powerpress');
|
1769 |
+
if ($feed_slug != 'podcast') {
|
1770 |
+
$error .= __('Episode published in feed ', 'powerpress') . $feed_slug . ' ';
|
1771 |
+
} else {
|
1772 |
+
$error .= __('This episode ', 'powerpress');
|
1773 |
+
}
|
1774 |
+
$error .= __('will not be included in any podcast feed.', 'powerpress');
|
1775 |
+
powerpress_add_error($error);
|
1776 |
|
1777 |
+
} else if( empty($Powerpress['url']) && empty($Powerpress['itunes_image']) && empty($Powerpress['category']) && empty($Powerpress['episode_title']) && empty($Powerpress['feed_title']) && empty($Powerpress['summary'] && empty($Powerpress['subtitle'])) ) {
|
1778 |
+
continue;
|
1779 |
+
}
|
1780 |
+
|
1781 |
+
// Initialize the important variables:
|
1782 |
+
$MediaURL = $Powerpress['url'];
|
1783 |
if( !empty($GeneralSettings['default_url']) && strpos($MediaURL, 'http://') !== 0 && strpos($MediaURL, 'https://') !== 0 && empty($Powerpress['hosting']) ) // If the url entered does not start with a http:// or https://
|
1784 |
{
|
1785 |
if( !empty($MediaURL) )
|
1802 |
$ContentType = powerpress_get_contenttype($UrlParts['path']);
|
1803 |
}
|
1804 |
|
1805 |
+
if( !$ContentType && !empty($Powerpress['url']) )
|
1806 |
{
|
1807 |
$error = __('Error', 'powerpress') ." [{$Powerpress['url']}]: " .__('Unable to determine content type of media (e.g. audio/mpeg). Verify file extension is correct and try again.', 'powerpress');
|
1808 |
powerpress_add_error($error);
|
|
|
1809 |
}
|
1810 |
|
1811 |
//Set the duration specified by the user
|
1822 |
|
1823 |
if( $Powerpress['set_size'] == 0 || $Powerpress['set_duration'] == 0 )
|
1824 |
{
|
1825 |
+
if( !empty($Powerpress['hosting']) && !empty($Powerpress['url']) )
|
1826 |
{
|
1827 |
if( $Powerpress['set_size'] == 0 || $Powerpress['set_duration'] == 0 )
|
1828 |
{
|
1838 |
{
|
1839 |
$error = __('Error', 'powerpress') ." ({$Powerpress['url']}): {$MediaInfo['error']}";
|
1840 |
powerpress_add_error($error);
|
|
|
1841 |
}
|
1842 |
}
|
1843 |
}
|
1844 |
else
|
1845 |
{
|
1846 |
+
if (!empty($Powerpress['url']) ) {
|
1847 |
+
if (empty($Powerpress['set_duration']))
|
1848 |
+
$MediaInfo = powerpress_get_media_info_local($MediaURL, $ContentType, 0, '');
|
1849 |
+
else
|
1850 |
+
$MediaInfo = powerpress_get_media_info_local($MediaURL, $ContentType, 0, $Duration);
|
1851 |
+
|
1852 |
+
if (isset($MediaInfo['error'])) {
|
1853 |
+
$error = __('Error', 'powerpress') . " (<a href=\"$MediaURL\" target=\"_blank\">{$MediaURL}</a>): {$MediaInfo['error']}";
|
1854 |
+
powerpress_add_error($error);
|
1855 |
+
} else if (empty($MediaInfo['length'])) {
|
1856 |
+
$error = __('Error', 'powerpress') . " (<a href=\"$MediaURL\" target=\"_blank\">{$MediaURL}</a>): " . __('Unable to obtain size of media.', 'powerpress');
|
1857 |
+
powerpress_add_error($error);
|
1858 |
+
} else {
|
1859 |
+
// Detect the duration
|
1860 |
+
if (empty($Powerpress['set_duration']) && !empty($MediaInfo['duration']))
|
1861 |
+
$Duration = powerpress_readable_duration($MediaInfo['duration'], true); // Fix so it looks better when viewed for editing
|
1862 |
+
|
1863 |
+
// Detect the file size
|
1864 |
+
if (empty($Powerpress['set_size']) && $MediaInfo['length'] > 0)
|
1865 |
+
$FileSize = $MediaInfo['length'];
|
1866 |
+
}
|
1867 |
+
}
|
|
|
|
|
|
|
|
|
|
|
1868 |
}
|
1869 |
}
|
1870 |
|
1871 |
// If we made if this far, we have the content type and file size...
|
1872 |
+
if (!empty($MediaURL)) {
|
1873 |
+
$EnclosureData = $MediaURL . "\n" . $FileSize . "\n" . $ContentType;
|
1874 |
+
} else {
|
1875 |
+
$EnclosureData = "no\n0\n0";
|
1876 |
+
}
|
1877 |
$ToSerialize = array();
|
1878 |
if( !empty($Powerpress['hosting']) )
|
1879 |
$ToSerialize['hosting'] = 1;
|
2207 |
jQuery.ajax( {
|
2208 |
type: 'POST',
|
2209 |
url: '<?php echo admin_url(); ?>admin-ajax.php',
|
2210 |
+
data: { action: 'powerpress_create_subscribe_page', nonce: '<?php echo wp_create_nonce('powerpress-create-subscribe-page'); ?>' },
|
2211 |
timeout: (30 * 1000),
|
2212 |
success: function(response) {
|
2213 |
|
2569 |
jQuery('#powerpress_duration_mm_'+FeedSlug).val( '' );
|
2570 |
jQuery('#powerpress_duration_ss_'+FeedSlug).val( '' );
|
2571 |
}
|
2572 |
+
|
2573 |
+
if (Parts[4]) {
|
2574 |
+
|
2575 |
+
self.parent.document.getElementById('powerpress_url_' + FeedSlug).value= Parts[4];
|
2576 |
+
}
|
2577 |
+
|
2578 |
|
2579 |
+
if( Parts.length > 5 && Parts[5] != '' )
|
2580 |
{
|
2581 |
+
jQuery( '#powerpress_warning_'+FeedSlug ).html( Parts[5] );
|
2582 |
jQuery( '#powerpress_warning_'+FeedSlug ).css('display', 'block');
|
2583 |
jQuery( '#powerpress_warning_'+FeedSlug ).addClass("updated");
|
2584 |
jQuery( '#powerpress_warning_'+FeedSlug ).removeClass("error");
|
2601 |
else
|
2602 |
{
|
2603 |
var Parts = response.split("\n", 5);
|
2604 |
+
if( Parts.length > 5 )
|
2605 |
{
|
2606 |
var server_error = response.replace(/\n/g, "<br \/>");
|
2607 |
jQuery( '#powerpress_warning_'+FeedSlug ).html( '<div style="text-align: left;">Server Error:</div><div style="text-align: left; font-weight: normal;">' + server_error +'<\/div>' );
|
2866 |
$program_keyword = false;
|
2867 |
if( !empty($_POST['program_keyword']) ) {
|
2868 |
$program_keyword = $_POST['program_keyword'];
|
2869 |
+
} else if( !empty($GeneralSettings['blubrry_program_keyword']) ) {
|
|
|
2870 |
$program_keyword = $GeneralSettings['blubrry_program_keyword'];
|
2871 |
}
|
2872 |
|
2914 |
echo "$feed_slug\n"; // swap positions
|
2915 |
echo "{$MediaInfo['length']}\n";
|
2916 |
echo powerpress_readable_duration($MediaInfo['duration'], true) . "\n";
|
2917 |
+
echo "{$MediaInfo['enclosure_url']}\n";
|
2918 |
if (isset($MediaInfo['warnings']))
|
2919 |
echo $MediaInfo['warnings'];
|
2920 |
|
4360 |
}
|
4361 |
}
|
4362 |
|
4363 |
+
if (isset($Results['error'])) {
|
4364 |
+
return array('error'=>__('Unpublished file not found.', 'powerpress') );
|
4365 |
+
}
|
4366 |
+
|
4367 |
if ($Results && is_array($Results))
|
4368 |
return $Results;
|
4369 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: podcasting, podcast, podcaster, powerpress, itunes, apple, apple podcasts,
|
|
4 |
Requires at least: 3.6
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 5.9
|
7 |
-
Stable tag: 8.7.
|
8 |
Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
|
9 |
License: GPLv2 or later
|
10 |
|
@@ -186,6 +186,11 @@ If you are a fan of PowerPress, we would greatly appreciate it if you could take
|
|
186 |
|
187 |
== Changelog ==
|
188 |
|
|
|
|
|
|
|
|
|
|
|
189 |
= 8.7.13 =
|
190 |
* Released on 03/21/2022
|
191 |
* Fixed media publishing bug
|
4 |
Requires at least: 3.6
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 5.9
|
7 |
+
Stable tag: 8.7.14
|
8 |
Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
|
9 |
License: GPLv2 or later
|
10 |
|
186 |
|
187 |
== Changelog ==
|
188 |
|
189 |
+
= 8.7.14 =
|
190 |
+
* Released on 03/30/2022
|
191 |
+
* Fixed publishing bug that was affecting multi-program users
|
192 |
+
* Allow podcast data to be saved to a post without a media URL (while excluding that post from podcast feeds)
|
193 |
+
|
194 |
= 8.7.13 =
|
195 |
* Released on 03/21/2022
|
196 |
* Fixed media publishing bug
|
views/episode-box.php
CHANGED
@@ -105,7 +105,7 @@ function powerpress_meta_box($object, $box)
|
|
105 |
// list($EnclosureURL, $EnclosureLength, $EnclosureType, $EnclosureSerialized) = explode("\n", $enclosureArray, 4);
|
106 |
$MetaParts = explode("\n", $enclosureArray, 4);
|
107 |
if (count($MetaParts) > 0)
|
108 |
-
$EnclosureURL = $MetaParts[0];
|
109 |
if (count($MetaParts) > 1)
|
110 |
$EnclosureLength = $MetaParts[1];
|
111 |
if (count($MetaParts) > 2)
|
@@ -225,7 +225,8 @@ function powerpress_meta_box($object, $box)
|
|
225 |
$style = "display: none";
|
226 |
}
|
227 |
echo "<div id=\"powerpress_podcast_box_$FeedSlug\" class=\"$editor\">";
|
228 |
-
if
|
|
|
229 |
echo '<input type="hidden" name="Powerpress['. $FeedSlug .'][new_podcast]" value="1" />'.PHP_EOL;
|
230 |
} else {
|
231 |
echo "<div>";
|
105 |
// list($EnclosureURL, $EnclosureLength, $EnclosureType, $EnclosureSerialized) = explode("\n", $enclosureArray, 4);
|
106 |
$MetaParts = explode("\n", $enclosureArray, 4);
|
107 |
if (count($MetaParts) > 0)
|
108 |
+
$EnclosureURL = trim($MetaParts[0]) == 'no' ? '' : $MetaParts[0];
|
109 |
if (count($MetaParts) > 1)
|
110 |
$EnclosureLength = $MetaParts[1];
|
111 |
if (count($MetaParts) > 2)
|
225 |
$style = "display: none";
|
226 |
}
|
227 |
echo "<div id=\"powerpress_podcast_box_$FeedSlug\" class=\"$editor\">";
|
228 |
+
// if no enclosure url AND no other podcast metadata, this is a branch new post
|
229 |
+
if (!$EnclosureURL && empty($ExtraData['itunes_image']) && empty($ExtraData['category']) && empty($ExtraData['episode_title']) && empty($ExtraData['feed_title']) && empty($ExtraData['summary']) && empty($ExtraData['subtitle'])) {
|
230 |
echo '<input type="hidden" name="Powerpress['. $FeedSlug .'][new_podcast]" value="1" />'.PHP_EOL;
|
231 |
} else {
|
232 |
echo "<div>";
|