PluginProbe
PowerPress Podcasting plugin by Blubrry / trunk
PowerPress Podcasting plugin by Blubrry vtrunk
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-defaults.php

powerpressadmin-defaults.php in PowerPress Podcasting plugin by Blubrry trunk, at powerpressadmin-defaults.php

137 lines 5.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 function powerpressadmin_default_steps($Step = 0, $Heading = true, $ThisPage=true)
5 {
6 if( isset($_GET['pp-step']) )
7 $Step = $_GET['pp-step'];
8 ?>
9 <div id="pp-getting-started-box">
10 <?php echo ($Heading?'<h2>'. __('Start your podcast in 3 easy steps...', 'powerpress') .'</h2>':'');
11 if (defined('WP_DEBUG')) {
12 if (WP_DEBUG) {?>
13 <link rel="stylesheet" type="text/css" href="<?php echo powerpress_get_root_url(); ?>css/steps.css">
14 <?php } else { ?>
15 <link rel="stylesheet" type="text/css" href="<?php echo powerpress_get_root_url(); ?>css/steps.min.css">
16 <?php }
17 } else { ?>
18 <link rel="stylesheet" type="text/css" href="<?php echo powerpress_get_root_url(); ?>css/steps.min.css">
19 <?php } ?>
20 <ul id="powerpress-steps">
21 <?php if( $ThisPage ) { ?>
22 <li class="pp-step-1<?php echo ($Step >= 0? ' pp-step-active':''); ?>"><h3 class="<?php echo ($Step >= 1? 'pp-step-h-completed':''); ?>"><?php echo __('Fill out the settings on this page', 'powerpress'); ?></h3></li>
23 <?php } else { ?>
24 <li class="pp-step-1<?php echo ($Step >= 0? ' pp-step-active':''); ?>"><a href=""><h3 class="<?php echo ($Step >= 1? 'pp-step-h-completed':''); ?>"><?php echo __('Fill out the podcast settings', 'powerpress'); ?></a></h3></li>
25 <?php } ?>
26 <li class="pp-step-2<?php echo ($Step >= 1? ' pp-step-active':''); ?>">
27 <h3 class="<?php echo ($Step >= 2? 'pp-step-h-completed':''); ?>"><a href="<?php echo admin_url( 'post-new.php' ); ?>"><?php echo __('Create a blog post with an episode', 'powerpress'); ?></a></h3>
28 <p><a href="https://blubrry.com/support/powerpress-documentation/creating-your-first-episode-with-powerpress/" target="_blank"><?php echo __('Need help?', 'powerpress'); ?></a>
29 </li>
30 <li class="pp-step-3<?php echo ($Step >= 2? ' pp-step-active':''); ?>"><h3 class="<?php echo ($Step >= 3? 'pp-step-h-completed':''); ?>"><a href="https://blubrry.com/manual/podcast-promotion/submit-podcast-to-itunes/?podcast-feed=<?php echo urlencode(get_feed_link('podcast')); ?>" target="_blank"><?php echo __('Submit your podcast to iTunes and other podcast directories', 'powerpress'); ?></a></h3></li>
31 </ul>
32 </div><!-- end pp-getting-started-box -->
33 <?php
34 }
35
36 function powerpress_admin_defaults()
37 {
38 $FeedAttribs = array('type'=>'general', 'feed_slug'=>'', 'category_id'=>0, 'term_taxonomy_id'=>0, 'term_id'=>0, 'taxonomy_type'=>'', 'post_type'=>'');
39
40 $General = powerpress_get_settings('powerpress_general');
41 $General = powerpress_default_settings($General, 'basic');
42
43 $FeedSettings = powerpress_get_settings('powerpress_feed');
44 $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed');
45
46 // Make sure variables are set
47 if( empty($FeedSettings['title']) )
48 $FeedSettings['title'] = '';
49
50 $Step = 0;
51 if( !empty($FeedSettings['itunes_cat_1']) && !empty($FeedSettings['email']) && !empty($FeedSettings['itunes_image']) )
52 $Step = 1;
53
54 $episode_total = 0;
55 if( $Step == 1 )
56 {
57 $episode_total = powerpress_admin_episodes_per_feed('podcast');
58 if( $episode_total > 0 )
59 $Step = 2;
60 }
61
62 if( $Step == 2 && !empty($FeedSettings['itunes_url']) )
63 $Step = 3;
64
65 $MultiSiteServiceSettings = false;
66 if( is_multisite() )
67 {
68 $MultiSiteSettings = get_site_option('powerpress_multisite');
69 if( !empty($MultiSiteSettings['services_multisite_only']) )
70 {
71 $MultiSiteServiceSettings = true;
72 }
73 }
74
75 ?>
76 <script type="text/javascript"><!--
77
78
79 jQuery(document).ready(function($) {
80 jQuery('#powerpress_advanced_mode_button').click( function(event) {
81 event.preventDefault();
82 jQuery('#powerpress_advanced_mode').val('1');
83 jQuery(this).closest("form").submit();
84 } );
85 } );
86 //-->
87 </script>
88 <input type="hidden" name="action" value="powerpress-save-defaults" />
89 <input type="hidden" id="powerpress_advanced_mode" name="General[advanced_mode_2]" value="0" />
90
91 <div id="powerpress_admin_header">
92 <h2><?php echo __('Blubrry PowerPress Settings', 'powerpress'); ?></h2>
93 <span class="powerpress-mode"><?php echo __('Simple Mode', 'powerpress'); ?>
94 &nbsp; <a href="<?php echo admin_url("admin.php?page=". urlencode(powerpress_admin_get_page()) ."&amp;mode=advanced"); ?>" id="powerpress_advanced_mode_button" class="button-primary button-blubrry"><?php echo __('Switch to Advanced Mode', 'powerpress'); ?></a>
95 </span>
96 </div>
97
98 <?php
99
100 powerpressadmin_default_steps($Step);
101
102 if( $MultiSiteServiceSettings && defined('POWERPRESS_MULTISITE_VERSION') )
103 {
104 PowerPressMultiSitePlugin::edit_blubrry_services($General);
105 }
106 else
107 {
108 powerpressadmin_edit_blubrry_services($General);
109 }
110 ?>
111 <h3><?php echo __('Podcast Settings', 'powerpress'); ?></h3>
112 <table class="form-table">
113 <tr valign="top">
114 <th scope="row">
115 <?php echo __('Program Title', 'powerpress'); ?>
116 </th>
117 <td>
118 <input type="text" name="Feed[title]" style="width: 60%;" value="<?php echo esc_attr($FeedSettings['title']); ?>" maxlength="255" />
119 (<?php echo __('leave blank to use blog title', 'powerpress'); ?>)
120 <p><?php echo __('Blog title:', 'powerpress') .' '. get_bloginfo_rss('name'); ?></p>
121 </td>
122 </tr>
123 </table>
124 <?php
125 if( $Step > 1 ) { // Only display if we have episdoes in the feed!
126 // TODO: Need to include the settings_tab_destinations.php but only the iTunes option to keep things simple
127 }
128 // Apple settings (in simple mode of course)
129 powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs);
130
131 powerpressadmin_edit_artwork($FeedSettings, $General);
132 powerpressadmin_appearance($General, $FeedSettings);
133 powerpressadmin_advanced_options($General);
134 }
135
136
137 ?>