Permalink
Browse files

PHP Notices / It is 2016, my dudes. Let's get these up to PHP 5/7 sty…

…le constructors
  • Loading branch information...
1 parent 7fa77d4 commit 86e3579526e4bb9a70df01ff6bac279249a136ad Rad Geek committed Dec 11, 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 __construct( $page = 'feedwordpressadmin', $link = NULL ) {
+ public function __construct( $page = 'feedwordpressadmin', $link = NULL ) {
$this->link = $link;
// Set meta-box context name
@@ -24,10 +24,6 @@ function __construct( $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,12 +5,12 @@ class FeedWordPressAuthorsPage extends FeedWordPressAdminPage {
var $authorlist = NULL;
var $rule_count = 0;
- function __construct( $link = -1 ) {
+ public function __construct( $link = -1 ) {
if (is_numeric($link) and -1 == $link) :
- $link = FeedWordPressAdminPage::submitted_link();
+ $link = parent::submitted_link();
endif;
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpressauthors', $link);
+ parent::__construct('feedwordpressauthors', $link);
$this->refresh_author_list();
$this->dispatch = 'feedwordpress_author_settings';
$this->filename = __FILE__;
@@ -21,10 +21,6 @@ function __construct( $link = -1 ) {
'open-sheet' => 'Syndicated Author',
);
}
-
- function FeedWordPressAuthorsPage( $link = -1 ) {
- self::__construct( $link );
- }
function refresh_author_list () {
$this->authorlist = fwp_author_list();
View
@@ -2,12 +2,12 @@
require_once(dirname(__FILE__) . '/admin-ui.php');
class FeedWordPressCategoriesPage extends FeedWordPressAdminPage {
- function __construct( $link = -1 ) {
+ public function __construct( $link = -1 ) {
if (is_numeric($link) and -1 == $link) :
$link = $this->submitted_link();
endif;
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpresscategories', $link);
+ parent::__construct('feedwordpresscategories', $link);
$this->dispatch = 'feedwordpress_admin_page_categories';
$this->pagenames = array(
'default' => 'Categories & Tags',
@@ -17,10 +17,6 @@ function __construct( $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,20 +2,16 @@
require_once(dirname(__FILE__) . '/admin-ui.php');
class FeedWordPressDiagnosticsPage extends FeedWordPressAdminPage {
- function __construct() {
+ public function __construct() {
// Set meta-box context name
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpressdiagnosticspage');
+ parent::__construct('feedwordpressdiagnosticspage');
$this->dispatch = 'feedwordpress_diagnostics';
$this->filename = __FILE__;
$this->test_html = array();
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 () {
View
@@ -83,12 +83,12 @@ 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 __construct( $link = -1 ) {
+ public function __construct( $link = -1 ) {
if (is_numeric($link) and -1 == $link) :
- $link = FeedWordPressAdminPage::submitted_link();
+ $link = parent::submitted_link();
endif;
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpressfeeds', $link);
+ parent::__construct('feedwordpressfeeds', $link);
$this->dispatch = 'feedwordpress_admin_page_feeds';
$this->pagenames = array(
@@ -102,10 +102,6 @@ function __construct( $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;
@@ -143,7 +139,7 @@ function display () {
} /* FeedWordPressFeedsPage::display() */
function ajax_interface_js () {
- FeedWordPressAdminPage::ajax_interface_js();
+ parent::ajax_interface_js();
?>
jQuery(document).ready( function () {
@@ -13,13 +13,13 @@
class FeedWordPress_Walker_Category_Checklist extends Walker_Category_Checklist {
var $prefix = ''; var $taxonomy = 'category';
var $checkbox_name = NULL;
- function FeedWordPress_Walker_Category_Checklist ($params = array()) {
+ public function __construct ($params = array()) {
$this->set_taxonomy('category');
if (isset($params['checkbox_name'])) :
$this->checkbox_name = $params['checkbox_name'];
endif;
- }
+ } /* FeedWordPress_Walker_Category_Checklist::__construct () */
function set_prefix ($prefix) {
$this->prefix = $prefix;
@@ -4,7 +4,7 @@
$fwp_credentials = NULL;
class FeedWordPress_File extends WP_SimplePie_File {
- function FeedWordPress_File ($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
+ public function __construct ($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
global $feedwordpress;
global $wp_version;
@@ -4,7 +4,7 @@
################################################################################
class FeedWordPressRPC {
- function FeedWordPressRPC () {
+ public function __construct () {
add_filter('xmlrpc_methods', array($this, 'xmlrpc_methods'));
}
@@ -16,8 +16,8 @@
define('FWP_CHECK_FOR_UPDATES', 'Update');
class FeedWordPressSyndicationPage extends FeedWordPressAdminPage {
- function FeedWordPressSyndicationPage ($filename = NULL) {
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpresssyndication', /*link=*/ NULL);
+ public function __construct ($filename = NULL) {
+ parent::__construct('feedwordpresssyndication', /*link=*/ NULL);
// No over-arching form element
$this->dispatch = NULL;
@@ -8,9 +8,9 @@
*/
class InspectPostMeta {
- function InspectPostMeta ($in_hook = true) {
+ public function __construct ($in_hook = true) {
add_action('add_meta_boxes', array($this, 'add_meta_boxes'), 10, 2);
- }
+ } /* InspectPostMeta::__construct () */
function add_meta_boxes ($post_type, $post) {
add_meta_box(
View
@@ -2,18 +2,14 @@
require_once(dirname(__FILE__) . '/admin-ui.php');
class FeedWordPressPerformancePage extends FeedWordPressAdminPage {
- function __construct() {
+ public function __construct() {
// Set meta-box context name
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpressperformancepage');
+ parent::__construct('feedwordpressperformancepage');
$this->dispatch = 'feedwordpress_performance';
$this->filename = __FILE__;
}
- function FeedWordPressPerformancePage() {
- self::__construct();
- }
-
- function has_link () { return false; }
+ public function has_link () { return false; }
function display () {
global $wpdb, $wp_db_version, $fwp_path;
View
@@ -11,12 +11,12 @@ 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 __construct( $link = -1 ) {
+ public function __construct( $link = -1 ) {
if (is_numeric($link) and -1 == $link) :
- $link = FeedWordPressAdminPage::submitted_link();
+ $link = parent::submitted_link();
endif;
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpresspostspage', $link);
+ parent::__construct('feedwordpresspostspage', $link);
$this->dispatch = 'feedwordpress_admin_page_posts';
$this->filename = __FILE__;
$this->updatedPosts = new UpdatedPostsControl($this);
@@ -28,10 +28,6 @@ function __construct( $link = -1 ) {
);
} /* FeedWordPressPostsPage constructor */
- function FeedWordPressPostsPage( $link = -1 ) {
- self::__construct( $link );
- }
-
function save_settings ($post) {
// custom post settings
$custom_settings = $this->custom_post_settings();
@@ -1,7 +1,7 @@
<?php
class SyndicationDataQueries {
- function SyndicationDataQueries () {
+ public function __construct () {
add_action('init', array($this, 'init'));
add_action('parse_query', array($this, 'parse_query'), 10, 1);
add_filter('posts_search', array($this, 'posts_search'), 10, 2);

0 comments on commit 86e3579

Please sign in to comment.