WordPress.org

Plugin Directory

Changeset 631288 for feedwordpress


Ignore:
Timestamp:
11/28/12 14:50:24 (17 months ago)
Author:
radgeek
Message:

Bugfix: don't overwrite a slug if the user has manually edited it from within WordPress. Props Chris Fritz.

Location:
feedwordpress/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • feedwordpress/trunk/feedwordpress.php

    r583851 r631288  
    44Plugin URI: http://feedwordpress.radgeek.com/ 
    55Description: simple and flexible Atom/RSS syndication for WordPress 
    6 Version: 2012.0810 
     6Version: 2012.1128 
    77Author: Charles Johnson 
    88Author URI: http://radgeek.com/ 
     
    1212/** 
    1313 * @package FeedWordPress 
    14  * @version 2012.0810 
     14 * @version 2012.1128 
    1515 */ 
    1616 
     
    3535# -- Don't change these unless you know what you're doing... 
    3636 
    37 define ('FEEDWORDPRESS_VERSION', '2012.0810'); 
     37define ('FEEDWORDPRESS_VERSION', '2012.1128'); 
    3838define ('FEEDWORDPRESS_AUTHOR_CONTACT', 'http://radgeek.com/contact'); 
    3939 
  • feedwordpress/trunk/readme.txt

    r548650 r631288  
    44Tags: syndication, aggregation, feed, atom, rss 
    55Requires at least: 3.0 
    6 Tested up to: 3.3.2 
     6Tested up to: 3.4.2 
    77Stable tag: 2011.1019 
    88 
     
    9797= Trunk = 
    9898 
    99 *   USER-AGENT STRING: FeedWordPress now sends a distinctive User-Agent string 
    100     identifying itself, and noting that it is a feed aggregator. 
     99*   BUGFIX: MANUALLY EDITED POST SLUGS NOT OVERWRITTEN. Thanks to a report 
     100    by Chris Fritz, I've identified some code that causes post slugs for the 
     101    posts generated by FWP to be rewritten with every update, even if the 
     102    user has manually updated the slug from within the WordPress editing 
     103    interface. This has been fixed: FWP will continue to generate new slugs 
     104    for syndicated posts, but when syndicated posts are updated, they will 
     105    retain the slug that they had at the time of the update; any manual 
     106    changes to the post slug should be preserved. 
     107     
     108*   USER-AGENT STRING: FeedWordPress now sends a distinctive User-Agent 
     109    string identifying itself, and noting that it is a feed aggregator. 
    101110 
    102111= 2011.1019 = 
  • feedwordpress/trunk/syndicatedpost.class.php

    r583851 r631288  
    3131    var $_freshness = null; 
    3232    var $_wp_id = null; 
     33    var $_wp_post = null; 
    3334 
    3435    /** 
     
    13441345                    $this->_freshness = 1; // Updated content 
    13451346                    $this->_wp_id = $old_post->ID; 
    1346                      
     1347                    $this->_wp_post = $old_post; 
     1348 
    13471349                    // We want this to keep a running list of all the 
    13481350                    // processed update hashes. 
     
    14741476            // Filter some individual fields 
    14751477             
     1478            // If there already is a post slug (from syndication or by manual 
     1479            // editing) don't cause WP to overwrite it by sending in a NULL 
     1480            // post_name. Props Chris Fritz 2012-11-28. 
     1481            $post_name = (is_null($this->_wp_post) ? NULL : $this->_wp_post->post_name);             
     1482 
    14761483            // Allow filters to set post slug. Props niska. 
    1477             $post_name = apply_filters('syndicated_post_slug', NULL, $this); 
     1484            $post_name = apply_filters('syndicated_post_slug', $post_name, $this); 
    14781485            if (!empty($post_name)) : 
    14791486                $this->post['post_name'] = $post_name; 
  • feedwordpress/trunk/syndicationdataqueries.class.php

    r583851 r631288  
    122122            switch ($f) : 
    123123            case '_synfresh' : 
    124                 $fields = "{$wpdb->posts}.ID, {$wpdb->posts}.guid, {$wpdb->posts}.post_modified_gmt"; 
     124                $fields = "{$wpdb->posts}.ID, {$wpdb->posts}.guid, {$wpdb->posts}.post_modified_gmt, {$wpdb->posts}.post_name"; 
    125125                break; 
    126126            case '_synfrom' : 
Note: See TracChangeset for help on using the changeset viewer.