Version Description
Download this release
Release Info
Developer | amandato |
Plugin | PowerPress Podcasting plugin by Blubrry |
Version | 0.8.2 |
Comparing to | |
See all releases |
Code changes from version 0.8.1 to 0.8.2
- powerpress.php +2 -2
- powerpressadmin-dashboard.php +11 -3
- powerpressadmin-editfeed.php +2 -2
- powerpressadmin-tools.php +16 -4
- powerpressadmin.php +21 -5
- readme.txt +4 -1
powerpress.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Blubrry PowerPress
|
4 |
Plugin URI: http://www.blubrry.com/powerpress/
|
5 |
Description: <a href="http://www.blubrry.com/powerpress/" target="_blank">Blubrry PowerPress</a> adds podcasting support to your blog. Features include: media player, 3rd party statistics and iTunes integration.
|
6 |
-
Version: 0.8.
|
7 |
Author: Blubrry
|
8 |
Author URI: http://www.blubrry.com/
|
9 |
Change Log:
|
@@ -29,7 +29,7 @@ License: GPL (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
|
|
29 |
*/
|
30 |
|
31 |
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
|
32 |
-
define('POWERPRESS_VERSION', '0.8.
|
33 |
|
34 |
/////////////////////////////////////////////////////
|
35 |
// The following define options should be placed in your
|
3 |
Plugin Name: Blubrry PowerPress
|
4 |
Plugin URI: http://www.blubrry.com/powerpress/
|
5 |
Description: <a href="http://www.blubrry.com/powerpress/" target="_blank">Blubrry PowerPress</a> adds podcasting support to your blog. Features include: media player, 3rd party statistics and iTunes integration.
|
6 |
+
Version: 0.8.2
|
7 |
Author: Blubrry
|
8 |
Author URI: http://www.blubrry.com/
|
9 |
Change Log:
|
29 |
*/
|
30 |
|
31 |
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
|
32 |
+
define('POWERPRESS_VERSION', '0.8.2' );
|
33 |
|
34 |
/////////////////////////////////////////////////////
|
35 |
// The following define options should be placed in your
|
powerpressadmin-dashboard.php
CHANGED
@@ -49,6 +49,12 @@ function powerpress_dashboard_head()
|
|
49 |
|
50 |
function powerpress_dashboard_stats_content()
|
51 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
$content = false;
|
53 |
$StatsCached = get_option('powerpress_stats');
|
54 |
if( $StatsCached && $StatsCached['updated'] > (time()-(60*60*3)) )
|
@@ -56,7 +62,6 @@ function powerpress_dashboard_stats_content()
|
|
56 |
|
57 |
if( !$content )
|
58 |
{
|
59 |
-
$Settings = get_option('powerpress_general');
|
60 |
$UserPass = $Settings['blubrry_auth'];
|
61 |
$Keyword = $Settings['blubrry_program_keyword'];
|
62 |
|
@@ -101,8 +106,11 @@ function powerpress_dashboard_stats_content()
|
|
101 |
function powerpress_dashboard_setup()
|
102 |
{
|
103 |
$Settings = get_option('powerpress_general');
|
104 |
-
|
105 |
-
if(
|
|
|
|
|
|
|
106 |
{
|
107 |
wp_add_dashboard_widget( 'powerpress_dashboard_stats', __( 'Blubrry Podcast Statistics' ), 'powerpress_dashboard_stats_content' );
|
108 |
}
|
49 |
|
50 |
function powerpress_dashboard_stats_content()
|
51 |
{
|
52 |
+
$Settings = get_option('powerpress_general');
|
53 |
+
|
54 |
+
// If using user capabilities...
|
55 |
+
if( @$Settings['use_caps'] && !current_user_can('view_podcast_stats') )
|
56 |
+
return;
|
57 |
+
|
58 |
$content = false;
|
59 |
$StatsCached = get_option('powerpress_stats');
|
60 |
if( $StatsCached && $StatsCached['updated'] > (time()-(60*60*3)) )
|
62 |
|
63 |
if( !$content )
|
64 |
{
|
|
|
65 |
$UserPass = $Settings['blubrry_auth'];
|
66 |
$Keyword = $Settings['blubrry_program_keyword'];
|
67 |
|
106 |
function powerpress_dashboard_setup()
|
107 |
{
|
108 |
$Settings = get_option('powerpress_general');
|
109 |
+
|
110 |
+
if( @$Settings['use_caps'] && !current_user_can('view_podcast_stats') )
|
111 |
+
return;
|
112 |
+
|
113 |
+
if( $Settings )
|
114 |
{
|
115 |
wp_add_dashboard_widget( 'powerpress_dashboard_stats', __( 'Blubrry Podcast Statistics' ), 'powerpress_dashboard_stats_content' );
|
116 |
}
|
powerpressadmin-editfeed.php
CHANGED
@@ -305,9 +305,9 @@ while( list($value,$desc) = each($applyoptions) )
|
|
305 |
<td>
|
306 |
<input type="text" name="Feed[url]"style="width: 60%;" value="<?php echo $FeedSettings['url']; ?>" maxlength="250" /> (optional)
|
307 |
<?php if( $cat_ID ) { ?>
|
308 |
-
<p>e.g. <?php echo get_bloginfo('home'); ?>/custom-page/</p>
|
309 |
-
<?php } else { ?>
|
310 |
<p>Leave blank to use category page: <?php echo get_category_link($cat_ID); ?></p>
|
|
|
|
|
311 |
<?php } ?>
|
312 |
</td>
|
313 |
</tr>
|
305 |
<td>
|
306 |
<input type="text" name="Feed[url]"style="width: 60%;" value="<?php echo $FeedSettings['url']; ?>" maxlength="250" /> (optional)
|
307 |
<?php if( $cat_ID ) { ?>
|
|
|
|
|
308 |
<p>Leave blank to use category page: <?php echo get_category_link($cat_ID); ?></p>
|
309 |
+
<?php } else { ?>
|
310 |
+
<p>e.g. <?php echo get_bloginfo('home'); ?>/custom-page/</p>
|
311 |
<?php } ?>
|
312 |
</td>
|
313 |
</tr>
|
powerpressadmin-tools.php
CHANGED
@@ -51,9 +51,9 @@
|
|
51 |
if( $General['use_caps'] )
|
52 |
{
|
53 |
?>
|
54 |
-
<p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&action=powerpress-remove-caps", 'powerpress-remove-caps'); ?>"><?php _e('Remove
|
55 |
<p>
|
56 |
-
Removing
|
57 |
</p>
|
58 |
<p>You will most likely need either the <a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/" target="_blank">Role Manager</a> or <a href="http://agapetry.net/category/plugins/role-scoper/" target="_blank">Role Scoper</a> plugin to manage the Edit Podcast capability.
|
59 |
The Edit Podcast capability feature comes with no support. Please do not contact Blubrry.com for help with this feature.
|
@@ -63,16 +63,17 @@
|
|
63 |
else
|
64 |
{
|
65 |
?>
|
66 |
-
<p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&action=powerpress-add-caps", 'powerpress-add-caps'); ?>"><?php _e('Add
|
67 |
<p>
|
68 |
Currently anyone who can edit posts on this blog may also edit podcast episodes.
|
69 |
</p>
|
70 |
<p>
|
71 |
-
Adding Edit Podcast capability will configure Administrators, Editors and Authors with access to create and edit podcast episodes. Contributors, Subscribers and other custom user roles will not be able to create and edit podcast episodes.
|
72 |
</p>
|
73 |
<?php
|
74 |
}
|
75 |
?>
|
|
|
76 |
<p>The WordPress <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">Roles and Capabilities</a> feature is designed to give the blog owner the ability to control and assign what users can and cannot do in the blog.
|
77 |
By adding the Edit Podcast capability to your blog, you will be able to use the Roles and Capabilities in Wordpress to manage which users can create and edit podcast episodes.
|
78 |
</p>
|
@@ -80,6 +81,17 @@
|
|
80 |
</td>
|
81 |
</tr>
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
</table>
|
84 |
<?php
|
85 |
|
51 |
if( $General['use_caps'] )
|
52 |
{
|
53 |
?>
|
54 |
+
<p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&action=powerpress-remove-caps", 'powerpress-remove-caps'); ?>"><?php _e('Remove PowerPress Podcasting Capabilities for User Role Management'); ?></a></strong></p>
|
55 |
<p>
|
56 |
+
Removing PowerPress Podcasting Capabilities will allow anyone who can edit posts the ability to create and edit podcast episodes and view statistics from the WordPress Dashboard.
|
57 |
</p>
|
58 |
<p>You will most likely need either the <a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/" target="_blank">Role Manager</a> or <a href="http://agapetry.net/category/plugins/role-scoper/" target="_blank">Role Scoper</a> plugin to manage the Edit Podcast capability.
|
59 |
The Edit Podcast capability feature comes with no support. Please do not contact Blubrry.com for help with this feature.
|
63 |
else
|
64 |
{
|
65 |
?>
|
66 |
+
<p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&action=powerpress-add-caps", 'powerpress-add-caps'); ?>"><?php _e('Add PowerPress Podcasting Capabilities for User Role Management'); ?></a></strong></p>
|
67 |
<p>
|
68 |
Currently anyone who can edit posts on this blog may also edit podcast episodes.
|
69 |
</p>
|
70 |
<p>
|
71 |
+
Adding Edit Podcast capability will configure Administrators, Editors and Authors with access to create and edit podcast episodes. Only administrators will be able to view statistics from the WordPress Dashboard. Contributors, Subscribers and other custom user roles will not be able to create and edit podcast episodes and view statistics from the dashboard.
|
72 |
</p>
|
73 |
<?php
|
74 |
}
|
75 |
?>
|
76 |
+
|
77 |
<p>The WordPress <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">Roles and Capabilities</a> feature is designed to give the blog owner the ability to control and assign what users can and cannot do in the blog.
|
78 |
By adding the Edit Podcast capability to your blog, you will be able to use the Roles and Capabilities in Wordpress to manage which users can create and edit podcast episodes.
|
79 |
</p>
|
81 |
</td>
|
82 |
</tr>
|
83 |
|
84 |
+
|
85 |
+
<tr valign="top">
|
86 |
+
<th scope="row"><?php echo __("Update Plugins Cache"); ?></th>
|
87 |
+
<td>
|
88 |
+
<p style="margin-top: 5px;"><strong><a href="<?php echo admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_tools.php&action=powerpress-clear-update_plugins", 'powerpress-clear-update_plugins'); ?>"><?php _e('Clear Plugins Update Cache'); ?></a></strong></p>
|
89 |
+
<p>
|
90 |
+
The list of plugins on the plugins page will cache the plugin version numbers for up to 24 hours. Click the link above to clear the cache to get the latest versions of plugins listed on your <a href="<?php echo admin_url(). 'plugins.php'; ?>" title="Plugins">plugins</a> page.
|
91 |
+
</p>
|
92 |
+
</td>
|
93 |
+
</tr>
|
94 |
+
|
95 |
</table>
|
96 |
<?php
|
97 |
|
powerpressadmin.php
CHANGED
@@ -9,7 +9,8 @@ function powerpress_page_message_add_error($msg)
|
|
9 |
function powerpress_page_message_add_notice($msg)
|
10 |
{
|
11 |
global $g_powerpress_page_message;
|
12 |
-
|
|
|
13 |
}
|
14 |
|
15 |
|
@@ -346,6 +347,9 @@ function powerpress_admin_init()
|
|
346 |
}
|
347 |
else
|
348 |
{
|
|
|
|
|
|
|
349 |
if( !in_array($cat_ID, @$Settings['custom_cat_feeds']) )
|
350 |
{
|
351 |
$Settings['custom_cat_feeds'][] = $cat_ID;
|
@@ -474,10 +478,13 @@ function powerpress_admin_init()
|
|
474 |
$role = get_role($user);
|
475 |
if( !$role->has_cap('edit_podcast') )
|
476 |
$role->add_cap('edit_podcast');
|
|
|
|
|
477 |
}
|
|
|
478 |
$General = array('use_caps'=>true);
|
479 |
powerpress_save_settings($General);
|
480 |
-
powerpress_page_message_add_notice( __('
|
481 |
|
482 |
}; break;
|
483 |
case 'powerpress-remove-caps': {
|
@@ -489,10 +496,19 @@ function powerpress_admin_init()
|
|
489 |
$role = get_role($user);
|
490 |
if( $role->has_cap('edit_podcast') )
|
491 |
$role->remove_cap('edit_podcast');
|
|
|
|
|
492 |
}
|
493 |
$General = array('use_caps'=>false);
|
494 |
powerpress_save_settings($General);
|
495 |
-
powerpress_page_message_add_notice( __('
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
496 |
|
497 |
}; break;
|
498 |
}
|
@@ -1482,8 +1498,8 @@ function powerpress_json_decode($value)
|
|
1482 |
{
|
1483 |
if( function_exists('json_decode') )
|
1484 |
return json_decode($value, true);
|
1485 |
-
|
1486 |
-
|
1487 |
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
|
1488 |
return $json->decode($value);
|
1489 |
}
|
9 |
function powerpress_page_message_add_notice($msg)
|
10 |
{
|
11 |
global $g_powerpress_page_message;
|
12 |
+
// Always pre-pend, since jQuery will re-order with first as last.
|
13 |
+
$g_powerpress_page_message = '<div class="updated fade powerpress-notice">'. $msg . '</div>' . $g_powerpress_page_message;
|
14 |
}
|
15 |
|
16 |
|
347 |
}
|
348 |
else
|
349 |
{
|
350 |
+
if( !is_array($Settings['custom_cat_feeds']) )
|
351 |
+
$Settings['custom_cat_feeds'] = array();
|
352 |
+
|
353 |
if( !in_array($cat_ID, @$Settings['custom_cat_feeds']) )
|
354 |
{
|
355 |
$Settings['custom_cat_feeds'][] = $cat_ID;
|
478 |
$role = get_role($user);
|
479 |
if( !$role->has_cap('edit_podcast') )
|
480 |
$role->add_cap('edit_podcast');
|
481 |
+
if( $user == 'administrator' && !$role->has_cap('view_podcast_stats') )
|
482 |
+
$role->add_cap('view_podcast_stats');
|
483 |
}
|
484 |
+
|
485 |
$General = array('use_caps'=>true);
|
486 |
powerpress_save_settings($General);
|
487 |
+
powerpress_page_message_add_notice( __('PowerPress Roles and Capabilities added to WordPress Blog.') );
|
488 |
|
489 |
}; break;
|
490 |
case 'powerpress-remove-caps': {
|
496 |
$role = get_role($user);
|
497 |
if( $role->has_cap('edit_podcast') )
|
498 |
$role->remove_cap('edit_podcast');
|
499 |
+
if( $role->has_cap('view_podcast_stats') )
|
500 |
+
$role->remove_cap('view_podcast_stats');
|
501 |
}
|
502 |
$General = array('use_caps'=>false);
|
503 |
powerpress_save_settings($General);
|
504 |
+
powerpress_page_message_add_notice( __('PowerPress Roles and Capabilities removed from WordPress Blog') );
|
505 |
+
|
506 |
+
}; break;
|
507 |
+
case 'powerpress-clear-update_plugins': {
|
508 |
+
check_admin_referer('powerpress-clear-update_plugins');
|
509 |
+
|
510 |
+
delete_option('update_plugins');
|
511 |
+
powerpress_page_message_add_notice( __('Plugins Update Cache cleared successfully. You may now to go the <a href="'. admin_url() .'plugins.php" title="Manage Plugins">Manage Plugins</a> page to see the latest plugin versions.') );
|
512 |
|
513 |
}; break;
|
514 |
}
|
1498 |
{
|
1499 |
if( function_exists('json_decode') )
|
1500 |
return json_decode($value, true);
|
1501 |
+
if( !class_exists('Services_JSON') )
|
1502 |
+
require_once( dirname(__FILE__).'/3rdparty/JSON.php');
|
1503 |
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
|
1504 |
return $json->decode($value);
|
1505 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Angelo Mandato, Blubrry.com
|
|
3 |
Tags: podcast, podcasting, itunes, enclosure, zune, iphone, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats
|
4 |
Requires at least: 2.6.0
|
5 |
Tested up to: 2.7.1
|
6 |
-
Stable tag: 0.8.
|
7 |
|
8 |
Add podcasting support to your blog.
|
9 |
|
@@ -72,6 +72,9 @@ As a alternative, PowerPress allows you to create additional Custom Podcast Feed
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
75 |
0.8.1 released on 5/28/2009
|
76 |
Fixed bug with line 930 printing warning in podcast feeds.
|
77 |
|
3 |
Tags: podcast, podcasting, itunes, enclosure, zune, iphone, audio, video, rss2, feed, player, media, rss, mp3, music, embed, feedburner, statistics, stats
|
4 |
Requires at least: 2.6.0
|
5 |
Tested up to: 2.7.1
|
6 |
+
Stable tag: 0.8.2
|
7 |
|
8 |
Add podcasting support to your blog.
|
9 |
|
72 |
|
73 |
== Changelog ==
|
74 |
|
75 |
+
0.8.2 released on 5/31/2009
|
76 |
+
Fixed conflict with Twitter Updater bug when user is using PHP4 (Not a bug for PHP5 users) and fixed error on line 310 in the edit Feed settings page. Option added under tools to clear the Update Plugins Cache in WordPress. Added new user capabilities for viewing podcast statistics, for blog users who may have dashboard access but shouldn't have access to the podcast statistics.
|
77 |
+
|
78 |
0.8.1 released on 5/28/2009
|
79 |
Fixed bug with line 930 printing warning in podcast feeds.
|
80 |
|