WordPress.org

Plugin Directory

Changeset 1740884


Ignore:
Timestamp:
10/04/17 12:02:54 (2 weeks ago)
Author:
radgeek
Message:

2017.1004 / Minor compatibility fixes for PHP 7.1 and multibyte feeds.

Location:
feedwordpress/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • feedwordpress/trunk/feedwordpress.php

    r1729270 r1740884  
    44Plugin URI: http://feedwordpress.radgeek.com/ 
    55Description: simple and flexible Atom/RSS syndication for WordPress 
    6 Version: 2017.0913 
     6Version: 2017.1004 
    77Author: Charles Johnson 
    88Author URI: http://radgeek.com/ 
     
    1212/** 
    1313 * @package FeedWordPress 
    14  * @version 2017.0913 
     14 * @version 2017.1004 
    1515 */ 
    1616 
     
    3333# -- Don't change these unless you know what you're doing... 
    3434 
    35 define ('FEEDWORDPRESS_VERSION', '2017.0913'); 
     35define ('FEEDWORDPRESS_VERSION', '2017.1004'); 
    3636define ('FEEDWORDPRESS_AUTHOR_CONTACT', 'http://radgeek.com/contact'); 
    3737 
     
    635635        $replacement = NULL; 
    636636 
    637         if ($source->setting('munge comments feed links', 'munge_comments_feed_links', 'yes') != 'no') : 
     637        if (is_object($source) && $source->setting('munge comments feed links', 'munge_comments_feed_links', 'yes') != 'no') : 
    638638            $commentFeeds = get_post_custom_values('wfw:commentRSS'); 
    639639            if ( 
  • feedwordpress/trunk/readme.txt

    r1729270 r1740884  
    44Tags: syndication, aggregation, feed, atom, rss 
    55Requires at least: 4.5 
    6 Tested up to: 4.8.1 
    7 Stable tag: 2017.0913 
     6Tested up to: 4.8.2 
     7Stable tag: 2017.1004 
    88 
    99FeedWordPress syndicates content from feeds you choose into your WordPress weblog.  
  • feedwordpress/trunk/syndicatedpost.class.php

    r1729289 r1740884  
    1313 * who make use of feed data in PHP add-ons and filters. 
    1414 * 
    15  * @version 2013.0525 
     15 * @version 2017.1004 
    1616 */ 
    1717class SyndicatedPost { 
     
    130130             
    131131            $excerpt = apply_filters('syndicated_item_excerpt', $this->excerpt(), $this); 
     132 
    132133            if (!empty($excerpt)): 
    133134                $this->post['post_excerpt'] = $excerpt; 
     
    259260            $this->post['post_type'] = apply_filters('syndicated_post_type', $this->link->setting('syndicated post type', 'syndicated_post_type', 'post'), $this); 
    260261        endif; 
    261          
    262262    } /* SyndicatedPost::__construct() */ 
    263263 
     
    414414 
    415415        // Ignore whitespace, case, and tag cruft. 
    416         $theExcerpt = preg_replace('/\s+/', '', strtolower(strip_tags($excerpt))); 
    417         $theContent = preg_replace('/\s+/', '', strtolower(strip_tags($content))); 
    418  
     416        $theExcerpt = preg_replace('/\s+/', '', strtolower(strip_tags(html_entity_decode($excerpt)))); 
     417        $theContent = preg_replace('/\s+/', '', strtolower(strip_tags(html_entity_decode($content)))); 
    419418        if ( empty($excerpt) or $theExcerpt == $theContent ) : 
    420419            # If content is available, generate an excerpt. 
     
    422421                $excerpt = strip_tags($content); 
    423422                if (strlen($excerpt) > 255) : 
    424                     $excerpt = substr($excerpt,0,252).'...'; 
     423                    if (is_object($this->link) and is_object($this->link->simplepie)) : 
     424                        $encoding = $this->link->simplepie->get_encoding(); 
     425                    else : 
     426                        $encoding = get_option('blog_charset', 'utf8'); 
     427                    endif; 
     428                    $excerpt = mb_substr($excerpt,0,252,$encoding).'...'; 
    425429                endif; 
    426430            endif; 
    427431        endif; 
     432 
    428433        return $excerpt; 
    429434    } /* SyndicatedPost::excerpt() */ 
     
    14501455    } 
    14511456 
    1452     function store () { 
     1457    public function store () { 
    14531458        global $wpdb; 
    14541459 
     
    17121717                // Go ahead and insert the first post record to 
    17131718                // anchor the revision history. 
     1719 
    17141720                $this->_wp_id = wp_insert_post($sdbpost, /*return wp_error=*/ true); 
    17151721                 
  • feedwordpress/trunk/syndicationdataqueries.class.php

    r1729289 r1740884  
    1616    } 
    1717 
    18     function parse_query (&$q) { 
     18    function parse_query ($q) { 
    1919        if ($q->get('guid')) : 
    2020            $q->is_single = false;  // Causes nasty side-effects. 
     
    2828    } /* SyndicationDataQueries::parse_query () */ 
    2929 
    30     function pre_get_posts (&$q) { 
     30    function pre_get_posts ($q) { 
    3131        // 
    3232    } 
    3333 
    34     function posts_request ($sql, &$query) { 
     34    function posts_request ($sql, $query) { 
    3535        if ($query->get('fields') == '_synfresh') : 
    3636            FeedWordPress::diagnostic('feed_items:freshness:sql', "SQL: ".$sql); 
     
    3939    } 
    4040 
    41     function posts_search ($search, &$query) { 
     41    function posts_search ($search, $query) { 
    4242        global $wpdb; 
    4343        if ($guid = $query->get('guid')) : 
     
    7878    } /* SyndicationDataQueries::posts_search () */ 
    7979 
    80     function posts_where ($where, &$q) { 
     80    function posts_where ($where, $q) { 
    8181        global $wpdb; 
    8282 
     
    9595    } /* SyndicationDataQueries::post_where () */ 
    9696 
    97     function posts_fields ($fields, &$query) { 
     97    function posts_fields ($fields, $query) { 
    9898        global $wpdb; 
    9999        if ($f = $query->get('fields')) : 
Note: See TracChangeset for help on using the changeset viewer.