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

git-svn-id: http://core.svn.wordpress.org/trunk@21177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-06-29 13:57:02 +00:00
parent 0d124a2286
commit c00968bee0

View File

@ -2837,6 +2837,8 @@ function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p
global $wpdb, $wp_rewrite;
$original_slug = $slug;
$feeds = $wp_rewrite->feeds;
if ( ! is_array( $feeds ) )
$feeds = array();
@ -2887,7 +2889,7 @@ function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p
}
}
return apply_filters( 'wp_unique_post_slug', $slug, $post_ID, $post_status, $post_type, $post_parent );
return apply_filters( 'wp_unique_post_slug', $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug );
}
/**