WordPress.org

Make WordPress Core

Changeset 13688


Ignore:
Timestamp:
03/13/10 06:59:07 (5 years ago)
Author:
dd32
Message:

Add Endpoints for Attachments, Paging, Comment paging and custom Endpoints to custom post_type's. See #12597

File:
1 edited

Legend:

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

    r13678 r13688  
    14381438                    if (strpos($struct, '%pagename%') !== false) 
    14391439                        $page = true; 
     1440                } 
     1441 
     1442                if ( ! $post ) { 
     1443                    // For custom post types, we need to add on endpoints as well. 
     1444                    foreach ( get_post_types( array('_builtin' => false ) ) as $ptype ) { 
     1445                        if ( strpos($struct, "%$ptype%") !== false ) { 
     1446                            $post = true; 
     1447                            $page = false; 
     1448                        } 
     1449                    } 
    14401450                } 
    14411451 
Note: See TracChangeset for help on using the changeset viewer.