mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
Use get_post_types() to create list of hierarchical post types. fixes #14079 for 3.1
git-svn-id: https://develop.svn.wordpress.org/trunk@15348 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d9eb60c0a0
commit
44a502207a
@ -2531,7 +2531,7 @@ function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p
|
||||
if ( ! is_array( $feeds ) )
|
||||
$feeds = array();
|
||||
|
||||
$hierarchical_post_types = apply_filters( 'hierarchical_post_types', array( 'page' ) );
|
||||
$hierarchical_post_types = get_post_types( array('hierarchical' => true) );
|
||||
if ( 'attachment' == $post_type ) {
|
||||
// Attachment slugs must be unique across all types.
|
||||
$check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND ID != %d LIMIT 1";
|
||||
|
Loading…
x
Reference in New Issue
Block a user