WordPress.org

Plugin Directory


Ignore:
Timestamp:
12/11/16 13:31:11 (12 months ago)
Author:
radgeek
Message:

Release 2016.1211. Mostly compatibility fixes, one bugfix thing. WP 4.7 compatibility.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • feedwordpress/trunk/feedwordpress.php

    r1413324 r1551908  
    44Plugin URI: http://feedwordpress.radgeek.com/ 
    55Description: simple and flexible Atom/RSS syndication for WordPress 
    6 Version: 2016.0420 
     6Version: 2016.1211 
    77Author: Charles Johnson 
    88Author URI: http://radgeek.com/ 
     
    1212/** 
    1313 * @package FeedWordPress 
    14  * @version 2016.0420 
     14 * @version 2016.1211 
    1515 */ 
    1616 
     
    3333# -- Don't change these unless you know what you're doing... 
    3434 
    35 define ('FEEDWORDPRESS_VERSION', '2016.0420'); 
     35define ('FEEDWORDPRESS_VERSION', '2016.1211'); 
    3636define ('FEEDWORDPRESS_AUTHOR_CONTACT', 'http://radgeek.com/contact'); 
    3737 
     
    9797    require_once(ABSPATH . WPINC . '/class-simplepie.php'); 
    9898endif; 
    99 require_once(ABSPATH . WPINC . '/class-feed.php'); 
     99 
     100require_once( ABSPATH . WPINC . '/class-wp-feed-cache.php' ); 
     101require_once( ABSPATH . WPINC . '/class-wp-feed-cache-transient.php' ); 
     102require_once( ABSPATH . WPINC . '/class-wp-simplepie-file.php' ); 
     103require_once( ABSPATH . WPINC . '/class-wp-simplepie-sanitize-kses.php' ); 
    100104 
    101105if (!function_exists('wp_insert_user')) : 
     
    217221 
    218222    add_action('init', array($feedwordpress, 'init')); 
     223    add_action('wp_loaded', array($feedwordpress, 'wp_loaded')); 
     224 
    219225    add_action('shutdown', array($feedwordpress, 'email_diagnostic_log')); 
    220226    add_action('shutdown', array($feedwordpress, 'feedwordpress_cleanup')); 
     
    238244 
    239245class FeedWordPressDiagnostic { 
    240     function feed_error ($error, $old, $link) { 
     246    public static function feed_error ($error, $old, $link) { 
    241247        $wpError = $error['object']; 
    242248        $url = $link->uri(); 
     
    672678        $syndicationMenu, 
    673679        NULL, 
    674         WP_PLUGIN_URL.'/'.FeedWordPress::path('feedwordpress-tiny.png') 
     680        plugins_url( '/'.FeedWordPress::path('feedwordpress-tiny.png') ) 
    675681    ); 
    676682 
     
    12051211 
    12061212        if (!!$hook) : 
    1207             if ($hook != 'init') : // Constrain values. 
     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 : 
    12081218                $hook = 'shutdown'; 
    12091219            endif; 
     
    14661476        // functions that FWP uses. If it is a display page or a non-FWP admin 
    14671477        // page, don't. 
    1468         wp_register_style('feedwordpress-elements', WP_PLUGIN_URL.'/'.$fwp_path.'/feedwordpress-elements.css'); 
     1478        wp_register_style('feedwordpress-elements', plugins_url( '/'.$fwp_path.'/feedwordpress-elements.css') ); 
    14691479        if (FeedWordPressSettingsUI::is_admin()) : 
    14701480            // For JavaScript that needs to be generated dynamically 
     
    15131523        add_action('wp_ajax_fwp_xpathtest', array($this, 'fwp_xpathtest')); 
    15141524 
     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 () { 
    15151536        $this->clear_cache_magic_url(); 
    15161537        $this->update_magic_url(); 
    1517     } /* FeedWordPress::init() */ 
    1518  
     1538    } /* FeedWordPress::wp_loaded () */ 
     1539     
    15191540    public function fwp_feeds () { 
    15201541        $feeds = array(); 
     
    17701791    } /* FeedWordPress::user_can_richedit () */ 
    17711792 
     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 
    17721803    public function update_magic_url () { 
    17731804        global $wpdb; 
     
    17751806        // Explicit update request in the HTTP request (e.g. from a cron job) 
    17761807        if ($this->update_requested()) : 
     1808 
    17771809            $this->update_hooked = "Initiating a CRON JOB CHECK-IN ON UPDATE SCHEDULE due to URL parameter = ".trim($this->val($_REQUEST['update_feedwordpress'])); 
    17781810 
     
    18041836            exit; 
    18051837        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() */ 
     1838    } /* FeedWordPress::update_magic_url () */ 
    18171839 
    18181840    public function update_requested () { 
    18191841        return MyPHP::request('update_feedwordpress'); 
    18201842    } /* FeedWordPress::update_requested() */ 
    1821  
     1843     
    18221844    public function update_requested_url () { 
    18231845        $ret = null; 
    18241846 
    18251847        if (($_REQUEST['update_feedwordpress']=='*') 
    1826         or (preg_match('|^http://.*|i', $_REQUEST['update_feedwordpress']))) : 
     1848        or (preg_match('|^[a-z]+://.*|i', $_REQUEST['update_feedwordpress']))) : 
    18271849            $ret = $_REQUEST['update_feedwordpress']; 
    18281850        endif; 
Note: See TracChangeset for help on using the changeset viewer.