FeedWordPress - Version 2016.1211

Version Description

  • WORDPRESS COMPATIBILITY: Tested with new versions of WordPress up to 4.7.

  • PHP WARNINGS UNDER WP 4.7: Eliminated cause of a PHP warning under WP 4.7 "Parameter 1 to FeedWordPressHTTPAuthenticator::set_auth_options expected to be reference" Warnings were due to a change in how http_api_curl hook is sometimes called in WP 4.7; so I changed the signature of the event handling method to avoid the notice. Props to @cogdog, @froomkin, @gwynethllewelyn et al. for flagging the issue and @garymarkfuller for suggesting a preliminary fix to the issue that was fairly similar to the solution I ended up adopting.

  • PHP 7 and PHP Strict Standards compatibility changes: @alexiskulash @daidais and @zoul0813 all sent pull requests through Github to fix some issues from a very old code base that has made its way from PHP 3.x through 5.x to the roll-out of PHP 7. Class methods should now fare better under modern versions of PHP and generate fewer "Deprecated" notices.

  • IMPROVEMENTS TO SCHEDULED AND AUTOMATIC UPDATES: use wp_loaded hook to check for magic URL parameters and to execute updates, to do pageload-based automatic updates, etc. Ensures that anything plugins or themes need to do in init to set up custom post types, taxonomies, etc. will be done before the update_feedwordpress updates are attempted. If you saw posts not getting put into the correct custom post type or custom taxonomies or similar problems when performing scheduled updates, but the problem seemed to go away when you manually performed updates through the wp-admin interface, then you might be able to solve those problems with this update.

Download this release

Release Info

Developer radgeek
Plugin Icon wp plugin FeedWordPress
Version 2016.1211
Comparing to
See all releases

Code changes from version 2016.0420 to 2016.1211

admin-ui.php CHANGED
@@ -14,7 +14,7 @@ class FeedWordPressAdminPage {
14
  *
15
  * @param mixed $link An object of class {@link SyndicatedLink} if created for one feed's settings, NULL if created for global default settings
16
  */
17
- function FeedWordPressAdminPage ($page = 'feedwordpressadmin', $link = NULL) {
18
  $this->link = $link;
19
 
20
  // Set meta-box context name
@@ -373,7 +373,7 @@ class FeedWordPressAdminPage {
373
  function display_sheet_header ($pagename = 'Syndication', $all = false) {
374
  global $fwp_path;
375
  ?>
376
- <div class="icon32"><img src="<?php print esc_html(WP_PLUGIN_URL.'/'.$fwp_path.'/feedwordpress.png'); ?>" alt="" /></div>
377
  <h2><?php print esc_html(__($pagename.($all ? '' : ' Settings'))); ?><?php if ($this->for_feed_settings()) : ?>: <?php echo esc_html($this->link->name(/*from feed=*/ false)); ?><?php endif; ?></h2>
378
  <?php
379
  }
@@ -976,7 +976,7 @@ class FeedWordPressSettingsUI {
976
  wp_enqueue_script('post'); // for magic tag and category boxes
977
  wp_enqueue_script('admin-forms'); // for checkbox selection
978
 
979
- wp_register_script('feedwordpress-elements', WP_PLUGIN_URL.'/'.$fwp_path.'/feedwordpress-elements.js');
980
  wp_enqueue_script('feedwordpress-elements');
981
  }
982
 
14
  *
15
  * @param mixed $link An object of class {@link SyndicatedLink} if created for one feed's settings, NULL if created for global default settings
16
  */
17
+ public function __construct( $page = 'feedwordpressadmin', $link = NULL ) {
18
  $this->link = $link;
19
 
20
  // Set meta-box context name
373
  function display_sheet_header ($pagename = 'Syndication', $all = false) {
374
  global $fwp_path;
375
  ?>
376
+ <div class="icon32"><img src="<?php print esc_html( plugins_url( '/'.$fwp_path.'/feedwordpress.png') ); ?>" alt="" /></div>
377
  <h2><?php print esc_html(__($pagename.($all ? '' : ' Settings'))); ?><?php if ($this->for_feed_settings()) : ?>: <?php echo esc_html($this->link->name(/*from feed=*/ false)); ?><?php endif; ?></h2>
378
  <?php
379
  }
976
  wp_enqueue_script('post'); // for magic tag and category boxes
977
  wp_enqueue_script('admin-forms'); // for checkbox selection
978
 
979
+ wp_register_script('feedwordpress-elements', plugins_url('/' . $fwp_path . '/feedwordpress-elements.js') );
980
  wp_enqueue_script('feedwordpress-elements');
981
  }
982
 
authors-page.php CHANGED
@@ -5,12 +5,12 @@ class FeedWordPressAuthorsPage extends FeedWordPressAdminPage {
5
  var $authorlist = NULL;
6
  var $rule_count = 0;
7
 
8
- function FeedWordPressAuthorsPage ($link = -1) {
9
  if (is_numeric($link) and -1 == $link) :
10
- $link = FeedWordPressAdminPage::submitted_link();
11
  endif;
12
 
13
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpressauthors', $link);
14
  $this->refresh_author_list();
15
  $this->dispatch = 'feedwordpress_author_settings';
16
  $this->filename = __FILE__;
5
  var $authorlist = NULL;
6
  var $rule_count = 0;
7
 
8
+ public function __construct( $link = -1 ) {
9
  if (is_numeric($link) and -1 == $link) :
10
+ $link = parent::submitted_link();
11
  endif;
12
 
13
+ parent::__construct('feedwordpressauthors', $link);
14
  $this->refresh_author_list();
15
  $this->dispatch = 'feedwordpress_author_settings';
16
  $this->filename = __FILE__;
categories-page.php CHANGED
@@ -2,12 +2,12 @@
2
  require_once(dirname(__FILE__) . '/admin-ui.php');
3
 
4
  class FeedWordPressCategoriesPage extends FeedWordPressAdminPage {
5
- function FeedWordPressCategoriesPage ($link = -1) {
6
  if (is_numeric($link) and -1 == $link) :
7
  $link = $this->submitted_link();
8
  endif;
9
 
10
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpresscategories', $link);
11
  $this->dispatch = 'feedwordpress_admin_page_categories';
12
  $this->pagenames = array(
13
  'default' => 'Categories & Tags',
2
  require_once(dirname(__FILE__) . '/admin-ui.php');
3
 
4
  class FeedWordPressCategoriesPage extends FeedWordPressAdminPage {
5
+ public function __construct( $link = -1 ) {
6
  if (is_numeric($link) and -1 == $link) :
7
  $link = $this->submitted_link();
8
  endif;
9
 
10
+ parent::__construct('feedwordpresscategories', $link);
11
  $this->dispatch = 'feedwordpress_admin_page_categories';
12
  $this->pagenames = array(
13
  'default' => 'Categories & Tags',
diagnostics-page.php CHANGED
@@ -2,9 +2,9 @@
2
  require_once(dirname(__FILE__) . '/admin-ui.php');
3
 
4
  class FeedWordPressDiagnosticsPage extends FeedWordPressAdminPage {
5
- function FeedWordPressDiagnosticsPage () {
6
  // Set meta-box context name
7
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpressdiagnosticspage');
8
  $this->dispatch = 'feedwordpress_diagnostics';
9
  $this->filename = __FILE__;
10
 
2
  require_once(dirname(__FILE__) . '/admin-ui.php');
3
 
4
  class FeedWordPressDiagnosticsPage extends FeedWordPressAdminPage {
5
+ public function __construct() {
6
  // Set meta-box context name
7
+ parent::__construct('feedwordpressdiagnosticspage');
8
  $this->dispatch = 'feedwordpress_diagnostics';
9
  $this->filename = __FILE__;
10
 
feedfinder.class.php CHANGED
@@ -37,7 +37,7 @@ class FeedFinder {
37
  var $_obvious_feed_url = array('[./]rss', '[./]rdf', '[./]atom', '[./]feed', '\.xml');
38
  var $_maybe_feed_url = array ('rss', 'rdf', 'atom', 'feed', 'xml');
39
 
40
- function FeedFinder ($uri = NULL, $params = array(), $fallbacks = 3) {
41
  if (is_bool($params)) :
42
  $params = array("verify" => $params);
43
  endif;
@@ -59,6 +59,10 @@ class FeedFinder {
59
  $this->fallbacks = $fallbacks;
60
  } /* FeedFinder::FeedFinder () */
61
 
 
 
 
 
62
  function find ($uri = NULL, $params = array()) {
63
  $params = wp_parse_args($params, array( // Defaults
64
  "authentication" => -1,
37
  var $_obvious_feed_url = array('[./]rss', '[./]rdf', '[./]atom', '[./]feed', '\.xml');
38
  var $_maybe_feed_url = array ('rss', 'rdf', 'atom', 'feed', 'xml');
39
 
40
+ function __construct( $uri = NULL, $params = array(), $fallbacks = 3 ) {
41
  if (is_bool($params)) :
42
  $params = array("verify" => $params);
43
  endif;
59
  $this->fallbacks = $fallbacks;
60
  } /* FeedFinder::FeedFinder () */
61
 
62
+ function FeedFinder( $uri = NULL, $params = array(), $fallbacks = 3 ) {
63
+ self::__construct( $uri, $params, $fallbacks );
64
+ }
65
+
66
  function find ($uri = NULL, $params = array()) {
67
  $params = wp_parse_args($params, array( // Defaults
68
  "authentication" => -1,
feeds-page.php CHANGED
@@ -83,12 +83,12 @@ class FeedWordPressFeedsPage extends FeedWordPressAdminPage {
83
  *
84
  * @param mixed $link An object of class {@link SyndicatedLink} if created for one feed's settings, NULL if created for global default settings
85
  */
86
- function FeedWordPressFeedsPage ($link = -1) {
87
  if (is_numeric($link) and -1 == $link) :
88
- $link = FeedWordPressAdminPage::submitted_link();
89
  endif;
90
 
91
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpressfeeds', $link);
92
 
93
  $this->dispatch = 'feedwordpress_admin_page_feeds';
94
  $this->pagenames = array(
@@ -139,7 +139,7 @@ class FeedWordPressFeedsPage extends FeedWordPressAdminPage {
139
  } /* FeedWordPressFeedsPage::display() */
140
 
141
  function ajax_interface_js () {
142
- FeedWordPressAdminPage::ajax_interface_js();
143
  ?>
144
 
145
  jQuery(document).ready( function () {
83
  *
84
  * @param mixed $link An object of class {@link SyndicatedLink} if created for one feed's settings, NULL if created for global default settings
85
  */
86
+ public function __construct( $link = -1 ) {
87
  if (is_numeric($link) and -1 == $link) :
88
+ $link = parent::submitted_link();
89
  endif;
90
 
91
+ parent::__construct('feedwordpressfeeds', $link);
92
 
93
  $this->dispatch = 'feedwordpress_admin_page_feeds';
94
  $this->pagenames = array(
139
  } /* FeedWordPressFeedsPage::display() */
140
 
141
  function ajax_interface_js () {
142
+ parent::ajax_interface_js();
143
  ?>
144
 
145
  jQuery(document).ready( function () {
feedtime.class.php CHANGED
@@ -24,10 +24,14 @@ class FeedTime {
24
  var $rep;
25
  var $ts;
26
 
27
- function FeedTime ($time) {
28
  $this->set($time);
29
  } /* FeedTime constructor */
30
 
 
 
 
 
31
  function set ($time, $recurse = false) {
32
  $this->rep = $time;
33
  $this->ts = NULL;
24
  var $rep;
25
  var $ts;
26
 
27
+ function __construct( $time ) {
28
  $this->set($time);
29
  } /* FeedTime constructor */
30
 
31
+ function FeedTime( $time ) {
32
+ self::__construct( $time );
33
+ }
34
+
35
  function set ($time, $recurse = false) {
36
  $this->rep = $time;
37
  $this->ts = NULL;
feedwordpress-content-type-sniffer.class.php CHANGED
@@ -1,5 +1,7 @@
1
  <?php
2
- require_once(ABSPATH . WPINC . '/class-feed.php');
 
 
3
 
4
  class FeedWordPress_Content_Type_Sniffer extends SimplePie_Content_Type_Sniffer {
5
  /**
1
  <?php
2
+ if (!class_exists('SimplePie_Content_Type_Sniffer')) :
3
+ require_once(ABSPATH . WPINC . '/class-simplepie.php');
4
+ endif;
5
 
6
  class FeedWordPress_Content_Type_Sniffer extends SimplePie_Content_Type_Sniffer {
7
  /**
feedwordpress-walker-category-checklist.class.php CHANGED
@@ -13,13 +13,13 @@ require_once(ABSPATH.'/wp-admin/includes/template.php');
13
  class FeedWordPress_Walker_Category_Checklist extends Walker_Category_Checklist {
14
  var $prefix = ''; var $taxonomy = 'category';
15
  var $checkbox_name = NULL;
16
- function FeedWordPress_Walker_Category_Checklist ($params = array()) {
17
  $this->set_taxonomy('category');
18
 
19
  if (isset($params['checkbox_name'])) :
20
  $this->checkbox_name = $params['checkbox_name'];
21
  endif;
22
- }
23
 
24
  function set_prefix ($prefix) {
25
  $this->prefix = $prefix;
@@ -28,7 +28,7 @@ class FeedWordPress_Walker_Category_Checklist extends Walker_Category_Checklist
28
  $this->taxonomy = $taxonomy;
29
  }
30
 
31
- function start_el( &$output, $category, $depth = 0, $args = array(), $current_object_id = 0 ) {
32
  extract($args);
33
  if ( empty($taxonomy) ) :
34
  $taxonomy = 'category';
13
  class FeedWordPress_Walker_Category_Checklist extends Walker_Category_Checklist {
14
  var $prefix = ''; var $taxonomy = 'category';
15
  var $checkbox_name = NULL;
16
+ public function __construct ($params = array()) {
17
  $this->set_taxonomy('category');
18
 
19
  if (isset($params['checkbox_name'])) :
20
  $this->checkbox_name = $params['checkbox_name'];
21
  endif;
22
+ } /* FeedWordPress_Walker_Category_Checklist::__construct () */
23
 
24
  function set_prefix ($prefix) {
25
  $this->prefix = $prefix;
28
  $this->taxonomy = $taxonomy;
29
  }
30
 
31
+ function start_el (&$output, $category, $depth = 0, $args = array(), $id = 0) {
32
  extract($args);
33
  if ( empty($taxonomy) ) :
34
  $taxonomy = 'category';
feedwordpress.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: FeedWordPress
4
  Plugin URI: http://feedwordpress.radgeek.com/
5
  Description: simple and flexible Atom/RSS syndication for WordPress
6
- Version: 2016.0420
7
  Author: Charles Johnson
8
  Author URI: http://radgeek.com/
9
  License: GPL
@@ -11,7 +11,7 @@ License: GPL
11
 
12
  /**
13
  * @package FeedWordPress
14
- * @version 2016.0420
15
  */
16
 
17
  # This uses code derived from:
@@ -32,7 +32,7 @@ License: GPL
32
 
33
  # -- Don't change these unless you know what you're doing...
34
 
35
- define ('FEEDWORDPRESS_VERSION', '2016.0420');
36
  define ('FEEDWORDPRESS_AUTHOR_CONTACT', 'http://radgeek.com/contact');
37
 
38
  if (!defined('FEEDWORDPRESS_BLEG')) :
@@ -96,7 +96,11 @@ add_filter('wp_feed_cache_transient_lifetime', array('FeedWordPress', 'cache_lif
96
  if (!class_exists('SimplePie')) :
97
  require_once(ABSPATH . WPINC . '/class-simplepie.php');
98
  endif;
99
- require_once(ABSPATH . WPINC . '/class-feed.php');
 
 
 
 
100
 
101
  if (!function_exists('wp_insert_user')) :
102
  require_once (ABSPATH . WPINC . '/registration.php'); // for wp_insert_user
@@ -216,6 +220,8 @@ if (!$feedwordpress->needs_upgrade()) : // only work if the conditions are safe!
216
  endif;
217
 
218
  add_action('init', array($feedwordpress, 'init'));
 
 
219
  add_action('shutdown', array($feedwordpress, 'email_diagnostic_log'));
220
  add_action('shutdown', array($feedwordpress, 'feedwordpress_cleanup'));
221
  add_action('wp_dashboard_setup', array($feedwordpress, 'dashboard_setup'));
@@ -237,7 +243,7 @@ endif; // if (!FeedWordPress::needs_upgrade())
237
  ################################################################################
238
 
239
  class FeedWordPressDiagnostic {
240
- function feed_error ($error, $old, $link) {
241
  $wpError = $error['object'];
242
  $url = $link->uri();
243
 
@@ -671,7 +677,7 @@ function fwp_add_pages () {
671
  $menu_cap,
672
  $syndicationMenu,
673
  NULL,
674
- WP_PLUGIN_URL.'/'.FeedWordPress::path('feedwordpress-tiny.png')
675
  );
676
 
677
  do_action('feedwordpress_admin_menu_pre_feeds', $menu_cap, $settings_cap);
@@ -1204,7 +1210,11 @@ class FeedWordPress {
1204
  $exact = $hook; // Before munging
1205
 
1206
  if (!!$hook) :
1207
- if ($hook != 'init') : // Constrain values.
 
 
 
 
1208
  $hook = 'shutdown';
1209
  endif;
1210
  endif;
@@ -1465,7 +1475,7 @@ class FeedWordPress {
1465
  // If this is a FeedWordPress admin page, queue up scripts for AJAX
1466
  // functions that FWP uses. If it is a display page or a non-FWP admin
1467
  // page, don't.
1468
- wp_register_style('feedwordpress-elements', WP_PLUGIN_URL.'/'.$fwp_path.'/feedwordpress-elements.css');
1469
  if (FeedWordPressSettingsUI::is_admin()) :
1470
  // For JavaScript that needs to be generated dynamically
1471
  add_action('admin_print_scripts', array('FeedWordPressSettingsUI', 'admin_scripts'));
@@ -1512,10 +1522,21 @@ class FeedWordPress {
1512
  add_action('wp_ajax_fwp_feedcontents', array($this, 'fwp_feedcontents'));
1513
  add_action('wp_ajax_fwp_xpathtest', array($this, 'fwp_xpathtest'));
1514
 
1515
- $this->clear_cache_magic_url();
1516
- $this->update_magic_url();
1517
  } /* FeedWordPress::init() */
1518
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1519
  public function fwp_feeds () {
1520
  $feeds = array();
1521
  $feed_ids = $this->feeds;
@@ -1769,11 +1790,22 @@ class FeedWordPress {
1769
 
1770
  } /* FeedWordPress::user_can_richedit () */
1771
 
 
 
 
 
 
 
 
 
 
 
1772
  public function update_magic_url () {
1773
  global $wpdb;
1774
 
1775
  // Explicit update request in the HTTP request (e.g. from a cron job)
1776
  if ($this->update_requested()) :
 
1777
  $this->update_hooked = "Initiating a CRON JOB CHECK-IN ON UPDATE SCHEDULE due to URL parameter = ".trim($this->val($_REQUEST['update_feedwordpress']));
1778
 
1779
  $this->update($this->update_requested_url());
@@ -1803,27 +1835,17 @@ class FeedWordPress {
1803
  // when successful.
1804
  exit;
1805
  endif;
1806
- } /* FeedWordPress::magic_update_url () */
1807
-
1808
- public function clear_cache_magic_url () {
1809
- if ($this->clear_cache_requested()) :
1810
- $this->clear_cache();
1811
- endif;
1812
- } /* FeedWordPress::clear_cache_magic_url() */
1813
-
1814
- public function clear_cache_requested () {
1815
- return MyPHP::request('clear_cache');
1816
- } /* FeedWordPress::clear_cache_requested() */
1817
 
1818
  public function update_requested () {
1819
  return MyPHP::request('update_feedwordpress');
1820
  } /* FeedWordPress::update_requested() */
1821
-
1822
  public function update_requested_url () {
1823
  $ret = null;
1824
 
1825
  if (($_REQUEST['update_feedwordpress']=='*')
1826
- or (preg_match('|^http://.*|i', $_REQUEST['update_feedwordpress']))) :
1827
  $ret = $_REQUEST['update_feedwordpress'];
1828
  endif;
1829
 
3
  Plugin Name: FeedWordPress
4
  Plugin URI: http://feedwordpress.radgeek.com/
5
  Description: simple and flexible Atom/RSS syndication for WordPress
6
+ Version: 2016.1211
7
  Author: Charles Johnson
8
  Author URI: http://radgeek.com/
9
  License: GPL
11
 
12
  /**
13
  * @package FeedWordPress
14
+ * @version 2016.1211
15
  */
16
 
17
  # This uses code derived from:
32
 
33
  # -- Don't change these unless you know what you're doing...
34
 
35
+ define ('FEEDWORDPRESS_VERSION', '2016.1211');
36
  define ('FEEDWORDPRESS_AUTHOR_CONTACT', 'http://radgeek.com/contact');
37
 
38
  if (!defined('FEEDWORDPRESS_BLEG')) :
96
  if (!class_exists('SimplePie')) :
97
  require_once(ABSPATH . WPINC . '/class-simplepie.php');
98
  endif;
99
+
100
+ require_once( ABSPATH . WPINC . '/class-wp-feed-cache.php' );
101
+ require_once( ABSPATH . WPINC . '/class-wp-feed-cache-transient.php' );
102
+ require_once( ABSPATH . WPINC . '/class-wp-simplepie-file.php' );
103
+ require_once( ABSPATH . WPINC . '/class-wp-simplepie-sanitize-kses.php' );
104
 
105
  if (!function_exists('wp_insert_user')) :
106
  require_once (ABSPATH . WPINC . '/registration.php'); // for wp_insert_user
220
  endif;
221
 
222
  add_action('init', array($feedwordpress, 'init'));
223
+ add_action('wp_loaded', array($feedwordpress, 'wp_loaded'));
224
+
225
  add_action('shutdown', array($feedwordpress, 'email_diagnostic_log'));
226
  add_action('shutdown', array($feedwordpress, 'feedwordpress_cleanup'));
227
  add_action('wp_dashboard_setup', array($feedwordpress, 'dashboard_setup'));
243
  ################################################################################
244
 
245
  class FeedWordPressDiagnostic {
246
+ public static function feed_error ($error, $old, $link) {
247
  $wpError = $error['object'];
248
  $url = $link->uri();
249
 
677
  $menu_cap,
678
  $syndicationMenu,
679
  NULL,
680
+ plugins_url( '/'.FeedWordPress::path('feedwordpress-tiny.png') )
681
  );
682
 
683
  do_action('feedwordpress_admin_menu_pre_feeds', $menu_cap, $settings_cap);
1210
  $exact = $hook; // Before munging
1211
 
1212
  if (!!$hook) :
1213
+ if ($hook == 'init' or $hook == 'wp_loaded') : // Re-map init to wp_loaded
1214
+ $hook = ($params['setting only'] ? 'init' : 'wp_loaded');
1215
+
1216
+ // Constrain possible values. If it's not an init or wp_loaded, it's a shutdown
1217
+ else :
1218
  $hook = 'shutdown';
1219
  endif;
1220
  endif;
1475
  // If this is a FeedWordPress admin page, queue up scripts for AJAX
1476
  // functions that FWP uses. If it is a display page or a non-FWP admin
1477
  // page, don't.
1478
+ wp_register_style('feedwordpress-elements', plugins_url( '/'.$fwp_path.'/feedwordpress-elements.css') );
1479
  if (FeedWordPressSettingsUI::is_admin()) :
1480
  // For JavaScript that needs to be generated dynamically
1481
  add_action('admin_print_scripts', array('FeedWordPressSettingsUI', 'admin_scripts'));
1522
  add_action('wp_ajax_fwp_feedcontents', array($this, 'fwp_feedcontents'));
1523
  add_action('wp_ajax_fwp_xpathtest', array($this, 'fwp_xpathtest'));
1524
 
 
 
1525
  } /* FeedWordPress::init() */
1526
 
1527
+ /**
1528
+ * FeedWordPress::wp_loaded (): Once all plugin and theme modules have been
1529
+ * loaded and initialized (by actions on the init hook, etc.), check the HTTP
1530
+ * request to see if we need to perform any special FeedWordPress-related
1531
+ * actions.
1532
+ *
1533
+ * @since 2016.0614
1534
+ */
1535
+ public function wp_loaded () {
1536
+ $this->clear_cache_magic_url();
1537
+ $this->update_magic_url();
1538
+ } /* FeedWordPress::wp_loaded () */
1539
+
1540
  public function fwp_feeds () {
1541
  $feeds = array();
1542
  $feed_ids = $this->feeds;
1790
 
1791
  } /* FeedWordPress::user_can_richedit () */
1792
 
1793
+ public function clear_cache_magic_url () {
1794
+ if ($this->clear_cache_requested()) :
1795
+ $this->clear_cache();
1796
+ endif;
1797
+ } /* FeedWordPress::clear_cache_magic_url() */
1798
+
1799
+ public function clear_cache_requested () {
1800
+ return MyPHP::request('clear_cache');
1801
+ } /* FeedWordPress::clear_cache_requested() */
1802
+
1803
  public function update_magic_url () {
1804
  global $wpdb;
1805
 
1806
  // Explicit update request in the HTTP request (e.g. from a cron job)
1807
  if ($this->update_requested()) :
1808
+
1809
  $this->update_hooked = "Initiating a CRON JOB CHECK-IN ON UPDATE SCHEDULE due to URL parameter = ".trim($this->val($_REQUEST['update_feedwordpress']));
1810
 
1811
  $this->update($this->update_requested_url());
1835
  // when successful.
1836
  exit;
1837
  endif;
1838
+ } /* FeedWordPress::update_magic_url () */
 
 
 
 
 
 
 
 
 
 
1839
 
1840
  public function update_requested () {
1841
  return MyPHP::request('update_feedwordpress');
1842
  } /* FeedWordPress::update_requested() */
1843
+
1844
  public function update_requested_url () {
1845
  $ret = null;
1846
 
1847
  if (($_REQUEST['update_feedwordpress']=='*')
1848
+ or (preg_match('|^[a-z]+://.*|i', $_REQUEST['update_feedwordpress']))) :
1849
  $ret = $_REQUEST['update_feedwordpress'];
1850
  endif;
1851
 
feedwordpress_file.class.php CHANGED
@@ -4,7 +4,7 @@ global $fwp_credentials;
4
  $fwp_credentials = NULL;
5
 
6
  class FeedWordPress_File extends WP_SimplePie_File {
7
- function FeedWordPress_File ($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
8
  global $feedwordpress;
9
  global $wp_version;
10
 
4
  $fwp_credentials = NULL;
5
 
6
  class FeedWordPress_File extends WP_SimplePie_File {
7
+ public function __construct ($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
8
  global $feedwordpress;
9
  global $wp_version;
10
 
feedwordpresshttpauthenticator.class.php CHANGED
@@ -9,7 +9,7 @@ class FeedWordPressHTTPAuthenticator {
9
  endforeach;
10
 
11
  add_filter('pre_http_request', array($this, 'pre_http_request'), 10, 3);
12
- add_action('http_api_curl', array($this, 'set_auth_options'), 1000, 1);
13
  } /* FeedWordPressHTTPAuthenticator::__construct () */
14
 
15
  function methods_available () {
@@ -150,7 +150,7 @@ class FeedWordPressHTTPAuthenticator {
150
  return $use;
151
  } /* FeedWordPressHTTPAuthenticator::if_curl () */
152
 
153
- function set_auth_options (&$handle) {
154
  if ('digest'==$this->args['authentication']) :
155
  curl_setopt($handle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
156
  endif;
9
  endforeach;
10
 
11
  add_filter('pre_http_request', array($this, 'pre_http_request'), 10, 3);
12
+ add_action('http_api_curl', array($this, 'set_auth_options'), 1000, 3);
13
  } /* FeedWordPressHTTPAuthenticator::__construct () */
14
 
15
  function methods_available () {
150
  return $use;
151
  } /* FeedWordPressHTTPAuthenticator::if_curl () */
152
 
153
+ function set_auth_options ($handle, $r, $url) {
154
  if ('digest'==$this->args['authentication']) :
155
  curl_setopt($handle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
156
  endif;
feedwordpressrpc.class.php CHANGED
@@ -4,7 +4,7 @@
4
  ################################################################################
5
 
6
  class FeedWordPressRPC {
7
- function FeedWordPressRPC () {
8
  add_filter('xmlrpc_methods', array($this, 'xmlrpc_methods'));
9
  }
10
 
4
  ################################################################################
5
 
6
  class FeedWordPressRPC {
7
+ public function __construct () {
8
  add_filter('xmlrpc_methods', array($this, 'xmlrpc_methods'));
9
  }
10
 
feedwordpresssyndicationpage.class.php CHANGED
@@ -16,8 +16,8 @@ define('FWP_CANCEL_BUTTON', '× Cancel');
16
  define('FWP_CHECK_FOR_UPDATES', 'Update');
17
 
18
  class FeedWordPressSyndicationPage extends FeedWordPressAdminPage {
19
- function FeedWordPressSyndicationPage ($filename = NULL) {
20
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpresssyndication', /*link=*/ NULL);
21
 
22
  // No over-arching form element
23
  $this->dispatch = NULL;
@@ -477,7 +477,7 @@ class FeedWordPressSyndicationPage extends FeedWordPressAdminPage {
477
 
478
  // Hey ho, let's go...
479
  ?>
480
- <div style="float: left; background: #F5F5F5; padding-top: 5px; padding-right: 5px;"><a href="<?php print $this->form_action(); ?>"><img src="<?php print esc_html(WP_PLUGIN_URL."/${fwp_path}/feedwordpress.png"); ?>" alt="" /></a></div>
481
 
482
  <p class="info" style="margin-bottom: 0px; border-bottom: 1px dotted black;">Managed by <a href="http://feedwordpress.radgeek.com/">FeedWordPress</a>
483
  <?php print FEEDWORDPRESS_VERSION; ?>.</p>
@@ -536,7 +536,7 @@ class FeedWordPressSyndicationPage extends FeedWordPressAdminPage {
536
 
537
  <?php FeedWordPressSettingsUI::magic_input_tip_js('add-uri'); ?>
538
  <input type="hidden" name="action" value="<?php print FWP_SYNDICATE_NEW; ?>" />
539
- <input style="vertical-align: middle;" type="image" src="<?php print WP_PLUGIN_URL.'/'.$fwp_path; ?>/plus.png" alt="<?php print FWP_SYNDICATE_NEW; ?>" /></div>
540
  </form>
541
  </div> <!-- id="add-single-uri" -->
542
 
@@ -602,9 +602,9 @@ class FeedWordPressSyndicationPage extends FeedWordPressAdminPage {
602
 
603
  <input type="hidden" name="action" value="feedfinder" />
604
  <input type="submit" class="button-secondary" name="action" value="<?php print FWP_SYNDICATE_NEW; ?>" />
605
- <div style="text-align: right; margin-right: 2.0em"><a id="turn-on-multiple-sources" href="#add-multiple-uri"><img style="vertical-align: middle" src="<?php print WP_PLUGIN_URL.'/'.$fwp_path; ?>/down.png" alt="" /> add multiple</a>
606
  <span class="screen-reader-text"> or </span>
607
- <a id="turn-on-opml-upload" href="#upload-opml"><img src="<?php print WP_PLUGIN_URL.'/'.$fwp_path; ?>/plus.png" alt="" style="vertical-align: middle" /> import source list</a></div>
608
  </li>
609
  </ul>
610
  </form>
@@ -730,12 +730,12 @@ support, and documentation.</p>
730
  </div> <!-- style="display: inline-block" -->
731
 
732
  <div class="hovered-component" style="display: inline-block; vertical-align: bottom">
733
- <a href="bitcoin:<?php print esc_attr(FEEDWORDPRESS_BLEG_BTC); ?>"><img src="<?php print esc_url(WP_PLUGIN_URL.'/'.FeedWordPress::path('btc-qr-64px.png')); ?>" alt="Donate" /></a>
734
  <div><a href="bitcoin:<?php print esc_attr(FEEDWORDPRESS_BLEG_BTC); ?>">via bitcoin<span class="hover-on pop-over" style="background-color: #ddffdd; padding: 5px; color: black; border-radius: 5px;">bitcoin:<?php print esc_html(FEEDWORDPRESS_BLEG_BTC); ?></span></a></div>
735
  </div>
736
 
737
  <div style="display: inline-block; vertical-align: bottom">
738
- <input type="image" name="submit" src="<?php print esc_url(WP_PLUGIN_URL.'/'.FeedWordPress::path('paypal-donation-64px.png')); ?>" alt="Donate through PayPal" />
739
  <input type="hidden" name="business" value="distro.to.feedback@radgeek.com" />
740
  <input type="hidden" name="cmd" value="_xclick" />
741
  <input type="hidden" name="item_name" value="FeedWordPress donation" />
16
  define('FWP_CHECK_FOR_UPDATES', 'Update');
17
 
18
  class FeedWordPressSyndicationPage extends FeedWordPressAdminPage {
19
+ public function __construct ($filename = NULL) {
20
+ parent::__construct('feedwordpresssyndication', /*link=*/ NULL);
21
 
22
  // No over-arching form element
23
  $this->dispatch = NULL;
477
 
478
  // Hey ho, let's go...
479
  ?>
480
+ <div style="float: left; background: #F5F5F5; padding-top: 5px; padding-right: 5px;"><a href="<?php print $this->form_action(); ?>"><img src="<?php print esc_html(plugins_url( "/${fwp_path}/feedwordpress.png") ); ?>" alt="" /></a></div>
481
 
482
  <p class="info" style="margin-bottom: 0px; border-bottom: 1px dotted black;">Managed by <a href="http://feedwordpress.radgeek.com/">FeedWordPress</a>
483
  <?php print FEEDWORDPRESS_VERSION; ?>.</p>
536
 
537
  <?php FeedWordPressSettingsUI::magic_input_tip_js('add-uri'); ?>
538
  <input type="hidden" name="action" value="<?php print FWP_SYNDICATE_NEW; ?>" />
539
+ <input style="vertical-align: middle;" type="image" src="<?php print plugins_url('/'.$fwp_path .'/plus.png' ); ?>" alt="<?php print FWP_SYNDICATE_NEW; ?>" /></div>
540
  </form>
541
  </div> <!-- id="add-single-uri" -->
542
 
602
 
603
  <input type="hidden" name="action" value="feedfinder" />
604
  <input type="submit" class="button-secondary" name="action" value="<?php print FWP_SYNDICATE_NEW; ?>" />
605
+ <div style="text-align: right; margin-right: 2.0em"><a id="turn-on-multiple-sources" href="#add-multiple-uri"><img style="vertical-align: middle" src="<?php print plugins_url('/' . $fwp_path . '/down.png'); ?>" alt="" /> add multiple</a>
606
  <span class="screen-reader-text"> or </span>
607
+ <a id="turn-on-opml-upload" href="#upload-opml"><img src="<?php print plugins_url('/' . $fwp_path . '/plus.png'); ?>" alt="" style="vertical-align: middle" /> import source list</a></div>
608
  </li>
609
  </ul>
610
  </form>
730
  </div> <!-- style="display: inline-block" -->
731
 
732
  <div class="hovered-component" style="display: inline-block; vertical-align: bottom">
733
+ <a href="bitcoin:<?php print esc_attr(FEEDWORDPRESS_BLEG_BTC); ?>"><img src="<?php print esc_url( plugins_url('/'.FeedWordPress::path('btc-qr-64px.png') ) ); ?>" alt="Donate" /></a>
734
  <div><a href="bitcoin:<?php print esc_attr(FEEDWORDPRESS_BLEG_BTC); ?>">via bitcoin<span class="hover-on pop-over" style="background-color: #ddffdd; padding: 5px; color: black; border-radius: 5px;">bitcoin:<?php print esc_html(FEEDWORDPRESS_BLEG_BTC); ?></span></a></div>
735
  </div>
736
 
737
  <div style="display: inline-block; vertical-align: bottom">
738
+ <input type="image" name="submit" src="<?php print esc_url(plugins_url('/' . FeedWordPress::path('paypal-donation-64px.png' ) ) ); ?>" alt="Donate through PayPal" />
739
  <input type="hidden" name="business" value="distro.to.feedback@radgeek.com" />
740
  <input type="hidden" name="cmd" value="_xclick" />
741
  <input type="hidden" name="item_name" value="FeedWordPress donation" />
inspectpostmeta.class.php CHANGED
@@ -8,9 +8,9 @@
8
  */
9
 
10
  class InspectPostMeta {
11
- function InspectPostMeta ($in_hook = true) {
12
  add_action('add_meta_boxes', array($this, 'add_meta_boxes'), 10, 2);
13
- }
14
 
15
  function add_meta_boxes ($post_type, $post) {
16
  add_meta_box(
8
  */
9
 
10
  class InspectPostMeta {
11
+ public function __construct ($in_hook = true) {
12
  add_action('add_meta_boxes', array($this, 'add_meta_boxes'), 10, 2);
13
+ } /* InspectPostMeta::__construct () */
14
 
15
  function add_meta_boxes ($post_type, $post) {
16
  add_meta_box(
magpiefromsimplepie.class.php CHANGED
@@ -66,7 +66,7 @@ class MagpieFromSimplePie {
66
  * @uses MagpieFromSimplePie::normalize
67
  * @uses MagpieFromSimplePie::is_atom
68
  */
69
- function MagpieFromSimplePie ($pie, $item = true) {
70
  $this->pie = $pie;
71
 
72
  // item in {NULL, true} = process channel data
@@ -95,6 +95,10 @@ class MagpieFromSimplePie {
95
  $this->feed_version = $this->feed_version();
96
  $this->encoding = $pie->get_encoding();
97
  } /* MagpieFromSimplePie constructor */
 
 
 
 
98
 
99
  /**
100
  * MagpieFromSimplePie::get_items: returns an array of MagpieRSS format arrays
66
  * @uses MagpieFromSimplePie::normalize
67
  * @uses MagpieFromSimplePie::is_atom
68
  */
69
+ function __construct( $pie, $item = true ) {
70
  $this->pie = $pie;
71
 
72
  // item in {NULL, true} = process channel data
95
  $this->feed_version = $this->feed_version();
96
  $this->encoding = $pie->get_encoding();
97
  } /* MagpieFromSimplePie constructor */
98
+
99
+ function MagpieFromSimplePie( $pie, $item = true ) {
100
+ self::__construct( $pie, $item );
101
+ }
102
 
103
  /**
104
  * MagpieFromSimplePie::get_items: returns an array of MagpieRSS format arrays
magpiemocklink.class.php CHANGED
@@ -4,7 +4,7 @@ require_once(dirname(__FILE__) . '/syndicatedlink.class.php');
4
  class MagpieMockLink extends SyndicatedLink {
5
  var $url;
6
 
7
- function MagpieMockLink ($rss, $url) {
8
  $this->link = $rss;
9
 
10
  if (is_array($rss) and isset($rss['simplepie']) and isset($rss['magpie'])) :
@@ -22,6 +22,10 @@ class MagpieMockLink extends SyndicatedLink {
22
  );
23
  } /* function MagpieMockLink::MagpieMockLink () */
24
 
 
 
 
 
25
  function poll ($crash_ts = NULL) {
26
  // Do nothing but update copy of feed
27
  $this->simplepie = FeedWordPress::fetch($this->url);
4
  class MagpieMockLink extends SyndicatedLink {
5
  var $url;
6
 
7
+ function __construct( $rss, $url ) {
8
  $this->link = $rss;
9
 
10
  if (is_array($rss) and isset($rss['simplepie']) and isset($rss['magpie'])) :
22
  );
23
  } /* function MagpieMockLink::MagpieMockLink () */
24
 
25
+ function MagpieMockLink( $rss, $url ) {
26
+ self::__construct( $rss, $url );
27
+ }
28
+
29
  function poll ($crash_ts = NULL) {
30
  // Do nothing but update copy of feed
31
  $this->simplepie = FeedWordPress::fetch($this->url);
performance-page.php CHANGED
@@ -2,14 +2,14 @@
2
  require_once(dirname(__FILE__) . '/admin-ui.php');
3
 
4
  class FeedWordPressPerformancePage extends FeedWordPressAdminPage {
5
- function FeedWordPressPerformancePage () {
6
  // Set meta-box context name
7
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpressperformancepage');
8
  $this->dispatch = 'feedwordpress_performance';
9
  $this->filename = __FILE__;
10
  }
11
 
12
- function has_link () { return false; }
13
 
14
  function display () {
15
  global $wpdb, $wp_db_version, $fwp_path;
2
  require_once(dirname(__FILE__) . '/admin-ui.php');
3
 
4
  class FeedWordPressPerformancePage extends FeedWordPressAdminPage {
5
+ public function __construct() {
6
  // Set meta-box context name
7
+ parent::__construct('feedwordpressperformancepage');
8
  $this->dispatch = 'feedwordpress_performance';
9
  $this->filename = __FILE__;
10
  }
11
 
12
+ public function has_link () { return false; }
13
 
14
  function display () {
15
  global $wpdb, $wp_db_version, $fwp_path;
posts-page.php CHANGED
@@ -11,12 +11,12 @@ class FeedWordPressPostsPage extends FeedWordPressAdminPage {
11
  *
12
  * @param mixed $link An object of class {@link SyndicatedLink} if created for one feed's settings, NULL if created for global default settings
13
  */
14
- function FeedWordPressPostsPage ($link = -1) {
15
  if (is_numeric($link) and -1 == $link) :
16
- $link = FeedWordPressAdminPage::submitted_link();
17
  endif;
18
 
19
- FeedWordPressAdminPage::FeedWordPressAdminPage('feedwordpresspostspage', $link);
20
  $this->dispatch = 'feedwordpress_admin_page_posts';
21
  $this->filename = __FILE__;
22
  $this->updatedPosts = new UpdatedPostsControl($this);
11
  *
12
  * @param mixed $link An object of class {@link SyndicatedLink} if created for one feed's settings, NULL if created for global default settings
13
  */
14
+ public function __construct( $link = -1 ) {
15
  if (is_numeric($link) and -1 == $link) :
16
+ $link = parent::submitted_link();
17
  endif;
18
 
19
+ parent::__construct('feedwordpresspostspage', $link);
20
  $this->dispatch = 'feedwordpress_admin_page_posts';
21
  $this->filename = __FILE__;
22
  $this->updatedPosts = new UpdatedPostsControl($this);
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Charles Johnson
3
  Donate link: http://feedwordpress.radgeek.com/
4
  Tags: syndication, aggregation, feed, atom, rss
5
  Requires at least: 3.0
6
- Tested up to: 4.5.2
7
- Stable tag: 2016.0420
8
 
9
  FeedWordPress syndicates content from feeds you choose into your WordPress weblog.
10
 
@@ -23,7 +23,6 @@ developed, originally, because I needed a more flexible replacement for
23
  [Planet][] to use at Feminist Blogs, an aggregator site that I used to administer.
24
 
25
  [Planet]: http://www.planetplanet.org/
26
- [Feminist Blogs]: http://feministblogs.org/
27
 
28
  FeedWordPress is designed with flexibility, ease of use, and ease of
29
  configuration in mind. You'll need a working installation of WordPress (version
@@ -94,6 +93,33 @@ outs, see the documentation at the [FeedWordPress project homepage][].
94
 
95
  == Changelog ==
96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  = 2016.0420 =
98
 
99
  * WORDPRESS COMPATIBILITY: Tested with new versions of WordPress up to 4.5.
3
  Donate link: http://feedwordpress.radgeek.com/
4
  Tags: syndication, aggregation, feed, atom, rss
5
  Requires at least: 3.0
6
+ Tested up to: 4.7
7
+ Stable tag: 2016.1211
8
 
9
  FeedWordPress syndicates content from feeds you choose into your WordPress weblog.
10
 
23
  [Planet][] to use at Feminist Blogs, an aggregator site that I used to administer.
24
 
25
  [Planet]: http://www.planetplanet.org/
 
26
 
27
  FeedWordPress is designed with flexibility, ease of use, and ease of
28
  configuration in mind. You'll need a working installation of WordPress (version
93
 
94
  == Changelog ==
95
 
96
+ = 2016.1211 =
97
+
98
+ * WORDPRESS COMPATIBILITY: Tested with new versions of WordPress up to 4.7.
99
+
100
+ * PHP WARNINGS UNDER WP 4.7: Eliminated cause of a PHP warning under WP 4.7
101
+ "Parameter 1 to FeedWordPressHTTPAuthenticator::set_auth_options expected to be reference"
102
+ Warnings were due to a change in how http_api_curl hook is sometimes called
103
+ in WP 4.7; so I changed the signature of the event handling method to avoid
104
+ the notice. Props to @cogdog, @froomkin, @gwynethllewelyn et al. for flagging
105
+ the issue and @garymarkfuller for suggesting a preliminary fix to the issue
106
+ that was fairly similar to the solution I ended up adopting.
107
+
108
+ * PHP 7 and PHP Strict Standards compatibility changes: @alexiskulash @daidais
109
+ and @zoul0813 all sent pull requests through Github to fix some issues from
110
+ a very old code base that has made its way from PHP 3.x through 5.x to the
111
+ roll-out of PHP 7. Class methods should now fare better under modern versions
112
+ of PHP and generate fewer "Deprecated" notices.
113
+
114
+ * IMPROVEMENTS TO SCHEDULED AND AUTOMATIC UPDATES: use wp_loaded hook to check
115
+ for magic URL parameters and to execute updates, to do pageload-based automatic
116
+ updates, etc. Ensures that anything plugins or themes need to do in init to set
117
+ up custom post types, taxonomies, etc. will be done before the update_feedwordpress
118
+ updates are attempted. If you saw posts not getting put into the correct custom
119
+ post type or custom taxonomies or similar problems when performing scheduled updates,
120
+ but the problem seemed to go away when you manually performed updates through the
121
+ wp-admin interface, then you might be able to solve those problems with this update.
122
+
123
  = 2016.0420 =
124
 
125
  * WORDPRESS COMPATIBILITY: Tested with new versions of WordPress up to 4.5.
syndicatedlink.class.php CHANGED
@@ -43,7 +43,7 @@ class SyndicatedLink {
43
  public $simplepie = null;
44
  var $magpie = null;
45
 
46
- function SyndicatedLink ($link) {
47
  global $wpdb;
48
 
49
  if (is_object($link)) :
@@ -61,6 +61,10 @@ class SyndicatedLink {
61
  add_filter('feedwordpress_update_complete', array($this, 'process_retirements'), 1000, 1);
62
  } /* SyndicatedLink::SyndicatedLink () */
63
 
 
 
 
 
64
  function found () {
65
  return is_object($this->link) and !is_wp_error($this->link);
66
  } /* SyndicatedLink::found () */
43
  public $simplepie = null;
44
  var $magpie = null;
45
 
46
+ function __construct( $link ) {
47
  global $wpdb;
48
 
49
  if (is_object($link)) :
61
  add_filter('feedwordpress_update_complete', array($this, 'process_retirements'), 1000, 1);
62
  } /* SyndicatedLink::SyndicatedLink () */
63
 
64
+ function SyndicatedLink( $link ) {
65
+ self::__construct( $link );
66
+ }
67
+
68
  function found () {
69
  return is_object($this->link) and !is_wp_error($this->link);
70
  } /* SyndicatedLink::found () */
syndicatedpost.class.php CHANGED
@@ -2240,6 +2240,10 @@ EOM;
2240
  // Add a random disambiguator
2241
  $userdata['user_login'] .= substr(md5(uniqid(microtime())), 0, 6);
2242
  break;
 
 
 
 
2243
  case 'existing_user_email' :
2244
  // No disassemble!
2245
  $parts = explode('@', $userdata['user_email'], 2);
2240
  // Add a random disambiguator
2241
  $userdata['user_login'] .= substr(md5(uniqid(microtime())), 0, 6);
2242
  break;
2243
+ case 'user_nicename_too_long' :
2244
+ // Add a limited 50 caracters user_nicename based on user_login
2245
+ $userdata['user_nicename'] = mb_substr( $userdata['user_login'], 0, 50 );
2246
+ break;
2247
  case 'existing_user_email' :
2248
  // No disassemble!
2249
  $parts = explode('@', $userdata['user_email'], 2);
syndicationdataqueries.class.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  class SyndicationDataQueries {
4
- function SyndicationDataQueries () {
5
  add_action('init', array($this, 'init'));
6
  add_action('parse_query', array($this, 'parse_query'), 10, 1);
7
  add_filter('posts_search', array($this, 'posts_search'), 10, 2);
1
  <?php
2
 
3
  class SyndicationDataQueries {
4
+ public function __construct () {
5
  add_action('init', array($this, 'init'));
6
  add_action('parse_query', array($this, 'parse_query'), 10, 1);
7
  add_filter('posts_search', array($this, 'posts_search'), 10, 2);
updatedpostscontrol.class.php CHANGED
@@ -1,10 +1,14 @@
1
  <?php
2
  class UpdatedPostsControl {
3
  var $page;
4
- function UpdatedPostsControl (&$page) {
5
  $this->page =& $page;
6
  } /* UpdatedPostsControl constructor */
7
 
 
 
 
 
8
  function display () {
9
  $settings = array(
10
  // This is all bass-ackwards because the actual yes/no
1
  <?php
2
  class UpdatedPostsControl {
3
  var $page;
4
+ function __construct( &$page ) {
5
  $this->page =& $page;
6
  } /* UpdatedPostsControl constructor */
7
 
8
+ function UpdatedPostsControl( &$page ) {
9
+ self::__construct( $page );
10
+ }
11
+
12
  function display () {
13
  $settings = array(
14
  // This is all bass-ackwards because the actual yes/no