Make WordPress Core


Ignore:
Timestamp:
04/18/2010 03:54:45 PM (16 years ago)
Author:
nacin
Message:

Use is_post_type_hierarchical and is_taxonomy_hierarchical when we're fetching a post/tax object only to check the hierarchical flag. fixes #12950.

File:
1 edited

Legend:

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

    r13774 r14155  
    14371437                    foreach ( get_post_types( array('_builtin' => false ) ) as $ptype ) {
    14381438                        if ( strpos($struct, "%$ptype%") !== false ) {
    1439                             $ptype = get_post_type_object($ptype);
    14401439                            $post = true;
    1441                             $page = $ptype->hierarchical; // This is for page style attachment url's
     1440                            $page = is_post_type_hierarchical( $ptype ); // This is for page style attachment url's
    14421441                            break;
    14431442                        }
Note: See TracChangeset for help on using the changeset viewer.