Add Endpoints for Attachments, Paging, Comment paging and custom Endpoints to custom post_type's. See #12597
git-svn-id: http://svn.automattic.com/wordpress/trunk@13688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4ca0960178
commit
e8dd01bb1b
|
@ -1439,6 +1439,16 @@ class WP_Rewrite {
|
|||
$page = true;
|
||||
}
|
||||
|
||||
if ( ! $post ) {
|
||||
// For custom post types, we need to add on endpoints as well.
|
||||
foreach ( get_post_types( array('_builtin' => false ) ) as $ptype ) {
|
||||
if ( strpos($struct, "%$ptype%") !== false ) {
|
||||
$post = true;
|
||||
$page = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if we're creating rules for a permalink, do all the endpoints like attachments etc
|
||||
if ($post) {
|
||||
$post = true;
|
||||
|
|
Loading…
Reference in New Issue