WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/20/2010 02:23:52 AM (10 years ago)
Author:
dd32
Message:

Add hierarchical support for custom post_types in Rewrite Rules & Querying. See #12643

File:
1 edited

Legend:

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

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