function __construct($site_ID)
 {
     switch (SIMPLEPIE_VERSION) {
         case '1.2.1':
             parent::SimplePie();
             break;
         case '1.3':
             parent::__construct();
             break;
         default:
             parent::__construct();
             break;
     }
     parent::__construct();
     $this->set_feed_url(get_post_meta($site_ID, 'syn_feed_url', true));
     $this->default_post_type = get_post_meta($site_ID, 'syn_default_post_type', true);
     $this->default_post_status = get_post_meta($site_ID, 'syn_default_post_status', true);
     $this->default_comment_status = get_post_meta($site_ID, 'syn_default_comment_status', true);
     $this->default_ping_status = get_post_meta($site_ID, 'syn_default_ping_status', true);
     $this->default_cat_status = get_post_meta($site_ID, 'syn_default_cat_status', true);
     add_action('syn_post_pull_new_post', array(__CLASS__, 'save_meta'), 10, 5);
     add_action('syn_post_pull_new_post', array(__CLASS__, 'save_tax'), 10, 5);
     add_action('syn_post_pull_edit_post', array(__CLASS__, 'update_meta'), 10, 5);
     add_action('syn_post_pull_edit_post', array(__CLASS__, 'update_tax'), 10, 5);
 }
コード例 #2
0
 function rex_rssReader($feed_url = null, $cache_location = null, $cache_duration = null)
 {
     global $REX;
     if ($cache_location == null) {
         $cache_location = $REX['INCLUDE_PATH'] . '/generated/files/';
     }
     parent::SimplePie($feed_url, $cache_location, $cache_duration);
 }