PluginProbe
PowerPress Podcasting plugin by Blubrry / 11.17.1
PowerPress Podcasting plugin by Blubrry v11.17.1
11.17.9 11.17.8 11.17.7 11.17.6 11.17.4 11.17.3 11.17.2 11.17.1 11.17 11.16.11 11.16.10 11.16.9 11.16.8 11.16.7 11.16.6 11.16.5 11.16.4 11.16.3 11.16.2 11.16.1 11.9.13 11.9.14 11.9.15 11.9.16 11.9.17 All 383 releases
powerpress / powerpressadmin-basic.php

powerpressadmin-basic.php in PowerPress Podcasting plugin by Blubrry 11.17.1, at powerpressadmin-basic.php

1,793 lines 100.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 require_once(POWERPRESS_ABSPATH . '/views/components/sidenav.php');
4
5 function powerpress_admin_basic()
6 {
7 // ASSETS
8 powerpress_enqueue_assets([
9 // styles
10 'powerpress-variables' => ['path' => 'css/variables'],
11 'powerpress_settings_style' => ['path' => 'css/settings'],
12 'powerpress-admin-css' => ['path' => 'css/admin'],
13 'powerpress-program-card-css' => ['path' => 'css/components/program-card'],
14 'powerpress-stats-widget' => ['path' => 'css/components/stats-widget'],
15 'powerpress-news-widget' => ['path' => 'css/components/news-widget'],
16 'powerpress-sidenav' => ['path' => 'css/components/sidenav'],
17
18 // scripts
19 'chartjs' => ['type' => 'script', 'path' => '3rdparty/chart.min', 'no_suffix' => true, 'version' => '4.4.1'],
20 'powerpress-admin' => ['type' => 'script', 'path' => 'js/admin'],
21 'powerpress-program-card' => ['type' => 'script', 'path' => 'js/program-card', 'deps' => ['chartjs'], 'module' => true],
22 ]);
23
24 $FeedAttribs = array('type'=>'general', 'feed_slug'=>'', 'category_id'=>0, 'term_taxonomy_id'=>0, 'term_id'=>0, 'taxonomy_type'=>'', 'post_type'=>'');
25 // feed_slug = channel
26
27 $General = powerpress_get_settings('powerpress_general');
28 $General = powerpress_default_settings($General, 'basic');
29
30 $FeedSettings = powerpress_get_settings('powerpress_feed');
31 $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed');
32
33 $CustomFeed = get_option('powerpress_feed_'.'podcast', array()); // Get the custom podcast feed settings saved in the database
34 if( !empty($CustomFeed) ) // If they enabled custom podast channels...
35 {
36 $FeedSettings = powerpress_merge_empty_feed_settings($CustomFeed, $FeedSettings);
37 $FeedAttribs['channel_podcast'] = true;
38 }
39
40 $MultiSiteServiceSettings = false;
41 if( is_multisite() )
42 {
43 $MultiSiteSettings = get_site_option('powerpress_multisite');
44 if( !empty($MultiSiteSettings['services_multisite_only']) )
45 {
46 $MultiSiteServiceSettings = true;
47 }
48 }
49
50 powerpress_enqueue_assets([
51 'powerpress-admin' => [
52 'type' => 'script',
53 'path' => 'js/admin',
54 ],
55 'powerpress-post' => [
56 'type' => 'script',
57 'path' => 'js/post',
58 'module' => true,
59 ],
60 ]);
61
62 ?>
63 <script type="text/javascript">
64
65 jQuery(document).ready(function($) {
66
67
68 jQuery('#episode_box_player_links_options').change(function () {
69
70 var objectChecked = jQuery('#episode_box_player_links_options').attr('checked');
71 if(typeof jQuery.prop === 'function') {
72 objectChecked = jQuery('#episode_box_player_links_options').prop('checked');
73 }
74
75 if( objectChecked == true ) {
76 jQuery('#episode_box_player_links_options_div').css("display", 'block' );
77 }
78 else {
79 jQuery('#episode_box_player_links_options_div').css("display", 'none' );
80 jQuery('.episode_box_no_player_or_links').attr("checked", false );
81 jQuery('#episode_box_no_player_and_links').attr("checked", false );
82 if(typeof jQuery.prop === 'function') {
83 jQuery('.episode_box_no_player_or_links').prop("checked", false );
84 jQuery('#episode_box_no_player_and_links').prop("checked", false );
85 }
86 }
87 } );
88
89 jQuery('#episode_box_no_player_and_links').change(function () {
90
91 var objectChecked = jQuery(this).attr("checked");
92 if(typeof jQuery.prop === 'function') {
93 objectChecked = jQuery(this).prop("checked");
94 }
95
96 if( objectChecked == true ) {
97 jQuery('.episode_box_no_player_or_links').attr("checked", false );
98 if(typeof jQuery.prop === 'function') {
99 jQuery('.episode_box_no_player_or_links').prop("checked", false );
100 }
101 }
102 } );
103
104 jQuery('.episode_box_no_player_or_links').change(function () {
105 var objectChecked = jQuery(this).attr("checked");
106 if(typeof jQuery.prop === 'function') {
107 objectChecked = jQuery(this).prop("checked");
108 }
109
110 if( objectChecked == true) {
111 jQuery('#episode_box_no_player_and_links').attr("checked", false );
112 if(typeof jQuery.prop === 'function') {
113 jQuery('#episode_box_no_player_and_links').prop("checked", false );
114 }
115 }
116 } );
117
118 jQuery('#episode_box_feature_in_itunes').change( function() {
119 var objectChecked = jQuery('#episode_box_feature_in_itunes').attr('checked');
120 if(typeof jQuery.prop === 'function') {
121 objectChecked = jQuery('#episode_box_feature_in_itunes').prop('checked');
122 }
123 if( objectChecked ) {
124 jQuery("#episode_box_order").attr("disabled", true);
125 } else {
126 jQuery("#episode_box_order").removeAttr("disabled");
127 }
128 });
129
130 } );
131 //-->
132 </script>
133 <input type="hidden" name="action" value="powerpress-save-settings" />
134 <input type="hidden" name="General[pp-gen-settings-tabs]" value="1" />
135 <input type="hidden" name="PlayerSettings[pp-gen-settings-tabs]" value="1" />
136
137 <input type="hidden" id="save_tab_pos" name="tab" value="<?php echo (empty($_POST['tab']) ? "settings-welcome" : esc_attr($_POST['tab'])); ?>" />
138 <input type="hidden" id="save_sidenav_pos" name="sidenav-tab" value="<?php echo (empty($_POST['sidenav-tab']) ? "" : esc_attr($_POST['sidenav-tab'])); ?>" />
139
140 <div id="powerpress_admin_header">
141 <h2><?php echo __('Blubrry PowerPress Settings', 'powerpress'); ?></h2>
142
143 </div>
144
145 <div id="powerpress_settings_page" class="powerpress_tabbed_content">
146 <div class="pp-tab">
147 <button type="button" id="welcome-tab" class="tablinks active" onclick="powerpress_openTab(event, 'settings-welcome')"><?php echo htmlspecialchars(__('Welcome', 'powerpress')); ?></button>
148 <!-- #tab1 deprecated. was episodes tab -->
149 <button type="button" id="feeds-tab" class="tablinks" onclick="powerpress_openTab(event, 'settings-feeds')"><?php echo htmlspecialchars(__('Feeds', 'powerpress')); ?></button>
150 <button type="button" id="website-tab" class="tablinks" onclick="powerpress_openTab(event, 'settings-website')"><?php echo htmlspecialchars(__('Website', 'powerpress')); ?></button>
151 <button type="button" id="destinations-tab" class="tablinks" onclick="powerpress_openTab(event, 'settings-destinations')"><?php echo htmlspecialchars(__('Destinations', 'powerpress')); ?></button>
152 <!-- <button type="button" id="analytics-tab" class="tablinks" onclick="openTab(event, 'settings-analytics')"><?php echo htmlspecialchars(__('Analytics', 'powerpress')); ?></button> -->
153 <button type="button" id="advanced-tab" class="tablinks" onclick="powerpress_openTab(event, 'settings-advanced')"><?php echo htmlspecialchars(__('Advanced', 'powerpress')); ?></button>
154 <button type="button" id="make-money-tab" class="tablinks" onclick="powerpress_openTab(event, 'settings-make-money')"><?php echo htmlspecialchars(__('Make Money', 'powerpress')); ?></button>
155 <?php
156 $hasChannels = isset($General['channels']) && $General['channels'] == 1;
157 $hasCats = isset($General['cat_casting']) && $General['cat_casting'] == 1;
158 $hasTax = isset($General['taxonomy_podcasting']) && $General['taxonomy_podcasting'] == 1;
159 $hasPT = isset($General['posttype_podcasting']) && $General['posttype_podcasting'] == 1;
160 $slug = $_GET['feed_slug'] ?? '';
161
162 if ((!$hasChannels && !$hasCats && !$hasTax && !$hasPT) || $slug == 'podcast') {
163 ?>
164 <button type="button" id="live-item-tab" class="tablinks" onclick="powerpress_openTab(event, 'settings-live-item')"><?php echo htmlspecialchars(__('Live Item', 'powerpress')); ?></button>
165 <?php } ?>
166 <button type="button" id="experimental-tab" class="tablinks" onclick="powerpress_openTab(event, 'settings-experimental')"><?php echo htmlspecialchars(__('Experimental', 'powerpress')); ?></button>
167 </div>
168
169 <div id="settings-welcome" class="pp-tabcontent active">
170 <?php powerpress_render_sidenav_container('welcome', 'Blubrry Services', $General); ?>
171 <button type="button" style="display: none;" id="welcome-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'welcome-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
172 <div id="welcome-all" class="pp-sidenav-tab active">
173 <?php powerpressadmin_welcome($General, $FeedSettings); ?>
174 </div>
175 </div>
176
177 <div id="settings-feeds" class="pp-tabcontent has-sidenav">
178 <div class="pp-sidenav-toggle-container">
179 <?php powerpress_render_sidenav_toggle('feeds', 'More Feed Settings and Blubrry Services'); ?>
180 <div class="pp-sidenav">
181 <div class="pp-sidenav-extra"><p class="pp-sidenav-extra-text"><b><?php echo htmlspecialchars(__('FEED SETTINGS', 'powerpress')); ?></b></p></div>
182 <button type="button" id="feeds-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'feeds-feeds')"><img class="pp-nav-icon" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/megaphone_gray.svg"><?php echo htmlspecialchars(__('Podcast Feeds', 'powerpress')); ?></button>
183 <button type="button" class="pp-sidenav-tablinks" id="feeds-settings-tab" onclick="sideNav(event, 'feeds-settings')"><img class="pp-nav-icon" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/option_bar_settings_gray.svg"><?php echo htmlspecialchars(__('Feed Settings', 'powerpress')); ?></button>
184 <button type="button" class="pp-sidenav-tablinks" id="feeds-artwork-tab" onclick="sideNav(event, 'feeds-artwork')"><img class="pp-nav-icon" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/camera_gray.svg"><?php echo htmlspecialchars(__('Podcast Artwork', 'powerpress')); ?></button>
185 <button type="button" class="pp-sidenav-tablinks" id="feeds-seo-tab" onclick="sideNav(event, 'feeds-seo')"><img class="pp-nav-icon" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/fileboard_checklist_gray.svg"><?php echo htmlspecialchars(__('Podcast SEO', 'powerpress')); ?></button>
186 <button type="button" class="pp-sidenav-tablinks" id="feeds-basic-tab" onclick="sideNav(event, 'feeds-basic')"><img class="pp-nav-icon" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/edit_gray.svg"><?php echo htmlspecialchars(__('Basic Show Information', 'powerpress')); ?></button>
187 <button type="button" class="pp-sidenav-tablinks" id="feeds-rating-tab" onclick="sideNav(event, 'feeds-rating')"><img class="pp-nav-icon" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/star_favorite_gray.svg"><?php echo htmlspecialchars(__('Rating Settings', 'powerpress')); ?></button>
188 <button type="button" class="pp-sidenav-tablinks" id="feeds-apple-tab" onclick="sideNav(event, 'feeds-apple')"><span id="apple-icon-feed" class="destinations-side-icon" style="margin-left: 2px;"></span><span class="destination-side-text" style="margin-left: 6px;"><?php echo htmlspecialchars(__('Apple Settings', 'powerpress')); ?></span></button>
189 <?php
190 powerpressadmin_edit_blubrry_services($General);
191 ?>
192 <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
193 <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
194 <div class="pp-sidenav-extra"><a href="https://blubrry.com/manual/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST MANUAL', 'powerpress')); ?></a></div>
195 <div class="pp-sidenav-extra"><a href="https://blubrry.com/services/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY RESOURCES', 'powerpress')); ?></a></div>
196 <div class="pp-sidenav-extra"><a href="https://blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY SUPPORT', 'powerpress')); ?></a></div>
197 <div class="pp-sidenav-extra"><a href="https://wordpress.org/support/plugin/powerpress/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY POWERPRESS FORUM', 'powerpress')); ?></a></div>
198 </div>
199 </div>
200 <div id="feeds-feeds" class="pp-sidenav-tab active">
201 <?php
202 powerpressadmin_edit_feed_general($FeedSettings, $General, $FeedAttribs);
203 powerpress_settings_tab_footer();
204 ?>
205 </div>
206 <div id="feeds-settings" class="pp-sidenav-tab">
207 <?php
208 powerpressadmin_edit_feed_settings($FeedSettings, $General, $FeedAttribs);
209 powerpress_settings_tab_footer();
210 ?>
211 </div>
212 <div id="feeds-artwork" class="pp-sidenav-tab">
213 <?php
214 powerpressadmin_edit_artwork($FeedSettings, $General);
215 powerpress_settings_tab_footer();
216 ?>
217 </div>
218 <div id="feeds-seo" class="pp-sidenav-tab">
219 <?php
220 require_once(POWERPRESS_ABSPATH . "/powerpressadmin-search.php");
221 powerpress_admin_search();
222 powerpress_settings_tab_footer();
223 ?>
224 </div>
225 <div id="feeds-basic" class="pp-sidenav-tab">
226 <?php
227 powerpressadmin_edit_funding($FeedSettings);
228 powerpress_settings_tab_footer();
229 ?>
230 </div>
231 <div id="feeds-rating" class="pp-sidenav-tab">
232 <?php
233 powerpressadmin_edit_tv($FeedSettings);
234 powerpress_settings_tab_footer();
235 ?>
236 </div>
237 <div id="feeds-apple" class="pp-sidenav-tab">
238 <?php
239 powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs);
240 powerpress_settings_tab_footer();
241 ?>
242 </div>
243 </div>
244
245 <div id="settings-website" class="pp-tabcontent">
246 <div class="pp-sidenav-toggle-container">
247 <?php powerpress_render_sidenav_toggle('website', 'More Website Settings and Blubrry Services'); ?>
248 <div class="pp-sidenav">
249 <div class="pp-sidenav-extra"><p class="pp-sidenav-extra-text"><b><?php echo htmlspecialchars(__('WEBSITE SETTINGS', 'powerpress')); ?></b></p></div>
250 <button type="button" id="website-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'website-settings')"><img class="pp-nav-icon" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/desktop_gray.svg"><?php echo htmlspecialchars(__('Website Settings', 'powerpress')); ?></button>
251 <button type="button" class="pp-sidenav-tablinks" id="website-blog-tab" onclick="sideNav(event, 'website-blog')"><img class="pp-nav-icon" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/file_gray.svg"><?php echo htmlspecialchars(__('Blog Posts and Pages', 'powerpress')); ?></button>
252 <button type="button" class="pp-sidenav-tablinks" id="website-subscribe-tab" onclick="sideNav(event, 'website-subscribe')"><img class="pp-nav-icon" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/profile_plus_round_gray.svg"><?php echo htmlspecialchars(__('Subscribe Page', 'powerpress')); ?></button>
253 <button type="button" class="pp-sidenav-tablinks" id="website-shortcodes-tab" onclick="sideNav(event, 'website-shortcodes')"><img class="pp-nav-icon" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/connection_pattern_gray.svg"><?php echo htmlspecialchars(__('PowerPress Shortcodes', 'powerpress')); ?></button>
254 <button type="button" class="pp-sidenav-tablinks" id="website-new-window-tab" onclick="sideNav(event, 'website-new-window')"><img class="pp-nav-icon" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/play_gray.svg"><?php echo htmlspecialchars(__('Play in New Window', 'powerpress')); ?></button>
255 <?php
256 powerpressadmin_edit_blubrry_services($General);
257 ?>
258 <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('POWERPRESS DOCUMENTATION', 'powerpress')); ?></a></div>
259 <div class="pp-sidenav-extra"><a href="https://www.blubrry.com/podcast-insider/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST INSIDER BLOG', 'powerpress')); ?></a></div>
260 <div class="pp-sidenav-extra"><a href="https://blubrry.com/manual/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('PODCAST MANUAL', 'powerpress')); ?></a></div>
261 <div class="pp-sidenav-extra"><a href="https://blubrry.com/services/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY RESOURCES', 'powerpress')); ?></a></div>
262 <div class="pp-sidenav-extra"><a href="https://blubrry.com/support/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY SUPPORT', 'powerpress')); ?></a></div>
263 <div class="pp-sidenav-extra"><a href="https://wordpress.org/support/plugin/powerpress/" class="pp-sidenav-extra-text"><?php echo htmlspecialchars(__('BLUBRRY POWERPRESS FORUM', 'powerpress')); ?></a></div>
264 </div>
265 </div>
266
267 <?php
268 if( $General === false )
269 $General = powerpress_get_settings('powerpress_general');
270 $General = powerpress_default_settings($General, 'appearance');
271 if( !isset($General['player_function']) )
272 $General['player_function'] = 1;
273 if( !isset($General['player_aggressive']) )
274 $General['player_aggressive'] = 0;
275 if( !isset($General['new_window_width']) )
276 $General['new_window_width'] = '';
277 if( !isset($General['new_window_height']) )
278 $General['new_window_height'] = '';
279 if( !isset($General['player_width']) )
280 $General['player_width'] = '';
281 if( !isset($General['player_height']) )
282 $General['player_height'] = '';
283 if( !isset($General['player_width_audio']) )
284 $General['player_width_audio'] = '';
285 if( !isset($General['disable_appearance']) )
286 $General['disable_appearance'] = false;
287 if( !isset($General['subscribe_links']) )
288 $General['subscribe_links'] = false;
289 if( !isset($General['subscribe_label']) )
290 $General['subscribe_label'] = '';
291 require_once( dirname(__FILE__).'/views/settings_tab_appearance.php' );
292
293 ?>
294
295
296 <div id="website-settings" class="pp-sidenav-tab active">
297 <?php
298 powerpressadmin_website_settings($General, $FeedSettings);
299 powerpress_settings_tab_footer();
300 ?>
301 </div>
302 <div id="website-blog" class="pp-sidenav-tab">
303 <?php
304 powerpressadmin_blog_settings($General, $FeedSettings);
305 powerpress_settings_tab_footer();
306 ?>
307 </div>
308 <div id="website-subscribe" class="pp-sidenav-tab">
309 <?php
310 powerpress_subscribe_settings($General, $FeedSettings);
311 powerpress_settings_tab_footer();
312 ?>
313 </div>
314 <div id="website-shortcodes" class="pp-sidenav-tab">
315 <?php
316 powerpress_shortcode_settings($General, $FeedAttribs);
317 powerpress_settings_tab_footer();
318 ?>
319 </div>
320 <div id="website-new-window" class="pp-sidenav-tab">
321 <?php
322 powerpressadmin_new_window_settings($General, $FeedSettings);
323 powerpress_settings_tab_footer();
324 ?>
325 </div>
326 </div>
327
328 <div id="settings-destinations" class="pp-tabcontent">
329 <?php
330 powerpressadmin_edit_destinations($FeedSettings, $General, $FeedAttribs);
331 ?>
332 </div>
333
334 <div id="settings-analytics" class="pp-tabcontent">
335 <div class="pp-sidenav">
336 <?php
337 powerpressadmin_edit_blubrry_services($General);
338 ?>
339 </div>
340 <?php
341 if( $MultiSiteServiceSettings && defined('POWERPRESS_MULTISITE_VERSION') )
342 {
343 PowerPressMultiSitePlugin::edit_blubrry_services($General);
344 }
345 else
346 {
347 //powerpressadmin_edit_media_statistics($General);
348 }
349 ?>
350 </div>
351
352 <div id="settings-advanced" class="pp-tabcontent">
353 <?php powerpress_render_sidenav_container('advanced', 'Blubrry Services', $General); ?>
354 <?php
355 powerpressadmin_advanced_options($General, false);
356 ?>
357 </div>
358
359 <div id="settings-make-money" class="pp-tabcontent">
360 <?php powerpress_render_sidenav_container('make-money', 'Blubrry Services', $General); ?>
361 <?php
362 $publisher_origin = rtrim(powerpress_get_publish_url(), '/'); ?>
363 <button type="button" style="display: none;" id="make-money-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'make-money-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
364
365 <div id="make-money-all" class="pp-sidenav-tab active">
366 <div class="pp_container">
367 <h1 class="pp-heading"><?php echo __('Programmatic Advertising', 'powerpress'); ?></h1>
368 <br />
369 <p class="pp-sub"><?php echo __('Blubrry hosting customers have access to our Programmatic Advertising service, which automatically puts ads into your show and pays YOU out directly from Blubrry! Simply configure your shows in the Blubrry Publisher then use the link there to sync you WordPress site.', 'powerpress'); ?></p>
370 <br />
371 <p class="pp-main"><a class="pp-main" target="_blank"
372 href="https://blubrry.com/services/programmatic-advertising/"
373 class="pp_align-center"><?php echo __('Learn More', 'powerpress'); ?></a></p>
374 <br />
375 <p class="pp-main"><a class="pp-main"
376 href="<?php echo $publisher_origin; ?>/partners/programmatic-advertising-management/"
377 class="pp_align-center"><?php echo __('Configure Shows for Programmatic Ads', 'powerpress'); ?></a></p>
378
379 </div>
380 </div>
381 </div>
382
383 <div id="settings-live-item" class="pp-tabcontent">
384 <?php powerpress_render_sidenav_container('live-item', 'Blubrry Services', $General); ?>
385 <?php powerpressadmin_live_item_options($FeedSettings); ?>
386 </div>
387
388 <div id="settings-experimental" class="pp-tabcontent">
389 <?php powerpress_render_sidenav_container('experimental', 'Blubrry Services', $General); ?>
390 <?php
391 powerpressadmin_experimental_options($FeedSettings);
392 ?>
393 </div>
394
395 </div>
396 <div class="clear"></div>
397
398 <?php
399 }
400
401 function powerpressadmin_live_item_options($Feed)
402 {
403 $lit = isset($Feed['live_item']) ? $Feed['live_item'] : array(
404 'enabled' => '0',
405 'status' => 'Pending',
406 'guid' => '',
407 'start_date_time' => '',
408 'end_date_time' => '',
409 'timezone' => 'EST',
410 'title' => '',
411 'stream_link' => '',
412 'fallback_link' => '',
413 'episode_link' => '',
414 'cover_art' => '',
415 'stream_type' => 'audio/mpeg',
416 'description' => '',
417 'old_status' => 'Pending'
418 );
419
420 $litError = get_option('lit_error');
421
422 if ($litError)
423 update_option('lit_error', false);
424
425 $litErrorMsg = get_option('lit_error_msg');
426
427 if ($litErrorMsg != "")
428 update_option('lit_error_msg', '');
429
430 ?>
431 <style>
432 .alert {
433 font-size: 130%;
434 padding: .5%;
435 background-color: #f44336; /* Red */
436 color: white;
437 display: inline-block;
438 width: 99%;
439 /*margin-bottom: 1.5%;*/
440 }
441 .alert-danger {
442 background-color: #FEF7F8;
443 border-left: solid;
444 border-left-color: #E36F58;
445 color: #444444;
446 border-left-width: 10px;
447 max-width: 100%;
448 }
449 </style>
450 <div style="margin-left: 10px;">
451 <button type="button" style="display: none;" id="live-item-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'live-item-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
452 <div id="live-item-all" class="pp-sidenav-tab active" style="width: 100%;">
453 <h1 class="pp-heading"><?php echo __('Live Item Tag', 'powerpress'); ?></h1>
454 <?php if ($litError) {
455 ?>
456 <div class="alert alert-danger" role="alert">
457 <span><?php echo __($litErrorMsg, 'powerpress'); ?></span>
458 </div>
459 <?php } ?>
460 <p><?php echo __('This is a new initiative as part of Podcasting 2.0. The Live Item tag is for those with a live component to your show, whether it be an audio stream or a video stream. It is important to know that only apps that designate the LIT function at NewPodcastApps.com support this.', 'powerpress'); ?></p>
461 <p><?php echo __('Going live is a bigger part of podcasting now. What has been developed by Podcasting 2.0 is the ability for you to show up as live in the supported apps. Giving those listeners the ability to be notified in supported podcasting apps that you are live to be able to listen or watch within the podcasting apps that support this.', 'powerpress'); ?></p>
462 <div class="col">
463 <div class="row">
464 <input type="hidden" name="Feed[live_item][enabled]" value="0">
465 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="Feed[live_item][enabled]" value="1" <?php echo ( !empty($lit['enabled']) && $lit['enabled'] != '0' ?' checked':''); ?>>
466 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em; display: flex; align-items: center; justify-content: flex-start;"">
467 <p class="pp-main">
468 Enable Live Item Feature
469 <div class="pp-tooltip-right" style="height: 16px; width: 16px; margin-left: 5px;">i
470 <span class="text-pp-tooltip" style="top: -50%; min-width: 200px;"><?php echo esc_html(__('By enabling this, you will notify apps of the status of your event, be it Pending, Live, or Ended.', 'powerpress')); ?></span>
471 </div>
472 </p>
473 </div>
474 </div>
475 <hr style="margin-left: -15px; margin-right: -15px;"/>
476 <div class="row">
477 <h2><?php echo __('Live Item Settings', 'powerpress'); ?></h2>
478 </div>
479 <div class="row">
480 <div class="col-lg-2 pl-0">
481 <label for="lit-status" style="margin: 0; display: flex; align-items: center; justify-content: flex-start;">
482 <h3><?php echo __("Status", "powerpress"); ?></h3>
483 <div class="pp-tooltip-right" style="height: 16px; width: 16px; margin-left: 5px;">i
484 <span class="text-pp-tooltip" style="top: -50%; min-width: 200px;">
485 <?php echo esc_html(__("You must set your statuses for each part of the process.
486 Switching from Pending to Live to Ended is not automated.
487 You have to make these status changes to inform platforms of the current Live status.", "powerpress")); ?>
488 <br />
489 <br />
490 <?php echo __("Pending: Announce the parameters of when you expect to go live. This can be set hours or days before the event.", "powerpress")?>
491 <br/>
492 <br />
493 <?php echo __("Live: When you are moments away from going live, update your setting to Live. This will let the supported apps know that you are truly going live. Please note that deviations on when you are expected to go live and when you actually do can change. This will inform the apps you are indeed live.", "powerpress")?>
494 <br />
495 <br />
496 <?php echo __("Ended: Inform apps that your Live show has ended.", "powerpress")?>
497 </span>
498 </div>
499 </label>
500 <input type="hidden" name="Feed[live_item][old_status]" value="<?php echo !empty($lit['status']) ? $lit['status'] : 'Pending'; ?>" />
501 <input type="hidden" name="Feed[live_item][podping_status]" value="<?php echo isset($lit['podping_status']) ? $lit['podping_status'] : -1; ?>" />
502 <select name="Feed[live_item][status]" id="lit-status" class="pp-settings-select" style="width: 100% !important; font-size: 95%;">
503 <option <?php echo (!empty($lit['status']) && $lit['status'] == 'Pending') || empty($lit['status']) ? 'selected' : '' ?> value="Pending"><?php echo __("Pending", "powerpress"); ?></option>
504 <option <?php echo !empty($lit['status']) && $lit['status'] == 'Live' ? 'selected' : '' ?> value="Live"><?php echo __("Live", "powerpress"); ?></option>
505 <option <?php echo !empty($lit['status']) && $lit['status'] == 'Ended' ? 'selected' : '' ?> value="Ended"><?php echo __("Ended", "powerpress"); ?></option>
506 </select>
507 </div>
508 <div class="col-lg-2 pl-0"></div>
509 <div class="col-lg-8 pl-0">
510 <input type="hidden" name="Feed[live_item][guid]" value="<?php echo !empty($lit['guid']) ? $lit['guid'] : ''; ?>">
511 <label for="lit-guid" style="margin: 0; display: flex; align-items: center; justify-content: flex-start;">
512 <h3><?php echo __("Live Item Guid", "powerpress"); ?></h3>
513 <div class="pp-tooltip-right" style="height: 16px; width: 16px; margin-left: 5px;">i
514 <span class="text-pp-tooltip" style="top: -50%; min-width: 200px;"><?php echo esc_html(__('Like every Podcast, Podcasting 2.0 assigns a GUID for your live events. This is informational only and highly technical but this GUID will stay with your live events for the life of your show.', 'powerpress')); ?></span>
515 </div>
516 </label>
517 <p><?php echo !empty($lit['guid']) ? $lit['guid'] : __("Your GUID will be created once you give your live item a title.", "powerpress"); ?></p>
518 </div>
519 </div>
520 <div class="row">
521 <div class="col-lg-4 pl-0">
522 <label for="lit-start-date" style="margin: 0;"><h3><?php echo __("Start Date/Time", "powerpress"); ?><span style="color: red;">*</span></h3></label>
523 <input id="lit-start-date" name="Feed[live_item][start_date_time]" class="pp-settings-text-input" type="datetime-local" value="<?php echo !empty($lit['start_date_time']) ? $lit['start_date_time'] : "" ?>" />
524 </div>
525 <div class="col-lg-4 pl-0">
526 <label for="lit-end-date" style="margin: 0;"><h3><?php echo __("End Date/Time", "powerpress"); ?><span style="color: red;">*</span></h3></label>
527 <input id="lit-end-date" name="Feed[live_item][end_date_time]" class="pp-settings-text-input" type="datetime-local" value="<?php echo !empty($lit['end_date_time']) ? $lit['end_date_time'] : "" ?>" />
528 </div>
529 <div class="col-lg-4 pl-0">
530 <label for="lit-timezone" style="margin: 0; display: flex; align-items: center; justify-content: flex-start;">
531 <h3><?php echo __("Timezone", "powerpress"); ?><span style="color: red;">*</span></h3>
532 <div class="pp-tooltip-right" style="height: 16px; width: 16px; margin-left: 5px;">i
533 <span class="text-pp-tooltip" style="top: -50%; min-width: 200px;"><?php echo esc_html(__('Note: (EST, CST, MST, and PST) are from March 12th to Nov 15th, with (EDT, CDT, MDT, and PDT) from Nov 16th to March 11th)', 'powerpress')); ?></span>
534 </div>
535 </label>
536 <?php printTimezoneSelector(!empty($lit['timezone']) ? $lit['timezone'] : 'EST'); ?>
537 </div>
538 </div>
539 <div class="row">
540 <div class="col-lg-12 pl-0">
541 <label for="lit-title" style="margin: 0;"><h3><?php echo __("Livestream Title", "powerpress"); ?><span style="color: red;">*</span></h3></label>
542 <input id="lit-title" maxlength="100" class="pp-settings-text-input" type="text" name="Feed[live_item][title]" value="<?php echo !empty($lit['title']) ? htmlspecialchars($lit['title']) : ''; ?>" maxlength="50" />
543 </div>
544 </div>
545 <div class="row">
546 <div class="col-lg-2 pl-0 pr-0">
547 <label for="lit-stream-type" style="margin: 0;"><h3><?php echo __("Stream Type", "powerpress"); ?><span style="color: red;">*</span></h3></label>
548 <select id="lit-stream-type" name="Feed[live_item][stream_type]" class="pp-settings-select" style="width: 100% !important; font-size: 95%;">
549 <option <?php echo (!empty($lit['stream_type']) && $lit['stream_type'] == 'audio/mpeg') || empty($lit['stream_type']) ? 'selected' : '' ?> value="audio/mpeg">Audio - .mp3</option>
550 <option <?php echo !empty($lit['stream_type']) && $lit['stream_type'] == 'audio/x-m4a' ? 'selected' : '' ?> value="audio/x-m4a">Audio - .m4a</option>
551 <option <?php echo !empty($lit['stream_type']) && $lit['stream_type'] == 'video/mp4' ? 'selected' : '' ?> value="video/mp4">Video - .mp4</option>
552 <option <?php echo !empty($lit['stream_type']) && $lit['stream_type'] == 'application/x-mpegURL' ? 'selected' : '' ?> value="application/x-mpegURL">HLS - .m3u8</option>
553 </select>
554 </div>
555 <div class="col-lg-5">
556 <label for="lit-stream-link" style="margin: 0; display: flex; align-items: center; justify-content: flex-start;">
557 <h3><?php echo __("Audio/Video Steam Link", "powerpress"); ?><span style="color: red;">*</span></h3>
558 <div class="pp-tooltip-right" style="height: 16px; width: 16px; margin-left: 5px;">i
559 <span class="text-pp-tooltip" style="top: -50%; min-width: 200px;"><?php echo esc_html(__("This is the link to your livestream. It could be your live audio stream link if you're using Icecast/Shoutcast, or it can be a link to the video endpoint, which is typically an RTMP link. Live video is currently less supported than an audio stream.", 'powerpress')); ?></span>
560 </div>
561 </label>
562 <input id="lit-stream-link" class="pp-settings-text-input" type="text" name="Feed[live_item][stream_link]" value="<?php echo !empty($lit['stream_link']) ? htmlspecialchars($lit['stream_link']) : ''; ?>" />
563 </div>
564 <div class="col-lg-5 pl-0">
565 <label for="lit-fallback-link" style="margin: 0; display: flex; align-items: center; justify-content: flex-start;">
566 <h3><?php echo __("Fallback Link", "powerpress"); ?><span style="color: red;">*</span></h3>
567 <div class="pp-tooltip-right" style="height: 16px; width: 16px; margin-left: 5px;">i
568 <span class="text-pp-tooltip" style="top: -50%; min-width: 200px;"><?php echo esc_html(__("If the podcast app does not support your livestream protocol, you need to link to your live YouTube episode or a dedicated page on your website with the live audio or video stream contained there.", 'powerpress')); ?></span>
569 </div>
570 </label>
571 <input id="lit-fallback-link" class="pp-settings-text-input" type="text" name="Feed[live_item][fallback_link]" value="<?php echo !empty($lit['fallback_link']) ? htmlspecialchars($lit['fallback_link']) : ''; ?>" />
572 </div>
573 </div>
574 <div class="row">
575 <div class="col-lg-2 pl-0 pr-0"></div>
576 <div class="col-lg-5">
577 <label for="lit-episode-link" style="margin: 0; display: flex; align-items: center; justify-content: flex-start;">
578 <h3><?php echo __("Episode Link (Optional)", "powerpress"); ?></h3>
579 <div class="pp-tooltip-right" style="height: 16px; width: 16px; margin-left: 5px;">i
580 <span class="text-pp-tooltip" style="top: -50%; min-width: 200px;"><?php echo esc_html(__("This is a URL to an episode page that supports the live event. If you do not have a dedicated page for your live event, you could push them to a dedicated page that shows the schedule of your live events. You can be creative here. For example: Link to a fallback link.", 'powerpress')); ?></span>
581 </div>
582 </label>
583 <input id="lit-episode-link" class="pp-settings-text-input" type="text" name="Feed[live_item][episode_link]" value="<?php echo !empty($lit['episode_link']) ? htmlspecialchars($lit['episode_link']) : ''; ?>" />
584 </div>
585 <div class="col-lg-5 pl-0">
586 <label for="lit-cover-art" style="margin: 0; display: flex; align-items: center; justify-content: flex-start;">
587 <h3><?php echo __("Cover Art (Optional)", "powerpress"); ?></h3>
588 <div class="pp-tooltip-right" style="height: 16px; width: 16px; margin-left: 5px;">i
589 <span class="text-pp-tooltip" style="top: -50%; min-width: 200px;"><?php echo esc_html(__("This is album art that will only be shown when you are live so if you want to have specific art shown while you live, you can provide a link to it. Minimum 1400x1400, similar to Apple podcast art but solely used for your live events.", 'powerpress')); ?></span>
590 </div>
591 </label>
592 <input id="lit-cover-art" class="pp-settings-text-input" type="text" name="Feed[live_item][cover_art]" value="<?php echo !empty($lit['cover_art']) ? htmlspecialchars($lit['cover_art']) : ''; ?>" />
593 </div>
594 </div>
595 <div class="row">
596 <div class="col-lg-12 pl-0">
597 <label for="lit-description" style="margin: 0;"><h3><?php echo __("Description (Optional)", "powerpress"); ?></h3></label>
598 <textarea id="lit-description" name="Feed[live_item][description]" class="pp-settings-text-input" rows="10"><?php echo !empty($lit['description']) ? htmlspecialchars($lit['description']) : ""; ?></textarea>
599 </div>
600 </div>
601 </div>
602
603 <?php powerpress_settings_tab_footer(); ?>
604 </div>
605 </div>
606
607 <?php
608 }
609
610 function printTimezoneSelector($timezoneVal) {
611 $tzlist = DateTimeZone::listAbbreviations();
612 echo '<select name="Feed[live_item][timezone]" id="lit-timezone" class="pp-settings-select" style="width: 100% !important; font-size: 95%;">';
613 foreach ($tzlist as $tz => $value) {
614 if (strtoupper($tz) == $timezoneVal)
615 echo '<option selected value="' . strtoupper($tz) . '">' . strtoupper($tz) . '</option>';
616 else
617 echo '<option value="' . strtoupper($tz) . '">' . strtoupper($tz) . '</option>';
618
619 if ($tz == 'ywt')
620 break;
621 }
622 echo '</select>';
623 }
624
625 function powerpressadmin_advanced_options($General, $link_account = false)
626 {
627 // Break the bottom section here out into it's own function
628 $ChannelsCheckbox = '';
629 if( !empty($General['custom_feeds']) )
630 $ChannelsCheckbox = ' onclick="alert(\''. __('You must delete all of the Podcast Channels to disable this option.', 'powerpress') .'\');return false;"';
631 $CategoryCheckbox = '';
632 //if( !empty($General['custom_cat_feeds']) ) // Decided ont to include this warning because it may imply that you have to delete the actual category, which is not true.
633 // $CategoryCheckbox = ' onclick="alert(\'You must remove podcasting from the categories to disable this option.\');return false;"';
634 ?>
635 <script language="javascript">
636
637 jQuery(document).ready( function() {
638
639 jQuery('.pp-expand-section').click( function(e) {
640 e.preventDefault();
641
642 if( jQuery(this).hasClass('pp-expand-section-expanded') ) {
643 jQuery(this).removeClass('pp-expand-section-expanded');
644 jQuery(this).parent().next('div').hide(400);
645 jQuery(this).blur();
646 } else {
647 jQuery(this).addClass('pp-expand-section-expanded');
648 jQuery(this).parent().next('div').show(400);
649 jQuery(this).blur();
650 }
651 });
652 });
653
654 function goToPodcastSEO() {
655 jQuery("#feeds-tab").click();
656 jQuery("#feeds-seo-tab").click();
657 return false;
658 }
659 </script>
660 <div style="margin-left: 10px;">
661
662 <button type="button" style="display: none;" id="advanced-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'advanced-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
663 <div id="advanced-all" class="pp-sidenav-tab active">
664 <h1 class="pp-heading"><?php echo __('Advanced Settings', 'powerpress'); ?></h1>
665
666 <div>
667 <input type="hidden" name="General[network_mode]" value="0" />
668 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="General[network_mode]" value="1" <?php echo ( !empty($General['network_mode']) ?' checked':''); ?>/>
669 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
670 <p class="pp-main"><?php echo __('Multi-Program Mode', 'powerpress'); ?></p>
671 <p class="pp-sub"><?php echo __('This feature allows you to publish to multiple Blubrry-hosted shows from a single user account.', 'powerpress'); ?></p>
672 </div>
673 </div>
674 <div>
675 <input type="hidden" name="General[use_caps]" value="0" />
676 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="General[use_caps]" value="1" <?php echo ( !empty($General['use_caps']) ?' checked':''); ?>/>
677 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
678 <p class="pp-main"><?php echo __('User Role Management', 'powerpress'); ?></p>
679 <p class="pp-sub"><?php echo __('Adding User Role Management will allow administrators, editors and authors access to create and configure podcast episodes.
680 This feature is supported by WordPress Roles and Capabilities.', 'powerpress'); ?>
681 </p>
682 </div>
683 </div>
684 <div>
685 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="NULL[import_podcast]" value="1" checked disabled />
686 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
687 <p class="pp-main"><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_import_feed.php'); ?>"><?php echo __('Import Podcast', 'powerpress'); ?></a></p>
688 <p class="pp-sub"><?php echo __('Import podcast feed from SoundCloud, LibSyn, PodBean or other podcast service.', 'powerpress'); ?></p>
689 </div>
690 </div>
691 <div>
692 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="NULL[migrate_media]" value="1" checked disabled />
693 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
694 <p class="pp-main"><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_migrate.php'); ?>"><?php echo __('Migrate Media', 'powerpress'); ?></a></p>
695 <p class="pp-sub"><?php echo __('Migrate media files to Blubrry Podcast Media Hosting with only a few clicks.', 'powerpress'); ?></p>
696 </div>
697 </div>
698 <div>
699 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="NULL[podcasting_seo]" value="1" checked disabled />
700 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
701 <p class="pp-main"><a id="advanced-tab-seo-link" onclick="goToPodcastSEO();return false;"><?php echo __('Podcasting SEO', 'powerpress'); ?></a></p>
702 <p class="pp-sub"><?php echo __('Optimize how your podcast appears in Internet search results.', 'powerpress'); ?></p>
703 </div>
704 </div>
705
706 <div>
707 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="NULL[player_options]" value="1" checked disabled />
708 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
709 <p class="pp-main"><?php echo __('Audio Player Options', 'powerpress'); ?></p>
710 <p class="pp-sub"><?php echo __('Select from 3 different web based audio players.', 'powerpress'); ?>
711 <b><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_player.php&sp=1'); ?>">(<?php echo __('configure audio player', 'powerpress'); ?>)</a></b></p>
712 </div>
713 </div>
714 <div>
715 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="NULL[video_player_options]" value="1" checked disabled />
716 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
717 <p class="pp-main"><?php echo __('Video Player Options', 'powerpress'); ?></p>
718 <p class="pp-sub"><?php echo __('Select from 3 different web based video players.', 'powerpress'); ?>
719 <b><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_videoplayer.php&sp=1'); ?>">(<?php echo __('configure video player', 'powerpress'); ?>)</a></b></p>
720 </div>
721 </div>
722 <div>
723 <input type="hidden" name="General[disable_wptexturize]" value="0" />
724 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="General[disable_wptexturize]" value="1" <?php echo ( !empty($General['disable_wptexturize']) ?' checked':''); ?> />
725 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
726 <div style="display: flex; align-items: center;">
727 <p class="pp-main" style="margin: 0;"><?php echo __('Disable Smart Typography', 'powerpress'); ?></p>
728 <div class="pp-tooltip-right" style="height: 16px; width: 16px; margin-left: 5px;">i
729 <span class="text-pp-tooltip" style="top: -50%; min-width: 250px;"><?php echo esc_html(__('PowerPress uses a WordPress feature which automatically converts straight quotes into "smart" punctuation. Some publishers require plain ASCII characters, so this option disables that behavior in podcast feeds.', 'powerpress')); ?></span>
730 </div>
731 </div>
732 <p class="pp-sub"><?php echo __('Keeps quotes and punctuation exactly as you entered them in RSS feeds. Helpful if you submit content to syndication partners that don\'t allow "smart" punctuation (e.g., AP, NYT).', 'powerpress'); ?></p>
733 </div>
734 </div>
735 <div>
736 <input type="hidden" name="General[channels]" value="0" />
737 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="General[channels]" value="1" <?php echo ( !empty($General['channels']) ?' checked':''); echo $ChannelsCheckbox; ?> />
738 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
739 <p class="pp-main"><?php echo __('Custom Podcast Channels', 'powerpress'); ?></p>
740 <p class="pp-sub"><?php echo __('Manage multiple media files and/or formats to one blog post.', 'powerpress'); ?>
741 <?php if( empty($General['channels']) ) { ?>
742 (<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)
743 <?php } else { ?>
744 <b><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_customfeeds.php'); ?>">(<?php echo __('configure podcast channels', 'powerpress'); ?>)</a></b>
745 <?php } ?>
746 </p>
747 </div>
748 </div>
749 <div>
750 <input type="hidden" name="General[cat_casting]" value="0" />
751 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="General[cat_casting]" value="1" <?php echo ( !empty($General['cat_casting']) ?' checked':''); echo $CategoryCheckbox; ?> />
752 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
753 <p class="pp-main"><?php echo __('Category Podcasting', 'powerpress'); ?></p>
754 <p class="pp-sub"><?php echo __('Manage podcasting for specific categories.', 'powerpress'); ?>
755 <?php if( empty($General['cat_casting']) ) { ?>
756 (<?php echo __('feature will appear in left menu when enabled', 'powerpress'); ?>)
757 <?php } else { ?>
758 <b><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_categoryfeeds.php'); ?>">(<?php echo __('configure podcast categories', 'powerpress'); ?>)</a></b>
759 <?php } ?>
760 </p>
761 </div>
762 </div>
763
764
765 <?php if (!empty($General['taxonomy_podcasting'])) { ?>
766 <div id="pp-taxonomy-podcasting-section">
767 <input type="hidden" name="General[taxonomy_podcasting]" value="1" />
768 <input class="pp-settings-checkbox pp-deprecated-feature-checkbox" data-feature="taxonomy_podcasting" style="margin-top: 3em;" type="checkbox" value="1" checked />
769 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
770 <p class="pp-main"><?php echo __('Taxonomy Podcasting', 'powerpress'); ?></p>
771 <p class="pp-sub"><?php echo __('Manage podcasting for specific taxonomies.', 'powerpress'); ?>
772 <b><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_taxonomyfeeds.php'); ?>">(<?php echo __('configure taxonomy podcasting', 'powerpress'); ?>)</a></b>
773 </p>
774 <p class="pp-sub" style="color: #996800; font-style: italic;"><?php echo __("We're phasing this out. If you disable it, it can't be re-enabled later.", 'powerpress'); ?></p>
775 </div>
776 </div>
777 <?php } ?>
778 <?php if (!empty($General['posttype_podcasting'])) { ?>
779 <div id="pp-posttype-podcasting-section">
780 <input type="hidden" name="General[posttype_podcasting]" value="1" />
781 <input class="pp-settings-checkbox pp-deprecated-feature-checkbox" data-feature="posttype_podcasting" style="margin-top: 3em;" type="checkbox" value="1" checked />
782 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
783 <p class="pp-main"><?php echo __('Post Type Podcasting', 'powerpress'); ?></p>
784 <p class="pp-sub"><?php echo __('Manage podcasting for specific post types.', 'powerpress'); ?>
785 <b><a href="<?php echo admin_url('admin.php?page=powerpress/powerpressadmin_posttypefeeds.php'); ?>">(<?php echo __('configure post type podcasting', 'powerpress'); ?>)</a></b>
786 </p>
787 <p class="pp-sub" style="color: #996800; font-style: italic;"><?php echo __("We're phasing this out. If you disable it, it can't be re-enabled later.", 'powerpress'); ?></p>
788 </div>
789 </div>
790 <?php } ?>
791
792 <!-- DEPRECATED FEATURE CONFIRMATION MODAL -->
793 <?php if (!empty($General['taxonomy_podcasting']) || !empty($General['posttype_podcasting'])) { ?>
794 <div id="pp-deprecated-feature-modal" class="pp-modal" style="display:none;">
795 <div class="pp-modal-content">
796 <h3><?php echo __('Disable deprecated feature?', 'powerpress'); ?></h3>
797 <p><?php echo __("If you turn this off, you won't be able to re-enable it later.", 'powerpress'); ?></p>
798 <div class="pp-modal-options">
799 <label><input type="radio" name="pp_deprecated_confirm" value="keep" checked /> <?php echo __('Keep Enabled', 'powerpress'); ?></label>
800 <label><input type="radio" name="pp_deprecated_confirm" value="disable" /> <?php echo __('Disable', 'powerpress'); ?></label>
801 </div>
802 <div class="pp-modal-actions">
803 <button type="button" id="pp-deprecated-confirm-btn" class="button button-primary"><?php echo __('Confirm', 'powerpress'); ?></button>
804 </div>
805 </div>
806 </div>
807 <input type="hidden" id="pp-deprecated-nonce" value="<?php echo wp_create_nonce('powerpress-disable-deprecated'); ?>" />
808 <?php } ?>
809 <div>
810 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="General[playlist_player]" value="1" <?php echo ( !empty($General['playlist_player']) ?' checked':''); ?> />
811 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
812 <p class="pp-main"><?php echo __('PowerPress Playlist Player', 'powerpress'); ?></p>
813 <p class="pp-sub"><?php echo __('Create playlists for your podcasts.', 'powerpress'); ?>
814 <b><a href="https://blubrry.com/support/powerpress-documentation/powerpress-playlist-shortcode/" target="_blank">(<?php echo __('learn more', 'powerpress'); ?>)</a></b>
815 </p>
816 </div>
817 </div>
818 <div>
819 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="General[powerpress_network]" value="1" <?php echo ( !empty($General['powerpress_network']) ?' checked':''); ?> />
820 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
821 <p class="pp-main"><?php echo __('PowerPress Network', 'powerpress'); ?></p>
822 <p class="pp-sub"><?php echo __('Create a network of podcasts.', 'powerpress'); ?>
823 <?php if (empty($General['powerpress_network'])): ?>
824 (<?php _e('feature will appear in left menu when enabled', 'powerpress'); ?>)
825 <b><a href="https://blubrry.com/support/powerpress-documentation/podcast-network/" target="_blank">(<?php echo __('learn more', 'powerpress'); ?>)</a></b>
826 <?php else: ?>
827 <b><a href="<?php echo admin_url('admin.php?page=network-plugin'); ?>">(<?php _e('Configure PowerPress Network', 'powerpress'); ?>)</a></b>
828 <?php endif; ?>
829 </p>
830 </div>
831 </div>
832 <div>
833 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="General[powerpress_accept_json]" value="1" <?php echo ( !empty($General['powerpress_accept_json']) ?' checked':''); ?> />
834 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
835 <p class="pp-main"><?php echo __('Allow JSON uploads', 'powerpress'); ?></p>
836 <p class="pp-sub"><?php echo __('Check this box if you plan to upload chapter files to your WordPress site.', 'powerpress'); ?>
837 </p>
838 </div>
839 </div>
840 <div>
841 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="General[pp_show_block_errors]" value="1" <?php echo ( !isset($General['pp_show_block_errors']) || $General['pp_show_block_errors'] ?' checked':''); ?> />
842 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
843 <p class="pp-main"><?php echo __('Show errors in Block Editor', 'powerpress'); ?></p>
844 <p class="pp-sub"><?php echo __('Disable if you are not planning to use the PowerPress Block.', 'powerpress'); ?>
845 </p>
846 </div>
847 </div>
848 <div>
849 <input class="pp-settings-checkbox" style="margin-top: 3em;" type="checkbox" name="General[powerpress_self_hosted_media]" value="1" <?php echo ( !empty($General['powerpress_self_hosted_media']) ?' checked':''); ?> />
850 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 2em;">
851 <p class="pp-main"><?php echo __('Disable server-side request forgery check', 'powerpress'); ?></p>
852 <p class="pp-sub"><?php echo __('Check this box if you host your podcast media on your WordPress site or somewhere in your local network, so that we can validate your media.', 'powerpress'); ?>
853 </p>
854 </div>
855 </div>
856 <?php
857 powerpressadmin_edit_media_statistics($General);
858 powerpress_settings_tab_footer(); ?>
859 </div>
860 </div>
861
862 <?php
863 }
864
865 function powerpressadmin_experimental_options($General, $feed_slug = 'podcast', $link_account = false)
866 {
867 $valueError = isset($General['value_error']) ? $General['value_error'] : "no";
868 $valueError = $valueError == "yes";
869 $valueErrorMsg = isset($General['value_error_message']) ? $General['value_error_message'] : "";
870 ?>
871 <style>
872 .value-btn:hover {
873 cursor: pointer;
874 }
875 </style>
876 <div style="margin-left: 10px;">
877 <button type="button" style="display: none;" id="experimental-default-open" class="pp-sidenav-tablinks active" onclick="sideNav(event, 'experimental-all')"><img class="pp-nav-icon" style="width: 22px;" alt="" src="<?php echo powerpress_get_root_url(); ?>images/settings_nav_icons/rss-symbol.svg"><?php echo htmlspecialchars(__('Hidden button', 'powerpress')); ?></button>
878 <div id="experimental-all" class="pp-sidenav-tab active" style="width: 100%;">
879 <div style="display: flex; flex-direction: row; justify-content: flex-start; align-items: center;">
880 <h1 class="pp-heading"><?php echo __('Value4Value (V4V)', 'powerpress'); ?></h1>
881 <a href="https://blubrry.com/support/podcasting-2-0-introduction/" style="color: inherit; text-decoration: none;" target="_blank"><div class="pp-tooltip-right" style="height: 20px; width: 20px; margin: 1ch 0 0 1ch;">i</div></a>
882 </div>
883
884 <?php
885 if ($valueError) {
886 ?>
887 <div class="alert alert-danger" role="alert">
888 <span><?php echo __($valueErrorMsg, 'powerpress'); ?></span>
889 </div>
890 <?php } ?>
891 <div class="row mr-0 ml-0">
892 <p class="pp-sub">
893 <?php
894 echo __('The Value Tag is part of the Podcasting 2.0 initiative geared at helping podcasters receive contributions from their listeners.
895 We highly recommend you review our dedicated documentation on the Value Tag as it is a complex topic.
896 Blubrry has partnered with Alby to participate in the Value 4 Value podcast model. Signing up with Alby
897 Signing up with ', 'powerpress');
898 echo '<a href="http://getalby.com/">'.__('Alby', 'powerpress').'</a> ';
899 echo __('gives you the code snippet you need in the Value Tag box. There is a small monthly fee to have an Alby Hub/Wallet.', 'powerpress');
900 ?>
901 </p>
902 </div>
903 <div class="row mr-0 ml-0 mt-4">
904 <p class="pp-sub">
905 <?php
906 echo __('Alby and Fountain users only need to enter their Alby or Fountain address and click the arrow, and we will pre-populate the appropriate fields.', 'powerpress');
907 ?>
908 </p>
909 </div>
910 <div class="row mr-0 ml-0 mt-4">
911 <p class="pp-sub">
912 <?php echo __('Note:', 'powerpress'); ?>
913 <?php echo __('Powerpress adds an automatic 3% split to support the development of the plug-in . Thanks for your support!', 'powerpress'); ?>
914 </p>
915 </div>
916 <div class="row mr-0 ml-0 mt-4">
917 <p class="pp-sub">
918 <strong><?php echo __('Warning:', 'powerpress'); ?></strong>
919 <?php echo __('For those entering the data manually, you should check with your vendor on the valid entries for each field.', 'powerpress'); ?>
920 </p>
921 </div>
922
923 <!--
924 Value4Value Template Renderer
925 -->
926 <?php
927 powerpress_render_template([
928 'type' => 'v4v',
929 'context' => 'channel',
930 'FeedSlug' => $feed_slug,
931 'Data' => $General,
932 'NamePrefix' => "Feed",
933 'hide_section_header' => true,
934 'show_inherit_checkbox' => false
935 ]);
936 ?>
937 <?php powerpress_settings_tab_footer(); ?>
938 </div>
939 </div>
940 <script defer>
941 document.addEventListener('DOMContentLoaded', function() {
942 initValueRecipientManager( '<?php echo $feed_slug; ?>');
943 });
944 </script>
945
946 <?php
947 }
948
949 function powerpressadmin_edit_podpress_options($General)
950 {
951 if( !empty($General['process_podpress']) || powerpress_podpress_episodes_exist() )
952 {
953 if( !isset($General['process_podpress']) )
954 $General['process_podpress'] = 0;
955 if( !isset($General['podpress_stats']) )
956 $General['podpress_stats'] = 0;
957 ?>
958
959 <h3><?php echo __('PodPress Options', 'powerpress'); ?></h3>
960 <table class="form-table">
961 <tr valign="top">
962 <th scope="row">
963
964 <?php echo __('PodPress Episodes', 'powerpress'); ?></th>
965 <td>
966 <select name="General[process_podpress]" class="bpp_input_med">
967 <?php
968 $options = array(0=>__('Ignore', 'powerpress'), 1=>__('Include in Posts and Feeds', 'powerpress') );
969
970 foreach( $options as $value => $desc )
971 echo "\t<option value=\"$value\"". ($General['process_podpress']==$value?' selected':''). ">$desc</option>\n";
972
973 ?>
974 </select> (<?php echo __('includes podcast episodes previously created in PodPress', 'powerpress'); ?>)
975 </td>
976 </tr>
977 <?php if( !empty($General['podpress_stats']) || powerpress_podpress_stats_exist() ) { ?>
978 <tr valign="top">
979 <th scope="row">
980
981 <?php echo __('PodPress Stats Archive', 'powerpress'); ?></th>
982 <td>
983 <select name="General[podpress_stats]" class="bpp_input_sm">
984 <?php
985 $options = array(0=>__('Hide', 'powerpress'), 1=>__('Display', 'powerpress') );
986
987 foreach( $options as $value => $desc )
988 echo "\t<option value=\"$value\"". ($General['podpress_stats']==$value?' selected':''). ">$desc</option>\n";
989
990 ?>
991 </select> (<?php echo __('display archive of old PodPress statistics', 'powerpress'); ?>)
992 </td>
993 </tr>
994 <?php } ?>
995 </table>
996 <?php
997 }
998 }
999
1000 function powerpressadmin_edit_itunes_general($FeedSettings, $General, $FeedAttribs = array() )
1001 {
1002 // Set default settings (if not set)
1003 if( !empty($FeedSettings) )
1004 {
1005 if( !isset($FeedSettings['itunes_url']) )
1006 $FeedSettings['itunes_url'] = '';
1007 }
1008 if( !isset($General['itunes_url']) )
1009 $General['itunes_url'] = '';
1010 else if( !isset($FeedSettings['itunes_url']) ) // Should almost never happen
1011 $FeedSettings['itunes_url'] = $General['itunes_url'];
1012
1013 $feed_slug = $FeedAttribs['feed_slug'];
1014 $cat_ID = $FeedAttribs['category_id'];
1015
1016 if( $feed_slug == 'podcast' && $FeedAttribs['type'] == 'general' )
1017 {
1018 if( empty($FeedSettings['itunes_url']) && !empty($General['itunes_url']) )
1019 $FeedSettings['itunes_url'] = $General['itunes_url'];
1020 }
1021
1022 $itunes_feed_url = '';
1023
1024 switch( $FeedAttribs['type'] )
1025 {
1026 case 'ttid': {
1027 $itunes_feed_url = get_term_feed_link($FeedAttribs['term_taxonomy_id'], $FeedAttribs['taxonomy_type'], 'rss2');
1028 }; break;
1029 case 'category': {
1030 if( !empty($General['cat_casting_podcast_feeds']) )
1031 $itunes_feed_url = get_category_feed_link($cat_ID, 'podcast');
1032 else
1033 $itunes_feed_url = get_category_feed_link($cat_ID);
1034 }; break;
1035 case 'channel': {
1036 $itunes_feed_url = get_feed_link($feed_slug);
1037 }; break;
1038 case 'post_type': {
1039 $itunes_feed_url = get_post_type_archive_feed_link($FeedAttribs['post_type'], $feed_slug);
1040 }; break;
1041 case 'general':
1042 default: {
1043 $itunes_feed_url = get_feed_link('podcast');
1044 }
1045 }
1046
1047 ?>
1048 <h3><?php echo __('iTunes Listing Information', 'powerpress'); ?></h3>
1049
1050 <?php
1051 } // end itunes general
1052
1053 function powerpressadmin_edit_blubrry_services($General, $action_url = false, $action = false)
1054 {
1055 $DisableStatsInDashboard = false;
1056 if( !empty($General['disable_dashboard_stats']) )
1057 $DisableStatsInDashboard = true;
1058
1059 ?>
1060 <div id="connect-blubrry-services">
1061 <?php
1062 $creds = get_option('powerpress_creds');
1063 if( $creds ) { ?>
1064 <div id="blubrry-services-connected-settings">
1065 <div style="margin-bottom: 1em;">
1066 <span><img src="<?php echo powerpress_get_root_url(); ?>images/done_24px.svg" style="margin: 0 0 0 8%;vertical-align: text-bottom;" alt="<?php echo __('Enabled!', 'powerpress'); ?>" /></span>
1067 <p id="connected-blubrry-blurb"><?php echo __("Connected to <b>Blubrry</b>", 'powerpress'); ?></p>
1068 </div>
1069 <a style="display: block;" class="thickbox" title="<?php echo esc_attr(__('Blubrry Services Integration', 'powerpress')); ?>" href="<?php echo admin_url(); echo wp_nonce_url( "admin.php?action=powerpress-jquery-account-edit", 'powerpress-jquery-account-edit'); ?>&amp;KeepThis=true&amp;TB_iframe=true&amp;width=600&amp;height=400&amp;modal=true" target="_blank"><?php echo __('Blubrry Hosting Settings', 'powerpress'); ?></a>
1070 </div>
1071 <?php
1072 }
1073 else // Not signed up for hosting?
1074 {
1075 ?>
1076 <div id="connect-see-options">
1077 <img id="blubrry-logo-connect" alt="" src="<?php echo powerpress_get_root_url(); ?>images/blubrry_icon.png">
1078 <h4><?php echo sprintf(__('<b>PowerPress</b> works best with <b>Blubrry</b>', 'powerpress')); ?></h4>
1079 <p id="connect-blubrry-blurb"><?php echo sprintf(__('Get access to detailed analytics and more by <b>connecting to your Blubrry Hosting Account.</b>', 'powerpress')); ?></p>
1080 <p style="font-size: 125%; margin: 1ch 0 0 1ch">
1081 <strong><a class="button-primary button-blubrry" id="connect-blubrry-button-options"
1082 title="<?php echo esc_attr(__('Blubrry Services Info', 'powerpress')); ?>"
1083 href="https://blubrry.com/services/podcast-hosting/"
1084 target="_blank"><?php echo __('SEE MY OPTIONS', 'powerpress'); ?></a></strong>
1085 </p>
1086 </div>
1087 <div id="connect-blubrry-button-container">
1088 <p style="margin-top: 1ch;" class="pp-settings-text-no-margin"><?php echo __('Already have a Blubrry account?', 'powerpress'); ?></p>
1089 <p style="font-size: 125%; margin-top: 5px;">
1090 <strong><button class="button-primary button-blubrry" id="connect-blubrry-button-options"
1091 type="submit" name="blubrry-login" value="1"
1092 title="<?php echo esc_attr(__('Blubrry Services Integration', 'powerpress')); ?>">
1093 <?php echo __('LET\'S CONNECT', 'powerpress'); ?></button></strong>
1094
1095 </p>
1096 <p style="margin-top: 1ch;" class="pp-settings-text-no-margin"><?php echo __('If you are not Hosting with Blubrry or using Blubrry Statistics, there is no need to connect to Blubrry here.', 'powerpress'); ?></p>
1097 </div>
1098 <?php
1099 } // end not signed up for hosting
1100
1101 ?>
1102
1103 </div>
1104 <?php
1105 if (time() < strtotime('August 1 2023')) {
1106 $pp_notif = new PowerPress_Notification_Manager();
1107 $pp_notif->print_one_notice('more-test', true);
1108 }
1109 }
1110
1111 function powerpressadmin_edit_media_statistics($General)
1112 {
1113
1114 if( !isset($General['redirect1']) ) {
1115 $General['redirect1'] = '';
1116 } elseif (is_chartable_url($General['redirect1'])) {
1117 $General['redirect1'] = '';
1118 }
1119
1120 if( !isset($General['redirect2']) ) {
1121 $General['redirect2'] = '';
1122 } elseif (is_chartable_url($General['redirect2'])) {
1123 $General['redirect2'] = '';
1124 }
1125
1126 if( !isset($General['redirect3']) ) {
1127 $General['redirect3'] = '';
1128 } elseif (is_chartable_url($General['redirect3'])) {
1129 $General['redirect3'] = '';
1130 }
1131
1132 $DisableStatsInDashboard = false;
1133 if( !empty($General['disable_dashboard_stats']) )
1134 $DisableStatsInDashboard = true;
1135
1136 $StatsIntegrationURL = '';
1137 if( !empty($General['blubrry_program_keyword']) )
1138 $StatsIntegrationURL = 'https://media.blubrry.com/'.$General['blubrry_program_keyword'].'/';
1139 ?>
1140 <script>
1141 function showSecondRedirectInput(event) {
1142 event.preventDefault();
1143 document.getElementById('powerpress_redirect2_table').style.display = 'block';
1144 document.getElementById('powerpress_redirect2_showlink').style.display='none';
1145
1146 }
1147 function showThirdRedirectInput(event) {
1148 event.preventDefault();
1149 document.getElementById('powerpress_redirect3_table').style.display='block';
1150 document.getElementById('powerpress_redirect3_showlink').style.display='none';
1151 }
1152 </script>
1153 <div id="blubrry_stats_settings">
1154 <h2><?php echo __('Media Statistics', 'powerpress'); ?></h2>
1155 <div>
1156 <input name="DisableStatsInDashboard" class="pp-settings-checkbox" style="margin-top: 1em;" type="checkbox" value="1"<?php if( $DisableStatsInDashboard == true ) echo ' checked'; ?> />
1157 <div class="pp-settings-subsection" style="border-bottom: none; margin-top: 0;">
1158 <p class="pp-main"><?php echo __('Remove Statistics from WordPress Dashboard', 'powerpress'); ?></p>
1159 </div>
1160 </div>
1161 <div>
1162 <h4><?php echo __('STATS PREFIX', 'powerpress'); ?></h4>
1163 <p class="pp-settings-text-no-margin">
1164 <?php echo __('Enter your Redirect URL issued by your media statistics service provider below.', 'powerpress'); ?>
1165 </p>
1166 <div id="stats-prefix-notice" class="card alert alert-danger p-3">
1167 <h4 style="margin-bottom: 0.5em;">
1168 <img src="<?php echo powerpress_get_root_url(); ?>images/circleerror_black.svg" alt="Notice" style="width: 24px; vertical-align: text-bottom;" />
1169 <p>Notice</p>
1170 </h4>
1171 <p><b>Before setting a stats prefix, please carefully read the criteria below.</b></p>
1172 <ul>
1173 <li>Not all redirect/prepend prefix services are engineered the same. Once you add a prefix/prepend be aware you are reliant on those companies’ service to “always” be online. A failure on their platform will result in your show’s media not being delivered.
1174 <ul>
1175 <li style="font-size: 100%;">Service Reliability and LSA: All 3rd party redirect services void the Blubrry Service-Level Agreement (SLA). Please be sure the redirect service you are using has a comparable SLA and uptime guarantee.</li>
1176 </ul>
1177 </li>
1178 <li>Compatibility: Third party redirect/prepend service must be HTTPS The very beginning of the prefix must have https://, https:// is only at the beginning of the url and shouldn't be anywhere in the middle of the prefix.</li>
1179 <li>Please review carefully the redirect/prepend companies’ service agreement. Companies may use the collected data for marketing, re-targeting your listener, attribution, or measuring your media to include reporting or selling that data to a third party.</li>
1180 <li>GDPR/CCPA compliance: The service must be GDPR/CCPA compliant. We will remove the service if it is not GDPR compliant. Your provider should have public-facing documents to certify GDPR/CCPA compliance.</li>
1181 </ul>
1182 </div>
1183
1184 <div style="position: relative; padding-bottom: 10px;">
1185 <table class="form-table">
1186 <tr valign="top">
1187 <th scope="row">
1188 <?php echo __('Stats Prefix 1', 'powerpress'); ?>
1189 </th>
1190 <td>
1191 <input type="text" class="pp-settings-text-input" name="<?php if( $StatsIntegrationURL && stripos($General['redirect1'], $StatsIntegrationURL) !== false ) echo 'NULL[redirect1]'; else echo 'General[redirect1]'; ?>" value="<?php echo esc_attr($General['redirect1']); ?>" maxlength="255" <?php if( $StatsIntegrationURL && stripos($General['redirect1'], $StatsIntegrationURL) !== false ) { echo ' readOnly="readOnly"'; $StatsIntegrationURL = false; } ?> />
1192 </td>
1193 </tr>
1194 </table>
1195 <?php if( empty($General['redirect2']) && empty($General['redirect3']) ) { ?>
1196 <div style="position: absolute;bottom: -2px;left: -40px;" id="powerpress_redirect2_showlink">
1197 <a href="#" style="margin-left: 40px;" onclick="showSecondRedirectInput(event)"><?php echo __('Add Another Prefix', 'powerpress'); ?></a href="#">
1198 </div>
1199 <?php } ?>
1200 </div>
1201
1202
1203 <div id="powerpress_redirect2_table" style="position: relative; <?php if( empty($General['redirect2']) && empty($General['redirect3']) ) echo 'display:none;'; ?> padding-bottom: 10px;">
1204 <table class="form-table">
1205 <tr valign="top">
1206 <th scope="row">
1207 <?php echo __('Stats Prefix 2', 'powerpress'); ?>
1208 </th>
1209 <td>
1210 <input type="text" class="pp-settings-text-input" name="<?php if( $StatsIntegrationURL && stripos($General['redirect2'], $StatsIntegrationURL) !== false ) echo 'NULL[redirect2]'; else echo 'General[redirect2]'; ?>" value="<?php echo esc_attr($General['redirect2']); ?>" maxlength="255" <?php if( $StatsIntegrationURL && stripos($General['redirect2'], $StatsIntegrationURL) !== false ) { echo ' readOnly="readOnly"'; $StatsIntegrationURL = false; } ?> />
1211 </td>
1212 </tr>
1213 </table>
1214 <?php if( $General['redirect3'] == '' ) { ?>
1215 <div style="position: absolute;bottom: -2px;left: -40px;" id="powerpress_redirect3_showlink">
1216 <a href="#" style="margin-left: 40px;" onclick="showThirdRedirectInput(event)"><?php echo __('Add Another Prefix', 'powerpress'); ?></a>
1217 </div>
1218 <?php } ?>
1219 </div>
1220
1221 <div id="powerpress_redirect3_table" style="<?php if( empty($General['redirect3']) ) echo 'display:none;'; ?>">
1222 <table class="form-table">
1223 <tr valign="top">
1224 <th scope="row">
1225 <?php echo __('Stats Prefix 3', 'powerpress'); ?>
1226 </th>
1227 <td>
1228 <input type="text" class="pp-settings-text-input" name="<?php if( $StatsIntegrationURL && stripos($General['redirect3'], $StatsIntegrationURL) !== false ) echo 'NULL[redirect3]'; else echo 'General[redirect3]'; ?>" value="<?php echo esc_attr($General['redirect3']); ?>" maxlength="255" <?php if( $StatsIntegrationURL && stripos($General['redirect3'], $StatsIntegrationURL) !== false ) echo ' readOnly="readOnly"'; ?> />
1229 </td>
1230 </tr>
1231 </table>
1232 </div>
1233 <style type="text/css">
1234 #TB_window {
1235 border: solid 1px #3D517E;
1236 }
1237 </style>
1238 </div>
1239 </div><!-- end blubrry_stats_settings -->
1240 <?php
1241 }
1242
1243
1244 function powerpressadmin_appearance($General=false, $Feed = false)
1245 {
1246 if( $General === false )
1247 $General = powerpress_get_settings('powerpress_general');
1248 $General = powerpress_default_settings($General, 'appearance');
1249 if( !isset($General['player_function']) )
1250 $General['player_function'] = 1;
1251 if( !isset($General['player_aggressive']) )
1252 $General['player_aggressive'] = 0;
1253 if( !isset($General['new_window_width']) )
1254 $General['new_window_width'] = '';
1255 if( !isset($General['new_window_height']) )
1256 $General['new_window_height'] = '';
1257 if( !isset($General['player_width']) )
1258 $General['player_width'] = '';
1259 if( !isset($General['player_height']) )
1260 $General['player_height'] = '';
1261 if( !isset($General['player_width_audio']) )
1262 $General['player_width_audio'] = '';
1263 if( !isset($General['disable_appearance']) )
1264 $General['disable_appearance'] = false;
1265 if( !isset($General['subscribe_links']) )
1266 $General['subscribe_links'] = true;
1267 if( !isset($General['subscribe_label']) )
1268 $General['subscribe_label'] = '';
1269
1270
1271 /*
1272 $Players = array('podcast'=>__('Default Podcast (podcast)', 'powerpress') );
1273 if( isset($General['custom_feeds']) )
1274 {
1275 foreach( $General['custom_feeds'] as $podcast_slug => $podcast_title )
1276 {
1277 if( $podcast_slug == 'podcast' )
1278 continue;
1279 $Players[$podcast_slug] = sprintf('%s (%s)', $podcast_title, $podcast_slug);
1280 }
1281 }
1282 */
1283 require_once( dirname(__FILE__).'/views/settings_tab_appearance.php' );
1284 powerpressadmin_website_settings($General, $Feed);
1285 powerpressadmin_blog_settings($General, $Feed);
1286 powerpress_subscribe_settings($General, $Feed);
1287 powerpress_shortcode_settings($General, $Feed);
1288 powerpressadmin_new_window_settings($General, $Feed);
1289 ?>
1290
1291 <?php
1292 } // End powerpress_admin_appearance()
1293
1294
1295 // Admin page, footer
1296 function powerpress_settings_tab_footer()
1297 { ?>
1298 <div class="pp-settings-footer">
1299 <?php powerpress_settings_save_button(); ?>
1300 </div>
1301 <?php
1302 }
1303 function powerpressadmin_welcome($GeneralSettings, $FeedSettings, $NewPostQueryString = '')
1304 {
1305 if (isset($_GET['feed_slug'])) {
1306 $feed_slug = $_GET['feed_slug'];
1307 } else {
1308 $feed_slug = 'podcast';
1309 }
1310 if (isset($FeedSettings['itunes_image']) && !empty($FeedSettings['itunes_image'])) {
1311 $image = $FeedSettings['itunes_image'];
1312 } else {
1313 $image = powerpress_get_root_url() . 'images/pts_cover.jpg';
1314 }
1315
1316 // render program card with deferred stats loading for faster page render
1317 require_once('powerpressadmin-program-card.class.php');
1318 $programCard = new PowerPressProgramCard($feed_slug, '', true);
1319 ?>
1320 <div>
1321 <div class="pp-settings-setup-notifications">
1322 <?php
1323 $stats_notice_dismissed = get_option('powerpress_stats_notice_dismissed');
1324 $creds = get_option('powerpress_creds');
1325 if ( !$creds && !$stats_notice_dismissed) {
1326 $stats_dismiss_url = admin_url('admin.php?page=powerpressadmin_basic&action=powerpress_dismiss&notice=stats');
1327 ?>
1328 <div class="pp-welcome-notification">
1329 <a href='<?php echo $stats_dismiss_url; ?>'>x</a>
1330 <img src="<?php echo powerpress_get_root_url(); ?>images/onboarding/blubrry_stats.png" />
1331 <div class="pp-welcome-notification-text">
1332 <h3><?php echo __('Free Podcast Statistics', 'powerpress'); ?></h3>
1333 <p>
1334 <?php echo __('View a summary of your Blubrry Statistics right here in Powerpress.', 'powerpress'); ?>
1335 &nbsp;<a href="https://blubrry.com/support/powerpress-documentation/services-stats/"><?php echo __('Learn More', 'powerpress'); ?></a>
1336 </p>
1337 </div>
1338 </div>
1339
1340 <?php
1341 }
1342 $artwork_notice_dismissed = get_option('powerpress_artwork_notice_dismissed');
1343 if( empty($FeedSettings['itunes_image']) && !$artwork_notice_dismissed ) {
1344 $stats_dismiss_url = admin_url('admin.php?page=powerpressadmin_basic&action=powerpress_dismiss&notice=artwork');
1345 ?>
1346 <div class="pp-welcome-notification">
1347 <a href='<?php echo $stats_dismiss_url; ?>'>x</a>
1348 <img src="<?php echo powerpress_get_root_url(); ?>images/onboarding/hosting_icon.png" />
1349 <div class="pp-welcome-notification-text">
1350 <h3><?php echo __('Your Show is (almost) ready for everyone', 'powerpress'); ?></h3>
1351 <p><?php echo __('Some finishing touched needed to send your RSS feed to destinations.', 'powerpress'); ?></p>
1352 <p>
1353 <a href="<?php echo admin_url('admin.php?page=powerpressadmin_basic&tab=feeds-tab&sidenav-tab=feeds-artwork-tab'); ?>"><?php echo __('Add Show Artwork', 'powerpress'); ?></a>
1354 <a style="margin-left: 1em;" href="<?php echo admin_url('post-new.php'); ?>"><?php echo __('Post your first episode', 'powerpress'); ?></a>
1355 </p>
1356 </div>
1357 </div>
1358 <?php
1359 }
1360 ?>
1361 </div>
1362 <?php
1363 // render program card
1364 $programCard->render($NewPostQueryString);
1365 ?>
1366 <div class="powerpress-welcome-news">
1367 <h2><?php echo __('<em>PODCAST INSIDER</em> NEWS &amp; UPDATES', 'powerpress'); ?></h2>
1368 <?php powerpressadmin_community_news(4, true); ?>
1369 </div>
1370
1371 <div class="clear"></div>
1372 </div>
1373 <?php
1374 } // End powerpressadmin_welcome()
1375
1376 function powerpressadmin_edit_funding($FeedSettings = false, $feed_slug='podcast', $cat_ID=false)
1377 {
1378 if( !isset($FeedSettings['donate_link']) )
1379 $FeedSettings['donate_link'] = 0;
1380 if( !isset($FeedSettings['donate_url']) )
1381 $FeedSettings['donate_url'] = '';
1382 if( !isset($FeedSettings['donate_label']) )
1383 $FeedSettings['donate_label'] = '';
1384 ?>
1385 <h1 class="pp-heading"><?php echo __('Basic Show Information', 'powerpress'); ?></h1>
1386
1387 <!--
1388 Location Template Renderer
1389 -->
1390 <div id="location-header" class="pp-settings-section">
1391 <h2><?php echo __('Location', 'powerpress'); ?></h2>
1392
1393 <?php
1394 powerpress_render_template([
1395 'type' => 'location',
1396 'context' => 'channel',
1397 'FeedSlug' => $feed_slug,
1398 'Data' => $FeedSettings,
1399 'NamePrefix' => "Feed",
1400 'hide_section_header' => true,
1401 ]);
1402 ?>
1403
1404 </div>
1405
1406 <div class="pp-settings-section col-12">
1407 <?php
1408 powerpress_render_template([
1409 'type' => 'update_frequency',
1410 'context' => 'channel',
1411 'FeedSlug' => $feed_slug,
1412 'Data' => $FeedSettings,
1413 'NamePrefix' => 'Feed',
1414 ]);
1415 ?>
1416 </div>
1417
1418 <div class="pp-settings-section col-12">
1419 <div class="row d-flex justify-content-start align-items-center">
1420 <h2>
1421 <?php echo __('Credits', 'powerpress'); ?>
1422 </h2>
1423 <div class="pp-tooltip-right" style="height: 20px; width: 20px; margin: 1ch 0 0 1ch;">i
1424 <span class="text-pp-tooltip" style="top: -50%; min-width: 200px;"><?php echo esc_html(__('You can document your permanent host, co-host, engineer at the show level, etc. You should not duplicate credits at the episode level.', 'powerpress')); ?></span>
1425 </div>
1426 </div>
1427 <!--
1428 Credit Template Renderer
1429 -->
1430 <?php
1431 powerpress_render_template([
1432 'type' => 'credit',
1433 'context' => 'channel',
1434 'FeedSlug' => $feed_slug,
1435 'Data' => $FeedSettings,
1436 'NamePrefix' => "Feed",
1437 'hide_section_header' => true,
1438 'show_inherit_checkbox' => false
1439 ]);
1440 ?>
1441 </div>
1442
1443 <div class="pp-settings-section col-12">
1444 <h2>
1445 <?php echo __("Block", "powerpress"); ?>
1446 </h2>
1447 <h3 style="font-weight: bold;">
1448 <?php echo __("Before you Block", "powerpress"); ?>
1449 </h3>
1450 <p>
1451 <?php echo __("Be aware that blocking signals to specific sites that you do not want your podcast to be found there. However, not all services honor the block and you may have to manually request for your content to be removed from these platforms.", "powerpress"); ?>
1452 </p>
1453 <div style="display: flex; align-items: center; margin-top: 20px;">
1454 <input class="pp-settings-checkbox" style="margin-top: 0; margin-right: 10px;" type="checkbox" value="1" id="block-check" name="Feed[block]" <?php echo isset($FeedSettings["block"]) && intval($FeedSettings["block"]) == 1 ? "checked" : "" ?>>
1455 <label class="form-check-label" for="block" style="color: black; font-size: 1rem;">
1456 <?php echo __("I understand what blocking services/directories entails.", "powerpress"); ?>
1457 </label>
1458 </div>
1459 <div id="block-section" class="mt-2" style="display: <?php echo isset($FeedSettings["block"]) && intval($FeedSettings["block"]) == 1 ? "" : "none" ?>;">
1460 <div style="display: flex; align-items: center; margin-top: 20px;">
1461 <input class="pp-settings-checkbox" style="margin-top: 0; margin-right: 10px;" type="checkbox" value="1" id="block-all-check" name="Feed[block_all]" <?php echo isset($FeedSettings["block_all"]) && intval($FeedSettings["block_all"]) == 1 ? "checked" : "" ?>>
1462 <label class="form-check-label" for="block-all-check" style="color: black; font-size: 1rem;">
1463 <?php echo __("I would like to block all directories.", "powerpress"); ?>
1464 </label>
1465 </div>
1466 <div class="row" id="block-list" style="margin-top: 20px; display: <?php echo isset($FeedSettings["block_all"]) && intval($FeedSettings["block_all"]) == 1 ? "none" : "" ?>;">
1467 <?php
1468 $blockList = getBlockTaxonomy();
1469 $existingBlockList = explode(';', $FeedSettings['block_list'] ?? '');
1470 ?>
1471 <div class="col-md-6">
1472 <h4 style="font-weight: bold;">
1473 <?php echo __("Directories", "powerpress"); ?>
1474 </h4>
1475 <input type="text" id="search-directories" class="form-control" onkeyup="searchList('search-directories', 'search-results')" placeholder="Search for names..">
1476 <ul id="search-results">
1477 <?php foreach ($blockList as $blockDir) {
1478 ?>
1479 <li style="display: none;" class="search-result" id="li-<?php echo $blockDir; ?>"><a><?php echo $blockDir;?></a></li>
1480 <?php
1481 } ?>
1482 </ul>
1483 </div>
1484 <div class="col-md-6">
1485 <h4 style="font-weight: bold;">Block List</h4>
1486 <div class="col" style="border-radius: 5px; border: 1px solid #E2E2E2;" id="block-list-col">
1487 <?php
1488 $blockCount = 0;
1489 if ($existingBlockList[0] != '') {
1490 foreach ($existingBlockList as $blockDir) { ?>
1491 <div id="block-<?php echo $blockDir?>">
1492 <div class="row" style="padding-left: 5%; padding-right: 5%; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #ddd;">
1493 <h4 style="margin: 0;">
1494 <?php echo __($blockDir, "powerpress"); ?>
1495 </h4>
1496 <input type="hidden" name="Feed[block_list][]" value="<?php echo $blockDir?>" />
1497 <button type="button" style="border: none; background: inherit; color: red; font-size: 25px; cursor: pointer;" id="remove-block-<?php echo $blockDir; ?>">&times;</button>
1498 </div>
1499 </div>
1500 <?php
1501 $blockCount += 1;
1502 }
1503 } ?>
1504 </div>
1505 </div>
1506 </div>
1507 </div>
1508 </div>
1509 <!-- Donate link and label -->
1510 <div class="pp-settings-section">
1511 <h2><?php echo __('Donate Link', 'powerpress'); ?> </h2>
1512 <label for="donate_link"></label>
1513 <input class="pp-settings-checkbox" style="margin-top: 2.5ch;" type="checkbox" id="donate_link" name="Feed[donate_link]" value="1" <?php if( $FeedSettings['donate_link'] == 1 ) echo 'checked '; ?>/>
1514 <div class="pp-settings-subsection">
1515 <p class="pp-main"><?php echo __('Syndicate a donate link with your podcast. Create your own crowdfunding page with PayPal donate buttons, or link to a service such as Patreon.', 'powerpress'); ?></p>
1516 </div>
1517 <br />
1518 <!--
1519 Donate Template Renderer
1520 -->
1521 <?php
1522 powerpress_render_template([
1523 'type' => 'donate',
1524 'context' => 'channel',
1525 'FeedSlug' => $feed_slug,
1526 'Data' => $FeedSettings,
1527 'NamePrefix' => "Feed",
1528 'hide_section_header' => true,
1529 'show_inherit_checkbox' => false
1530 ]);
1531 ?>
1532 <p class="pp-settings-text" style="margin-top: 1em;"><a href="https://blubrry.com/support/powerpress-documentation/syndicating-a-donate-link-in-your-podcast/" target="_blank"><?php echo __('Learn more about syndicating donate links for podcasting', 'powerpress'); ?></a></p>
1533 </div>
1534 <script defer>
1535
1536 document.addEventListener('DOMContentLoaded', function() {
1537 initLocationManager('<?php echo $feed_slug; ?>');
1538 initCreditsManager( '<?php echo $feed_slug; ?>');
1539 });
1540
1541 <?php
1542 $blockListStr = '[';
1543 $first = true;
1544 foreach ($existingBlockList as $block) {
1545 if (!$first)
1546 $blockListStr .= ',';
1547
1548 $blockListStr .= "'$block'";
1549
1550 $first = false;
1551 }
1552 $blockListStr .= ']';
1553 ?>
1554 let currentBlockList = <?php echo $blockListStr; ?>;
1555
1556 function searchList(searchId, resultsId) {
1557 // Declare variables
1558 var input, filter, ul, li, a, i, txtValue;
1559 input = document.getElementById(searchId);
1560 filter = input.value.toUpperCase();
1561 ul = document.getElementById(resultsId);
1562 li = ul.getElementsByTagName('li');
1563
1564 // Loop through all list items, and hide those who don't match the search query
1565 for (i = 0; i < li.length; i++) {
1566 a = li[i].getElementsByTagName("a")[0];
1567 txtValue = a.textContent || a.innerText;
1568 if (txtValue.toUpperCase().indexOf(filter) > -1 && filter !== '' && !currentBlockList.includes(txtValue)) {
1569 li[i].style.display = "";
1570 } else {
1571 li[i].style.display = "none";
1572 }
1573 }
1574 }
1575
1576 jQuery(document).ready(function() {
1577 jQuery('[id*="li-"]').on('click', function() {
1578 let name = this.id.substring(3);
1579 let newHTML = '<div id="block-' + name + '">';
1580 newHTML += '<div class="row" style="padding-left: 5%; padding-right: 5%; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #ddd;">';
1581 newHTML += '<h4 style="margin: 0;">' + name + '</h4>';
1582 newHTML += '<input type="hidden" name="Feed[block_list][]" value="' + name + '" />';
1583 newHTML += '<button type="button" style="border: none; background: inherit; color: red; font-size: 25px; cursor: pointer;" id="remove-block-'+name+'">&times;</button>';
1584 newHTML += '</div>';
1585 newHTML += '</div>';
1586
1587 jQuery('#block-list-col').append(newHTML);
1588
1589 currentBlockList.push(name);
1590
1591 let ul = document.getElementById("search-results");
1592 let li = ul.getElementsByTagName('li');
1593
1594 // hide search results after adding
1595 for (let i = 0; i < li.length; i++) {
1596 let a = li[i].getElementsByTagName("a")[0];
1597 let txtValue = a.textContent || a.innerText;
1598
1599 if (txtValue === name)
1600 li[i].style.display = "none";
1601 }
1602 });
1603
1604 jQuery(document).on('click',"[id*='remove-block-']", function (e) {
1605 let name = this.id.substring(13);
1606 jQuery('#block-' + name).remove();
1607
1608 let index = currentBlockList.indexOf(name);
1609 currentBlockList.splice(index, 1);
1610
1611 let input = document.getElementById('search-directories');
1612 let filter = input.value.toUpperCase();
1613 let ul = document.getElementById("search-results");
1614 let li = ul.getElementsByTagName('li');
1615
1616 // hide search results after adding
1617 for (let i = 0; i < li.length; i++) {
1618 let a = li[i].getElementsByTagName("a")[0];
1619 let txtValue = a.textContent || a.innerText;
1620 if (txtValue.toUpperCase().indexOf(filter) > -1 && filter !== '' && txtValue === name) {
1621 li[i].style.display = "";
1622 }
1623 }
1624 });
1625
1626 jQuery('#block-check').on('change', function () {
1627 if (this.checked)
1628 jQuery('#block-section').show();
1629 else
1630 jQuery('#block-section').hide();
1631 });
1632
1633 jQuery('#block-all-check').on('change', function () {
1634 if (this.checked)
1635 jQuery('#block-list').hide();
1636 else
1637 jQuery('#block-list').show();
1638 });
1639
1640 jQuery('#daily').on('click', function() {
1641 jQuery('#weekly-select').hide();
1642 jQuery('#monthly-frequency').hide();
1643 });
1644
1645 jQuery('#weekly').on('click', function() {
1646 jQuery('#weekly-select').show();
1647 jQuery('#monthly-frequency').hide();
1648 });
1649
1650 jQuery('#monthly').on('click', function() {
1651 jQuery('#weekly-select').hide();
1652 jQuery('#monthly-frequency').show();
1653 });
1654
1655 jQuery('#update_frequency_month').on('change', function() {
1656 let value = this.value;
1657
1658 if (value < 1)
1659 this.value = 1;
1660 });
1661 });
1662 </script>
1663 <?php
1664 }
1665
1666 function getBlockTaxonomy() {
1667 $options = ["acast","amazon","anchor","apple","audible","audioboom","backtracks","bitcoin","blubrry","buzzsprout","captivate","castos","castopod","facebook","fireside","fyyd","google","gpodder","hypercatcher","kasts","libsyn","mastodon","megafono","megaphone","omnystudio","overcast","paypal","pinecast","podbean","podcastaddict","podcastguru","podcastindex","podcasts","podchaser","podcloud","podfriend","podiant","podigee","podnews","podomatic","podserve","podverse","redcircle","relay","resonaterecordings","rss","shoutengine","simplecast","slack","soundcloud","spotify","spreaker","tiktok","transistor","twitter","whooshkaa","youtube","zencast"];
1668 return $options;
1669 }
1670
1671 function powerpressadmin_edit_tv($FeedSettings = false, $feed_slug='podcast', $cat_ID=false)
1672 {
1673 if( !isset($FeedSettings['parental_rating']) )
1674 $FeedSettings['parental_rating'] = '';
1675
1676 ?>
1677 <h1 class="pp-heading"><?php echo __('Rating Settings', 'powerpress'); ?></h1>
1678 <p class="pp-settings-text"><?php echo sprintf(__('A parental rating is used to display your content on %s applications available on Internet connected TV\'s. The TV Parental Rating applies to both audio and video media.', 'powerpress'), '<strong><a href="http://www.blubrry.com/roku_blubrry/" target="_blank">Blubrry</a></strong>'); ?></p>
1679 <div class="pp-settings-section" style="border-left: none;">
1680 <h2><?php echo __('Parental Rating', 'powerpress'); ?> </h2>
1681 <?php
1682 $Ratings = array(''=>__('No rating specified', 'powerpress'),
1683 'TV-Y'=>__('Children of all ages', 'powerpress'),
1684 'TV-Y7'=>__('Children 7 years and older', 'powerpress'),
1685 'TV-Y7-FV'=>__('Children 7 years and older [fantasy violence]', 'powerpress'),
1686 'TV-G'=>__('General audience', 'powerpress'),
1687 'TV-PG'=>__('Parental guidance suggested', 'powerpress'),
1688 'TV-14'=>__('May be unsuitable for children under 14 years of age', 'powerpress'),
1689 'TV-MA'=>__('Mature audience - may be unsuitable for children under 17', 'powerpress')
1690 );
1691 $RatingsTips = array(''=>'',
1692 'TV-Y'=>__('Whether animated or live-action, the themes and elements in this program are specifically designed for a very young audience, including children from ages 2-6. These programs are not expected to frighten younger children. Examples of programs issued this rating include Sesame Street, Barney & Friends, Dora the Explorer, Go, Diego, Go! and The Backyardigans.', 'powerpress'),
1693 'TV-Y7'=>__('These shows may or may not be appropriate for some children under the age of 7. This rating may include crude, suggestive humor, mild fantasy violence, or content considered too scary or controversial to be shown to children under seven. Examples include Foster\'s Home for Imaginary Friends, Johnny Test, and SpongeBob SquarePants.', 'powerpress'),
1694 'TV-Y7-FV'=>__('When a show has noticeably more fantasy violence, it is assigned the TV-Y7-FV rating. Action-adventure shows such Pokemon series and the Power Rangers series are assigned a TV-Y7-FV rating.', 'powerpress'),
1695 'TV-G'=>__('Although this rating does not signify a program designed specifically for children, most parents may let younger children watch this program unattended. It contains little or no violence, no strong language and little or no sexual dialogue or situation. Networks that air informational, how-to content, or generally inoffensive content.', 'powerpress'),
1696 'TV-PG'=>__('This rating signifies that the program may be unsuitable for younger children without the guidance of a parent. Many parents may want to watch it with their younger children. Various game shows and most reality shows are rated TV-PG for their suggestive dialog, suggestive humor, and/or coarse language. Some prime-time sitcoms such as Everybody Loves Raymond, Fresh Prince of Bel-Air, The Simpsons, Futurama, and Seinfeld usually air with a TV-PG rating.', 'powerpress'),
1697 'TV-14'=>__('Parents are strongly urged to exercise greater care in monitoring this program and are cautioned against letting children of any age watch unattended. This rating may be accompanied by any of the following sub-ratings:', 'powerpress'),
1698 'TV-MA'=>__('A TV-MA rating means the program may be unsuitable for those below 17. The program may contain extreme graphic violence, strong profanity, overtly sexual dialogue, very coarse language, nudity and/or strong sexual content. The Sopranos is a popular example.', 'powerpress')
1699 );
1700
1701
1702 foreach( $Ratings as $rating => $title )
1703 {
1704 $tip = $RatingsTips[ $rating ];
1705 if (!$rating) {
1706 $style = "style=\"margin-bottom:\"";
1707 }
1708 ?>
1709 <div>
1710 <input class="pp-settings-radio" type="radio" name="Feed[parental_rating]" value="<?php echo $rating; ?>" <?php if( $FeedSettings['parental_rating'] == $rating) echo 'checked'; ?> />
1711 <div class="pp-settings-subsection">
1712 <p class="pp-main">
1713 <?php if( $rating ) { ?>
1714 <strong><?php echo $rating; ?></strong>
1715 <?php } else { ?>
1716 <strong><?php echo htmlspecialchars($title); ?></strong>
1717 <?php } ?>
1718 </p>
1719 <?php if( $rating ) { ?>
1720 <p class="pp-sub">
1721 <?php echo htmlspecialchars($title); ?>
1722 </p>
1723 <?php } else { ?>
1724 <br />
1725 <?php } ?>
1726 </div>
1727 </div>
1728 <?php
1729 }
1730 ?>
1731 </div>
1732
1733 <?php
1734 }
1735
1736 function powerpressadmin_edit_artwork($FeedSettings, $General)
1737 {
1738 $SupportUploads = powerpressadmin_support_uploads();
1739 ?>
1740
1741 <h1 class="pp-heading"><?php echo __('Podcast Artwork', 'powerpress'); ?></h1>
1742
1743
1744 <div class="pp-settings-section">
1745 <h2><?php echo __('Podcast Artwork', 'powerpress'); ?></h2>
1746 <label for="Feed[itunes_image]" class="pp-settings-label"><?php echo __('Artwork URL', 'powerpress'); ?></label>
1747 <input class="pp-settings-text-input" type="text" id="itunes_image" name="Feed[itunes_image]" value="<?php echo esc_attr( !empty($FeedSettings['itunes_image'])? $FeedSettings['itunes_image']:''); ?>" maxlength="255" />
1748 <label for="Feed[itunes_image]" class="pp-settings-label-under"><?php echo __('Apple Podcast image must be at least 1400 x 1400 pixels in .jpg or .png format. Apple Podcast image must not exceed 3000 x 3000 pixels and must use RGB color space. The filesize should not exceed 0.5MB.', 'powerpress'); ?></label>
1749
1750 <?php if( $SupportUploads ) { ?>
1751 <input name="itunes_image_checkbox" id="itunes_image_checkbox" type="hidden" value="0" />
1752 <div id="itunes_image_upload">
1753 <div>
1754 <div class="pp-settings-button">
1755 <label class="pp-settings-button-label" for="itunes_image_file">
1756 <img class="pp-settings-icon" src="<?php echo powerpress_get_root_url(); ?>images/cloud_up.svg" alt="">
1757 <?php echo __('Upload Image', 'powerpress'); ?>
1758 </label>
1759 <input type="file" id="itunes_image_file" name="itunes_image_file" accept="image/*" class="pp_file_upload" style="display: none" />
1760 </div>
1761 </div>
1762 </div>
1763 <!--<a href="#" onclick="javascript: window.open( document.getElementById('itunes_image').value ); return false;"><?php echo __('preview', 'powerpress'); ?></a>-->
1764 <script>
1765 document.getElementById('itunes_image_file').onchange = function (event) {
1766 document.getElementById('itunes_image').value = this.value.replace("C:\\fakepath\\", "");
1767 let checkbox_id = "itunes_image_checkbox";
1768 if (event.currentTarget.value.length > 0) {
1769 document.getElementById(checkbox_id).value = 1;
1770 }
1771 };
1772 document.getElementById('itunes_image').onchange = function(event) {
1773 let checkbox_id = "itunes_image_checkbox";
1774 if (event.currentTarget.value.length > 0) {
1775 document.getElementById(checkbox_id).value = 1;
1776 } else {
1777 document.getElementById(checkbox_id).value = 0;
1778 }
1779 };
1780 </script>
1781 <?php } ?>
1782 </div>
1783 <?php
1784
1785 }
1786
1787
1788 function powerpressadmin_edit_destinations($FeedSettings, $General, $FeedAttribs)
1789 {
1790 require_once( dirname(__FILE__).'/views/settings_tab_destinations.php' );
1791 }
1792
1793