Make WordPress Core


Ignore:
Timestamp:
06/29/2012 01:57:02 PM (12 years ago)
Author:
nacin
Message:

Take the original slug passed into wp_unique_post_slug() and pass it to the wp_unique_post_slug filter. props johnbillion. fixes #20480.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r20779 r21177  
    28382838    global $wpdb, $wp_rewrite;
    28392839
     2840    $original_slug = $slug;
     2841
    28402842    $feeds = $wp_rewrite->feeds;
    28412843    if ( ! is_array( $feeds ) )
     
    28882890    }
    28892891
    2890     return apply_filters( 'wp_unique_post_slug', $slug, $post_ID, $post_status, $post_type, $post_parent );
     2892    return apply_filters( 'wp_unique_post_slug', $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug );
    28912893}
    28922894
Note: See TracChangeset for help on using the changeset viewer.