Version Description
- Released on 7/23/2019
- Added library for PubSubHubbub. Missed it when merging latest git release into wordpress.org svn. Sorry about that!
Download this release
Release Info
Developer | amandato |
Plugin | PowerPress Podcasting plugin by Blubrry |
Version | 7.5.1 |
Comparing to | |
See all releases |
Code changes from version 7.5 to 7.5.1
- class.powerpresswebsub.php +74 -0
- powerpress.php +2 -2
- readme.txt +7 -1
class.powerpresswebsub.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class PowerPressWebSub
|
5 |
+
{
|
6 |
+
const DEFAULT_HUB = "https://pubsubhubbub.appspot.com";
|
7 |
+
private $hub;
|
8 |
+
private $wp_remote_options = array(
|
9 |
+
"user-agent" => 'Blubrry PowerPress/'.POWERPRESS_VERSION,
|
10 |
+
"httpversion" => '1.1',
|
11 |
+
"headers" => array('Content-Type' => 'application/x-www-form-urlencoded'),
|
12 |
+
"body" => array(
|
13 |
+
'hub.mode' => 'publish'
|
14 |
+
)
|
15 |
+
);
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Websub constructor.
|
19 |
+
* @param string $hub URL to the hub to use, defaults to <code>$DEFAULT_HUB</code>
|
20 |
+
*/
|
21 |
+
public function __construct($hub = self::DEFAULT_HUB){
|
22 |
+
$this->hub = $hub;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Publishes update to the hub
|
27 |
+
* @param string $feedUrl URL of feed to update
|
28 |
+
* @throws Exception Throws exception if HTTP response is not 204 or 202 and returns HTTP body
|
29 |
+
*/
|
30 |
+
public function publish($feedUrl) {
|
31 |
+
if($this->isWebsubEnabled()) {
|
32 |
+
$this->wp_remote_options['body']['hub.url'] = $feedUrl;
|
33 |
+
$response = wp_remote_post($this->hub, $this->wp_remote_options);
|
34 |
+
|
35 |
+
if (is_wp_error($response)) // Handle system level errors
|
36 |
+
{
|
37 |
+
if ($response->get_error_message())
|
38 |
+
throw new Exception($response->get_error_message());
|
39 |
+
else
|
40 |
+
throw new Exception("HTTP error response " . $response->get_error_code());
|
41 |
+
return false;
|
42 |
+
}
|
43 |
+
|
44 |
+
if ($response['response']['code'] > 299) {
|
45 |
+
if (!empty($response['body'])) // Handle service level errors
|
46 |
+
throw new Exception($response['body']);
|
47 |
+
else
|
48 |
+
throw new Exception("HTTP response " . $response['response']['code']);
|
49 |
+
return false;
|
50 |
+
}
|
51 |
+
|
52 |
+
return true;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* @return string
|
58 |
+
*/
|
59 |
+
public function getHub()
|
60 |
+
{
|
61 |
+
return $this->hub;
|
62 |
+
}
|
63 |
+
|
64 |
+
public function isWebsubEnabled() {
|
65 |
+
require_once 'powerpressadmin.php';
|
66 |
+
$GeneralSettings = powerpress_get_settings('powerpress_general');
|
67 |
+
if(!empty($GeneralSettings['websub_enabled']) && $GeneralSettings['websub_enabled'] == 1) {
|
68 |
+
return true;
|
69 |
+
}
|
70 |
+
else {
|
71 |
+
return false;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
powerpress.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Blubrry PowerPress
|
4 |
Plugin URI: http://create.blubrry.com/resources/powerpress/
|
5 |
Description: <a href="http://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports Apple Podcasts (previously iTunes), Google Podcasts, Spotify, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
|
6 |
-
Version: 7.5
|
7 |
Author: Blubrry
|
8 |
Author URI: http://www.blubrry.com/
|
9 |
Requires at least: 3.6
|
@@ -35,7 +35,7 @@ if( !function_exists('add_action') ) {
|
|
35 |
}
|
36 |
|
37 |
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
|
38 |
-
define('POWERPRESS_VERSION', '7.5' );
|
39 |
|
40 |
// Translation support:
|
41 |
if ( !defined('POWERPRESS_ABSPATH') )
|
3 |
Plugin Name: Blubrry PowerPress
|
4 |
Plugin URI: http://create.blubrry.com/resources/powerpress/
|
5 |
Description: <a href="http://create.blubrry.com/resources/powerpress/" target="_blank">Blubrry PowerPress</a> is the No. 1 Podcasting plugin for WordPress. Developed by podcasters for podcasters; features include Simple and Advanced modes, multiple audio/video player options, subscribe to podcast tools, podcast SEO features, and more! Fully supports Apple Podcasts (previously iTunes), Google Podcasts, Spotify, Stitcher, and Blubrry Podcasting directories, as well as all podcast applications and clients.
|
6 |
+
Version: 7.5.1
|
7 |
Author: Blubrry
|
8 |
Author URI: http://www.blubrry.com/
|
9 |
Requires at least: 3.6
|
35 |
}
|
36 |
|
37 |
// WP_PLUGIN_DIR (REMEMBER TO USE THIS DEFINE IF NEEDED)
|
38 |
+
define('POWERPRESS_VERSION', '7.5.1' );
|
39 |
|
40 |
// Translation support:
|
41 |
if ( !defined('POWERPRESS_ABSPATH') )
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: podcasting, podcast, podcaster, powerpress, itunes, apple, apple podcasts,
|
|
4 |
Requires at least: 3.6
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 5.2.2
|
7 |
-
Stable tag: 7.5
|
8 |
Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
|
9 |
License: GPLv2 or later
|
10 |
|
@@ -234,6 +234,12 @@ To install Blubrry PowerPress manually, follow these steps:
|
|
234 |
= Fan of PowerPress and want to show your support? =
|
235 |
If you are a fan of PowerPress, we would greatly appreciate it if you could take a moment and [leave us a review on WordPress.org](https://wordpress.org/support/plugin/powerpress/reviews/?rate=5#new-post). Your support is greatly appreciated!
|
236 |
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
= 7.5 =
|
238 |
* Released on 7/23/2019
|
239 |
* Added new Apple categories announced in July. The new Apple Categories will be made available on Apple Podcasts mid August, 2019.
|
4 |
Requires at least: 3.6
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 5.2.2
|
7 |
+
Stable tag: 7.5.1
|
8 |
Donate link: https://create.blubrry.com/resources/podcast-media-hosting/
|
9 |
License: GPLv2 or later
|
10 |
|
234 |
= Fan of PowerPress and want to show your support? =
|
235 |
If you are a fan of PowerPress, we would greatly appreciate it if you could take a moment and [leave us a review on WordPress.org](https://wordpress.org/support/plugin/powerpress/reviews/?rate=5#new-post). Your support is greatly appreciated!
|
236 |
|
237 |
+
|
238 |
+
= 7.5.1 =
|
239 |
+
* Released on 7/23/2019
|
240 |
+
* Added library for PubSubHubbub. Missed it when merging latest git release into wordpress.org svn. Sorry about that!
|
241 |
+
|
242 |
+
|
243 |
= 7.5 =
|
244 |
* Released on 7/23/2019
|
245 |
* Added new Apple categories announced in July. The new Apple Categories will be made available on Apple Podcasts mid August, 2019.
|