WordPress.org

Plugin Directory

Changeset 608536


Ignore:
Timestamp:
10/05/12 14:24:48 (19 months ago)
Author:
sc0ttkclark
Message:

Fix for reserved post_name values on Pods and Fields

Location:
pods/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pods/trunk/classes/PodsAPI.php

    r608119 r608536  
    16951695        } 
    16961696 
     1697        add_filter( 'wp_unique_post_slug', array( $this, '' ), 100, 6 ); 
     1698 
    16971699        $params->id = $this->save_wp_object( 'post', $post_data, $field[ 'options' ], true, true ); 
    16981700 
     
    17891791 
    17901792        return $params->id; 
     1793    } 
     1794 
     1795    public function save_field_slug_fix ( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug ) { 
     1796        if ( in_array( $post_type, array( '_pods_field', '_pods_pod' ) ) && false !== strpos( $slug, '-' ) ) { 
     1797            $slug = explode( '-', $slug ); 
     1798            $slug = $slug[ 0 ]; 
     1799        } 
     1800 
     1801        return $slug; 
    17911802    } 
    17921803 
  • pods/trunk/readme.txt

    r608507 r608536  
    102102= 2.0.3.1 - October 5th, 2012 = 
    103103* Fixed an upgrade issue a few users were reporting where the upgrade wouldn't start 
     104* Fixed reserved post_name issues with our internal post types for Pods and Fields (rss, date, and any other feeds) 
    104105* Found a bug? Have a great feature idea? Get on GitHub and tell us about it and we'll get right on it: https://github.com/pods-framework/pods/issues/new 
    105106 
Note: See TracChangeset for help on using the changeset viewer.