mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 00:01:27 +01:00
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:
parent
0d124a2286
commit
c00968bee0
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user