Skip to content

Commit

Permalink
Compatibility, WP 5.5: SimplePie has been upgraded to 1.5.5, which is…
Browse files Browse the repository at this point in the history
… cool, but could cause problems. Resolves PHP Warning: Declaration of FeedWordPie_Item::get_id($hash = false) should be compatible with SimplePie_Item::get_id($hash = false, $fn = "md5")
  • Loading branch information
radgeek committed Aug 17, 2020
1 parent 1ff8b0e commit 841fc50
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 4 deletions.
@@ -1,4 +1,5 @@
<?php

class FeedWordPie_Item extends SimplePie_Item {

function get_id ($hash = false) {
Expand Down
56 changes: 56 additions & 0 deletions extend/SimplePie/default/feedwordpie_item.class.php
@@ -0,0 +1,56 @@
<?php

class FeedWordPie_Item extends SimplePie_Item {

function get_id ($hash = false, $fn = 'md5') {
return apply_filters('feedwordpie_item_get_id', parent::get_id($hash, $fn), $hash, $this, $fn);
}

function get_title () {
return apply_filters('feedwordpie_item_get_title', parent::get_title(), $this);
}

function get_description ($description_only = false) {
return apply_filters('feedwordpie_item_get_description', parent::get_description($description_only), $description_only, $this);
}

function get_content ($content_only = false) {
return apply_filters('feedwordpie_item_get_content', parent::get_content($content_only), $content_only, $this);
}

function get_categories () {
return apply_filters('feedwordpie_item_get_categories', parent::get_categories(), $this);
}

function get_authors () {
return apply_filters('feedwordpie_item_get_authors', parent::get_authors(), $this);
}
function get_contributors () {
return apply_filters('feedwordpie_item_get_contributors', parent::get_contributors(), $this);
}
function get_copyright () {
return apply_filters('feedwordpie_item_get_copyright', parent::get_copyright(), $this);
}
function get_date ($date_format = 'j F Y, g:i a') {
return apply_filters('feedwordpie_item_get_date', parent::get_date($date_format), $date_format, $this);
}
function get_local_date ($date_format = '%c') {
return apply_filters('feedwordpie_item_get_local_date', parent::get_local_date($date_format), $date_format, $this);
}
function get_links ($rel = 'alternate') {
return apply_filters('feedwordpie_item_get_links', parent::get_links($rel), $rel, $this);
}
function get_enclosures () {
return apply_filters('feedwordpie_item_get_enclosures', parent::get_enclosures(), $this);
}
function get_latitude () {
return apply_filters('feedwordpie_item_get_lattitude', parent::get_lattitude(), $this);
}
function get_longitude () {
return apply_filters('feedwordpie_item_get_longitude', parent::get_longtidue(), $this);
}
function get_source () {
return apply_filters('feedwordpie_item_get_source', parent::get_source(), $this);
}
} /* class FeedWordPie_Item */

8 changes: 4 additions & 4 deletions feedwordpress.php
Expand Up @@ -3,15 +3,15 @@
Plugin Name: FeedWordPress
Plugin URI: http://feedwordpress.radgeek.com/
Description: simple and flexible Atom/RSS syndication for WordPress
Version: 2020.0201
Version: 2020.0817-1613
Author: C. Johnson
Author URI: https://feedwordpress.radgeek.com/contact/
License: GPL
*/

/**
* @package FeedWordPress
* @version 2020.0201
* @version 2020.0817-1613
*/

# This plugin uses code derived from:
Expand All @@ -30,7 +30,7 @@
## CONSTANTS & DEFAULTS ############################################################
####################################################################################

define ('FEEDWORDPRESS_VERSION', '2020.0201');
define ('FEEDWORDPRESS_VERSION', '2020.0817-1613');
define ('FEEDWORDPRESS_AUTHOR_CONTACT', 'http://feedwordpress.radgeek.com/contact');

if (!defined('FEEDWORDPRESS_BLEG')) :
Expand Down Expand Up @@ -142,7 +142,7 @@
require_once("${dir}/inspectpostmeta.class.php");
require_once("${dir}/syndicationdataqueries.class.php");
require_once("${dir}/feedwordpie.class.php");
require_once("${dir}/feedwordpie_item.class.php");
require_once("${dir}/extend/SimplePie/feedwordpie_item.class.php");
require_once("${dir}/feedwordpress_file.class.php");
require_once("${dir}/feedwordpress_parser.class.php");
require_once("${dir}/feedwordpressrpc.class.php");
Expand Down

0 comments on commit 841fc50

Please sign in to comment.