Permalink
Browse files

Merge pull request #66 from alexiskulash/master

PHP 7 Compatibility Changes
  • Loading branch information...
2 parents 30028f9 + 8a0435d commit 4f9847067f7a7b29e162e135e5e703d9f9f03cd8 @radgeek committed on GitHub Sep 24, 2016
View
@@ -14,7 +14,7 @@ class FeedWordPressAdminPage {
*
* @param mixed $link An object of class {@link SyndicatedLink} if created for one feed's settings, NULL if created for global default settings
*/
- function FeedWordPressAdminPage ($page = 'feedwordpressadmin', $link = NULL) {
+ function __construct( $page = 'feedwordpressadmin', $link = NULL ) {
$this->link = $link;
// Set meta-box context name
@@ -24,6 +24,10 @@ function FeedWordPressAdminPage ($page = 'feedwordpressadmin', $link = NULL) {
endif;
} /* FeedWordPressAdminPage constructor */
+ function FeedWordPressAdminPage( $page = 'feedwordpressadmin', $link = NULL ) {
+ self::__construct( $page, $link );
+ }
+
function pageslug () {
$slug = preg_replace('/FeedWordPress(.*)Page/', '$1', get_class($this));
return strtolower($slug);
View
@@ -5,7 +5,7 @@ class FeedWordPressAuthorsPage extends FeedWordPressAdminPage {
var $authorlist = NULL;
var $rule_count = 0;
- function FeedWordPressAuthorsPage ($link = -1) {
+ function __construct( $link = -1 ) {
if (is_numeric($link) and -1 == $link) :
$link = FeedWordPressAdminPage::submitted_link();
endif;
@@ -21,6 +21,10 @@ function FeedWordPressAuthorsPage ($link = -1) {
'open-sheet' => 'Syndicated Author',
);
}
+
+ function FeedWordPressAuthorsPage( $link = -1 ) {
+ self::__construct( $link );
+ }
function refresh_author_list () {
$this->authorlist = fwp_author_list();
View
@@ -2,7 +2,7 @@
require_once(dirname(__FILE__) . '/admin-ui.php');
class FeedWordPressCategoriesPage extends FeedWordPressAdminPage {
- function FeedWordPressCategoriesPage ($link = -1) {
+ function __construct( $link = -1 ) {
if (is_numeric($link) and -1 == $link) :
$link = $this->submitted_link();
endif;
@@ -17,6 +17,10 @@ function FeedWordPressCategoriesPage ($link = -1) {
$this->filename = __FILE__;
}
+ function FeedWordPressCategoriesPage( $link = -1 ) {
+ self::__construct( $link );
+ }
+
function unfamiliar_category_label ($name) {
if (preg_match('/^create:(.*)$/', $name, $refs)) :
$tax = get_taxonomy($refs[1]);
@@ -2,7 +2,7 @@
require_once(dirname(__FILE__) . '/admin-ui.php');
class FeedWordPressDiagnosticsPage extends FeedWordPressAdminPage {
- function FeedWordPressDiagnosticsPage () {
+ function __construct() {
// Set meta-box context name
FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpressdiagnosticspage');
$this->dispatch = 'feedwordpress_diagnostics';
@@ -12,6 +12,10 @@ function FeedWordPressDiagnosticsPage () {
add_action('feedwordpress_diagnostics_do_http_test', array($this, 'do_http_test'), 10, 1);
}
+ function FeedWordPressDiagnosticsPage() {
+ self::__construct();
+ }
+
function has_link () { return false; }
function display () {
@@ -37,7 +37,7 @@ class FeedFinder {
var $_obvious_feed_url = array('[./]rss', '[./]rdf', '[./]atom', '[./]feed', '\.xml');
var $_maybe_feed_url = array ('rss', 'rdf', 'atom', 'feed', 'xml');
- function FeedFinder ($uri = NULL, $params = array(), $fallbacks = 3) {
+ function __construct( $uri = NULL, $params = array(), $fallbacks = 3 ) {
if (is_bool($params)) :
$params = array("verify" => $params);
endif;
@@ -59,6 +59,10 @@ function FeedFinder ($uri = NULL, $params = array(), $fallbacks = 3) {
$this->fallbacks = $fallbacks;
} /* FeedFinder::FeedFinder () */
+ function FeedFinder( $uri = NULL, $params = array(), $fallbacks = 3 ) {
+ self::__construct( $uri, $params, $fallbacks );
+ }
+
function find ($uri = NULL, $params = array()) {
$params = wp_parse_args($params, array( // Defaults
"authentication" => -1,
View
@@ -83,7 +83,7 @@ class FeedWordPressFeedsPage extends FeedWordPressAdminPage {
*
* @param mixed $link An object of class {@link SyndicatedLink} if created for one feed's settings, NULL if created for global default settings
*/
- function FeedWordPressFeedsPage ($link = -1) {
+ function __construct( $link = -1 ) {
if (is_numeric($link) and -1 == $link) :
$link = FeedWordPressAdminPage::submitted_link();
endif;
@@ -102,6 +102,10 @@ function FeedWordPressFeedsPage ($link = -1) {
$this->special_settings = apply_filters('syndicated_feed_special_settings', $this->special_settings, $this);
} /* FeedWordPressFeedsPage constructor */
+ function FeedWordPressFeedsPage( $link = -1 ) {
+ self::__construct( $link );
+ }
+
function display () {
global $fwp_post;
global $post_source;
View
@@ -24,10 +24,14 @@ class FeedTime {
var $rep;
var $ts;
- function FeedTime ($time) {
+ function __construct( $time ) {
$this->set($time);
} /* FeedTime constructor */
+ function FeedTime( $time ) {
+ self::__construct( $time );
+ }
+
function set ($time, $recurse = false) {
$this->rep = $time;
$this->ts = NULL;
@@ -66,7 +66,7 @@ class MagpieFromSimplePie {
* @uses MagpieFromSimplePie::normalize
* @uses MagpieFromSimplePie::is_atom
*/
- function MagpieFromSimplePie ($pie, $item = true) {
+ function __construct( $pie, $item = true ) {
$this->pie = $pie;
// item in {NULL, true} = process channel data
@@ -95,6 +95,10 @@ function MagpieFromSimplePie ($pie, $item = true) {
$this->feed_version = $this->feed_version();
$this->encoding = $pie->get_encoding();
} /* MagpieFromSimplePie constructor */
+
+ function MagpieFromSimplePie( $pie, $item = true ) {
+ self::__construct( $pie, $item );
+ }
/**
* MagpieFromSimplePie::get_items: returns an array of MagpieRSS format arrays
@@ -4,7 +4,7 @@
class MagpieMockLink extends SyndicatedLink {
var $url;
- function MagpieMockLink ($rss, $url) {
+ function __construct( $rss, $url ) {
$this->link = $rss;
if (is_array($rss) and isset($rss['simplepie']) and isset($rss['magpie'])) :
@@ -22,6 +22,10 @@ function MagpieMockLink ($rss, $url) {
);
} /* function MagpieMockLink::MagpieMockLink () */
+ function MagpieMockLink( $rss, $url ) {
+ self::__construct( $rss, $url );
+ }
+
function poll ($crash_ts = NULL) {
// Do nothing but update copy of feed
$this->simplepie = FeedWordPress::fetch($this->url);
@@ -2,13 +2,17 @@
require_once(dirname(__FILE__) . '/admin-ui.php');
class FeedWordPressPerformancePage extends FeedWordPressAdminPage {
- function FeedWordPressPerformancePage () {
+ function __construct() {
// Set meta-box context name
FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpressperformancepage');
$this->dispatch = 'feedwordpress_performance';
$this->filename = __FILE__;
}
+ function FeedWordPressPerformancePage() {
+ self::__construct();
+ }
+
function has_link () { return false; }
function display () {
View
@@ -11,7 +11,7 @@ class FeedWordPressPostsPage extends FeedWordPressAdminPage {
*
* @param mixed $link An object of class {@link SyndicatedLink} if created for one feed's settings, NULL if created for global default settings
*/
- function FeedWordPressPostsPage ($link = -1) {
+ function __construct( $link = -1 ) {
if (is_numeric($link) and -1 == $link) :
$link = FeedWordPressAdminPage::submitted_link();
endif;
@@ -28,6 +28,10 @@ function FeedWordPressPostsPage ($link = -1) {
);
} /* FeedWordPressPostsPage constructor */
+ function FeedWordPressPostsPage( $link = -1 ) {
+ self::__construct( $link );
+ }
+
function save_settings ($post) {
// custom post settings
$custom_settings = $this->custom_post_settings();
@@ -43,7 +43,7 @@ class SyndicatedLink {
public $simplepie = null;
var $magpie = null;
- function SyndicatedLink ($link) {
+ function __construct( $link ) {
global $wpdb;
if (is_object($link)) :
@@ -61,6 +61,10 @@ function SyndicatedLink ($link) {
add_filter('feedwordpress_update_complete', array($this, 'process_retirements'), 1000, 1);
} /* SyndicatedLink::SyndicatedLink () */
+ function SyndicatedLink( $link ) {
+ self::__construct( $link );
+ }
+
function found () {
return is_object($this->link) and !is_wp_error($this->link);
} /* SyndicatedLink::found () */
@@ -1,10 +1,14 @@
<?php
class UpdatedPostsControl {
var $page;
- function UpdatedPostsControl (&$page) {
+ function __construct( &$page ) {
$this->page =& $page;
} /* UpdatedPostsControl constructor */
+ function UpdatedPostsControl( &$page ) {
+ self::__construct( $page );
+ }
+
function display () {
$settings = array(
// This is all bass-ackwards because the actual yes/no

0 comments on commit 4f98470

Please sign in to comment.