Plugin Directory

Changeset 3417515


Ignore:
Timestamp:
12/11/2025 03:09:18 PM (2 months ago)
Author:
benbeecroft
Message:

PowerPress 11.15.7

Location:
powerpress/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • powerpress/trunk/feed-podcast.php

    r3403506 r3417515  
    177177        //else
    178178        //  $GLOBALS['post'] = $GLOBALS['wp_query']->next_post(); // Use this rather than the_post() that way we do not add additional queries to the database
     179
    179180?>
    180181    <item>
    181         <title><?php the_title_rss() ?></title>
    182         <link><?php the_permalink_rss() ?></link>
     182        <title><?php the_title_rss(); ?></title>
     183        <link><?php the_permalink_rss(); ?></link>
    183184        <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
    184185        <guid isPermaLink="false"><?php the_guid(); ?></guid>
    185        
    186         <?php
     186<?php
    187187        // If feed maximizer off
    188188        if (empty($GLOBALS['powerpress_feed']['feed_maximizer_on'])) {
    189             if (empty($GeneralSettings['feed_accel'])) { ?>
    190                 <!-- feed comments -->
    191                 <comments><?php comments_link_feed(); ?></comments>
    192                 <wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss>
    193                 <slash:comments><?php echo get_comments_number(); ?></slash:comments>
    194                 <!-- category -->
    195                 <?php the_category_rss('rss2');
    196             }
    197 
    198             if (get_option('rss_use_excerpt')) { ?>
    199                 <description><?php echo powerpress_format_itunes_value(powerpress_get_the_excerpt_rss(!empty($GeneralSettings['feed_action_hook'])), 'description'); ?></description>
    200             <?php
    201             } else { // else no rss_use_excerpt
    202                 $content = powerpress_get_the_content_feed('rss2', !empty($GeneralSettings['feed_action_hook']) );
    203                 if (strlen( $content ) > 0) { ?>
    204                     <description><![CDATA[<?php echo $content; ?>]]></description>
    205                 <?php
    206                 } else { ?>
    207                     <description><![CDATA[<?php echo powerpress_get_the_excerpt_rss(!empty($GeneralSettings['feed_action_hook'])); ?>]]></description>
    208                 <?php
    209                 }
    210             } // end else no rss_use_excerpt ?>
    211             <?php
     189            if (empty($GeneralSettings['feed_accel'])) {
     190                // feed comments
     191                echo "\t\t<comments>"; comments_link_feed(); echo "</comments>\n";
     192                echo "\t\t<wfw:commentRss>" . esc_url(get_post_comments_feed_link(null, 'rss2')) . "</wfw:commentRss>\n";
     193                echo "\t\t<slash:comments>" . get_comments_number() . "</slash:comments>\n";
     194                // category
     195                the_category_rss('rss2');
     196            }
     197
     198            if (get_option('rss_use_excerpt')) {
     199                echo "\t\t<description>" . powerpress_format_itunes_value(powerpress_get_the_excerpt_rss(!empty($GeneralSettings['feed_action_hook'])), 'description') . "</description>\n";
     200            } else { // else no rss_use_excerpt
     201                $content = powerpress_get_the_content_feed('rss2', !empty($GeneralSettings['feed_action_hook']));
     202                if (strlen($content) > 0) {
     203                    echo "\t\t<description><![CDATA[" . rtrim($content) . "]]></description>\n";
     204                } else {
     205                    echo "\t\t<description><![CDATA[" . rtrim(powerpress_get_the_excerpt_rss(!empty($GeneralSettings['feed_action_hook']))) . "]]></description>\n";
     206                }
     207            } // end else no rss_use_excerpt
    212208        }
    213209        // If feed maximizer on
    214         else { ?>
    215             <description><?php echo powerpress_format_itunes_value(powerpress_get_the_excerpt_rss(!empty($GeneralSettings['feed_action_hook'])), 'description'); ?></description>
    216         <?php
     210        else {
     211            echo "\t\t<description>" . powerpress_format_itunes_value(powerpress_get_the_excerpt_rss(!empty($GeneralSettings['feed_action_hook'])), 'description') . "</description>\n";
    217212        }
    218     ?>
    219     <?php rss_enclosure(); ?>
    220     <?php apply_filters('rss2_item'.$FeedActionHook, ''); ?>
    221 
    222         <?php
     213        rss_enclosure();
     214        apply_filters('rss2_item'.$FeedActionHook, '');
    223215//  itunes:order deprecated by Apple
    224216//
     
    247239//            $GLOBALS['powerpress_feed']['feed_maximizer_on'] = true; // All future items will be minimized in order to maximize episode count
    248240//        }
    249         ?>
    250     </item>
    251 <?php
    252     endwhile;
    253 ?>
    254 <?php
     241?>
     242    </item>
     243<?php
     244    endwhile;
    255245    if( !empty($FeaturedPodcastID) )
    256246    {
  • powerpress/trunk/powerpress.php

    r3415844 r3417515  
    44Plugin URI: https://blubrry.com/services/powerpress-plugin/
    55Description: <a href="https://blubrry.com/services/powerpress-plugin/" 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, and Blubrry Podcasting directories, as well as all podcast applications and clients.
    6 Version: 11.15.6
     6Version: 11.15.7
    77Author: Blubrry
    88Author URI: https://blubrry.com/
     
    135135
    136136// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
    137 define('POWERPRESS_VERSION', '11.15.6' );
     137define('POWERPRESS_VERSION', '11.15.7' );
    138138
    139139// Translation support:
     
    16591659                    'customKey' => $value_recipient['custom_key'] ?? $value_recipient['customKey'] ?? '',
    16601660                    'customValue' => $value_recipient['custom_value'] ?? $value_recipient['customValue'] ?? '',
    1661                     'fee' => isset($value_recipient['fee']) ? ($value_recipient['fee'] ? 'true' : 'false') : 'false'
     1661                    'fee' => (isset($value_recipient['fee']) && $value_recipient['fee'] === 'true') ? 'true' : 'false'
    16621662                ];
    16631663            }
     
    19301930        }
    19311931
    1932         echo "\t". sprintf('<enclosure url="%s" length="%d" type="%s" />%s',
     1932        echo "\t\t" . sprintf('<enclosure url="%s" length="%d" type="%s" />%s',
    19331933                powerpress_url_in_feed(trim($media_url)),
    19341934                trim($EpisodeData['size']),
     
    24442444                        'customKey' => (string)($customKeys[$i] ?? ''),
    24452445                        'customValue' => (string)($customVals[$i] ?? ''),
    2446                         'fee' => !empty($fees[$i]) ? 'true' : 'false',
     2446                        'fee' => (isset($fees[$i]) && $fees[$i] === 'true') ? 'true' : 'false',
    24472447                    ];
    24482448                }
     
    24622462                'customKey' => $recipient['custom_key'] ?? $recipient['customKey'] ?? '',
    24632463                'customValue'=> $recipient['custom_value'] ?? $recipient['customValue'] ?? '',
    2464                 'fee' => !empty($recipient['fee']) ? 'true' : 'false',
     2464                'fee' => (isset($recipient['fee']) && $recipient['fee'] === 'true') ? 'true' : 'false',
    24652465            ];
    24662466        }
     
    24872487                'customKey' => (string)($customKeys[$i] ?? ''),
    24882488                'customValue' => (string)($customVals[$i] ?? ''),
    2489                 'fee' => !empty($fees[$i]) ? 'true' : 'false',
     2489                'fee' => (isset($fees[$i]) && $fees[$i] === 'true') ? 'true' : 'false',
    24902490            ];
    24912491        }
    24922492    }
    24932493
    2494     if (!empty($recipients)) {
    2495         $recipients[] = [
    2496             'lightning' => '[email protected]',
    2497             'split' => 3,
    2498             'pubkey' => '03b8a595e4d8e19efa8faa3fbe2524b0d39f7c812415ff831d38a466a4a1bc888a',
    2499             'customKey' => '696969',
    2500             'customValue' => 'qAHJuqKLmMhTNFualcIj',
    2501             'fee' => 'true',
    2502         ];
     2494    // output podcast:value block if we have recipients OR vts with remote items
     2495    $hasVts = isset($EpisodeData['vts_order']) && !empty($EpisodeData['vts_order']);
     2496    if (!empty($recipients) || $hasVts) {
     2497        // add blubrry fee recipient when there are other recipients
     2498        if (!empty($recipients)) {
     2499            $recipients[] = [
     2500                'lightning' => '[email protected]',
     2501                'split' => 3,
     2502                'pubkey' => '03b8a595e4d8e19efa8faa3fbe2524b0d39f7c812415ff831d38a466a4a1bc888a',
     2503                'customKey' => '696969',
     2504                'customValue' => 'qAHJuqKLmMhTNFualcIj',
     2505                'fee' => 'true',
     2506            ];
     2507        }
    25032508
    25042509        echo "\t\t" . '<podcast:value type="lightning" method="keysend" suggested="0.00000005000">' . PHP_EOL;
     
    25202525            $feed_slug = 'podcast';
    25212526        }
    2522         if (isset($EpisodeData['vts_order']) && !empty($EpisodeData['vts_order'])) {
     2527        if ($hasVts) {
    25232528            $valueTimeSplits = get_option('vts_'.$feed_slug.'_'.get_the_ID());
    2524             echo "\n";
    25252529
    25262530            foreach ($EpisodeData['vts_order'] as $vts_id) {
     
    25372541                    $vtsAttrs['remotePercentage'] = $timeSplit['remote_percent'];
    25382542
    2539                 $vtsAttrStr = "";
     2543                $vtsAttrParts = [];
    25402544                foreach ($vtsAttrs as $key => $value) {
    2541                     $vtsAttrStr .= ' '.$key.'="'.$value.'"';
    2542                 }
    2543 
    2544                 echo "\t\t\t"."<podcast:valueTimeSplit $vtsAttrStr>\n";
     2545                    $vtsAttrParts[] = $key.'="'.$value.'"';
     2546                }
     2547
     2548                echo "\t\t\t"."<podcast:valueTimeSplit ".implode(' ', $vtsAttrParts).">\n";
    25452549
    25462550                if ($timeSplit['recipient'] == 0) {
     
    25522556                        $attrs['itemGuid'] = $recipientemoteItem['item_guid'];
    25532557
    2554                     if (!empty($recipientemoteItem['item_link'])) {
    2555                         $attrs['link'] = $recipientemoteItem['item_link'];
     2558                    if (!empty($recipientemoteItem['feed_link'])) {
     2559                        $attrs['feedUrl'] = $recipientemoteItem['feed_link'];
    25562560                    }
    25572561
     
    25612565
    25622566                    if (!empty($recipientemoteItem['item_title'])) {
    2563                         $attrs['item_title'] = $recipientemoteItem['item_title'];
     2567                        $attrs['title'] = $recipientemoteItem['item_title'];
    25642568                    }
    25652569
    2566                     $attrStr = "";
     2570                    $attrParts = [];
    25672571                    foreach ($attrs as $key => $value) {
    2568                         $attrStr .= ' '.$key.'="'.$value.'"';
     2572                        $attrParts[] = $key.'="'.htmlspecialchars($value).'"';
    25692573                    }
    25702574
    2571                     echo "\t\t\t\t"."<podcast:remoteItem $attrStr/>\n";
     2575                    echo "\t\t\t\t"."<podcast:remoteItem ".implode(' ', $attrParts)."/>\n";
    25722576                } else {
    25732577                    $valueRecipients = $timeSplit['value_recipients'];
     
    25802584                        );
    25812585
    2582                         if ($valueRecipient['lightning_address'] != "")
    2583                             $attrs['name'] = $valueRecipient['lightning_address'];
     2586                        if ($valueRecipient['lightning'] != "")
     2587                            $attrs['name'] = $valueRecipient['lightning'];
    25842588
    25852589                        if ($valueRecipient['custom_key'] != "")
     
    27092713    // Replace the original url with the modified one...
    27102714    if( $OrigURL != $ModifiedURL )
    2711         return str_replace($OrigURL, $ModifiedURL, $content);
    2712     return $content;
     2715        $content = str_replace($OrigURL, $ModifiedURL, $content);
     2716
     2717    // add proper indentation for rss formatting
     2718    return "\t\t" . trim($content) . "\n";
    27132719}
    27142720
  • powerpress/trunk/powerpressadmin-jquery.php

    r3415844 r3417515  
    13851385                        $feedGuid = htmlspecialchars($_POST['podcast-guid']);
    13861386                        $feedLink = htmlspecialchars($_POST['podcast-link']);
     1387                        $feedMedium = htmlspecialchars($_POST['podcast-medium'] ?? '');
    13871388                        $remotePercent = intval($_POST['remote-split'] ?? 100);
    13881389
     
    13941395                            'item_guid' => $itemGuid
    13951396                        );
     1397                        if (!empty($feedMedium))
     1398                            $vtsInfo[$vts_id]['remote_item']['medium'] = $feedMedium;
    13961399
    13971400                        $vtsInfo[$vts_id]['remote_percent'] = $remotePercent;
     
    16761679                                <input type="hidden" id="podcast-guid" name="podcast-guid" class="form-control" >
    16771680                                <input type="hidden" id="podcast-link" name="podcast-link" class="form-control" >
     1681                                <input type="hidden" id="podcast-medium" name="podcast-medium" class="form-control" >
    16781682                                <input type="text" id="search-podcasts" name="podcast-name" class="pp-settings-text-input" style="width: 90%;" placeholder="Search for a show">
    16791683                                <span id="search-for-show" class="input-group-text" style="cursor: pointer; color: #1976d2; font-weight: bold;">
     
    17391743                        jQuery('#podcast-guid').val('');
    17401744                        jQuery('#podcast-link').val('');
     1745                        jQuery('#podcast-medium').val('');
    17411746                        jQuery('#item-guid').val('');
    17421747                        jQuery('#episode-search-container').hide();
     
    17601765                                            let showLink = val.url || val.link;
    17611766                                            let showGUID = val.podcastGuid;
    1762                                             let newHTML = '<li class="search-result" id="feed-result-' + showID + '"><a>' + showName + '</a><p style="display: none;">'+showGUID+'</p><p style="display: none;">'+showLink+'</p></li>';
     1767                                            let showMedium = (val.medium && val.medium !== 'podcast') ? val.medium : '';
     1768                                            let newHTML = '<li class="search-result" id="feed-result-' + showID + '"><a>' + showName + '</a><p style="display: none;">'+showGUID+'</p><p style="display: none;">'+showLink+'</p><p style="display: none;">'+showMedium+'</p></li>';
    17631769                                            jQuery('#feed-search-results').append(newHTML);
    17641770                                        });
     
    17811787                        let guid = jQuery(jQuery(this).children('p')[0]).text()
    17821788                        let link = jQuery(jQuery(this).children('p')[1]).text()
     1789                        let medium = jQuery(jQuery(this).children('p')[2]).text()
    17831790
    17841791                        jQuery.ajax( {
     
    18201827                        jQuery('#podcast-guid').val(guid);
    18211828                        jQuery('#podcast-link').val(link);
     1829                        jQuery('#podcast-medium').val(medium);
    18221830                        jQuery('#search-podcasts').val(jQuery(this).children('a').text())
    18231831                        jQuery('#feed-search-results').empty();
  • powerpress/trunk/powerpressadmin-metabox.php

    r3408166 r3417515  
    11721172    $card = 'card-c card-left-border-c';
    11731173    $seconds = $timeSplit['start_time'];
    1174     $startTime = sprintf('%02d:%02d:%02d', ($seconds / 3600), ($seconds / 60 % 60), $seconds % 60);
     1174    $startTime = sprintf('%02d:%02d:%02d', intval($seconds / 3600), intval($seconds / 60) % 60, $seconds % 60);
    11751175
    11761176    $seconds = $timeSplit['duration'];
    1177     $duration = sprintf('%02d:%02d:%02d', ($seconds / 3600), ($seconds / 60 % 60), $seconds % 60);
     1177    $duration = sprintf('%02d:%02d:%02d', intval($seconds / 3600), intval($seconds / 60) % 60, $seconds % 60);
    11781178
    11791179    $title = $timeSplit['recipient'] == 1 ? 'Value Recipient(s)' : $timeSplit['remote_item']['item_title'];
  • powerpress/trunk/readme.txt

    r3415844 r3417515  
    55Requires PHP: 5.2
    66Tested up to: 6.9
    7 Stable tag: 11.15.6
     7Stable tag: 11.15.7
    88Donate link: https://blubrry.com/services/podcast-hosting/
    99License: GPLv2 or later
     
    165165
    166166== Changelog ==
     167
     168= 11.15.7 =
     169* Released on 12/11/25
     170* Bugfix: VTS not outputting to feed when no v4v recipients are included
     171* Bugfix: RSS output formatting adjustment
    167172
    168173= 11.15.6 =
  • powerpress/trunk/version.txt

    r3415844 r3417515  
    1 11.15.6
     111.15.7
Note: See TracChangeset for help on using the changeset viewer.