Use get_post_types() to create list of hierarchical post types. fixes #14079 for 3.0.1

git-svn-id: http://svn.automattic.com/wordpress/branches/3.0@15349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-06-29 14:11:36 +00:00
parent 6a3319d6f7
commit 4c3e6d6cb3
1 changed files with 1 additions and 1 deletions

View File

@ -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";