Plugin Directory

Changeset 424119


Ignore:
Timestamp:
08/16/2011 09:10:09 AM (15 years ago)
Author:
michaeltyson
Message:

Fixed issue where changes to trailing "/" aren't saved

Location:
custom-permalinks/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • custom-permalinks/trunk/custom-permalinks.php

    r422892 r424119  
    55Donate link: http://atastypixel.com/blog/wordpress/plugins/custom-permalinks/
    66Description: Set custom permalinks on a per-post basis
    7 Version: 0.7.4
     7Version: 0.7.5
    88Author: Michael Tyson
    99Author URI: http://atastypixel.com/blog
     
    428428   
    429429    delete_post_meta( $id, 'custom_permalink' );
    430     if ( $_REQUEST['custom_permalink'] && $_REQUEST['custom_permalink'] != custom_permalinks_original_post_link($id) ) {
    431         if ( dirname($_REQUEST['custom_permalink']) == dirname(custom_permalinks_original_post_link($id)) ) {
     430   
     431    $original_link = custom_permalinks_original_post_link($id);
     432   
     433    if ( $_REQUEST['custom_permalink'] && $_REQUEST['custom_permalink'] != $original_link ) {
     434        if ( dirname($_REQUEST['custom_permalink']) == dirname($original_link) &&
     435             ($_REQUEST['custom_permalink']{strlen($_REQUEST['custom_permalink'])-1} == "/") == ($original_link{strlen($original_link)-1} == "/") ) {
    432436            // Just slug changed
    433437            $post = wp_get_single_post($id, ARRAY_A);
  • custom-permalinks/trunk/readme.txt

    r423211 r424119  
    55Requires at least: 2.6
    66Tested up to: 3.2.1
    7 Stable tag: 0.7.4
     7Stable tag: 0.7.5
    88
    99Set custom permalinks on a per-post, per-tag or per-category basis.
     
    2323
    2424== Changelog ==
     25
     26= 0.7.5 =
     27
     28 * Fixed issue where changes to trailing "/" aren't saved
    2529
    2630= 0.7.4 =
Note: See TracChangeset for help on using the changeset viewer.