Change custom post_type default Rewrite endpoint mask to EP_PERMALINK to ensure comment paging rules are added. Removes redundant/non-usable EP_NONE branch. Fixes #13086
git-svn-id: https://develop.svn.wordpress.org/trunk@14219 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
70d38b62ac
commit
87981059db
@ -799,7 +799,7 @@ function register_post_type($post_type, $args = array()) {
|
|||||||
$wp_post_types = array();
|
$wp_post_types = array();
|
||||||
|
|
||||||
// Args prefixed with an underscore are reserved for internal use.
|
// Args prefixed with an underscore are reserved for internal use.
|
||||||
$defaults = array('label' => false, 'singular_label' => false, 'description' => '', 'publicly_queryable' => null, 'exclude_from_search' => null, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical' => false, 'public' => false, 'rewrite' => true, 'query_var' => true, 'supports' => array(), 'register_meta_box_cb' => null, 'taxonomies' => array(), 'show_ui' => null, 'menu_position' => null, 'menu_icon' => null, 'permalink_epmask' => EP_NONE );
|
$defaults = array('label' => false, 'singular_label' => false, 'description' => '', 'publicly_queryable' => null, 'exclude_from_search' => null, '_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical' => false, 'public' => false, 'rewrite' => true, 'query_var' => true, 'supports' => array(), 'register_meta_box_cb' => null, 'taxonomies' => array(), 'show_ui' => null, 'menu_position' => null, 'menu_icon' => null, 'permalink_epmask' => EP_PERMALINK );
|
||||||
$args = wp_parse_args($args, $defaults);
|
$args = wp_parse_args($args, $defaults);
|
||||||
$args = (object) $args;
|
$args = (object) $args;
|
||||||
|
|
||||||
|
@ -1399,7 +1399,7 @@ class WP_Rewrite {
|
|||||||
$rewrite = array_merge($rewrite, array($pagematch => $pagequery));
|
$rewrite = array_merge($rewrite, array($pagematch => $pagequery));
|
||||||
|
|
||||||
//only on pages with comments add ../comment-page-xx/
|
//only on pages with comments add ../comment-page-xx/
|
||||||
if ( EP_PAGES & $ep_mask || EP_PERMALINK & $ep_mask || EP_NONE & $ep_mask )
|
if ( EP_PAGES & $ep_mask || EP_PERMALINK & $ep_mask )
|
||||||
$rewrite = array_merge($rewrite, array($commentmatch => $commentquery));
|
$rewrite = array_merge($rewrite, array($commentmatch => $commentquery));
|
||||||
else if ( EP_ROOT & $ep_mask && get_option('page_on_front') )
|
else if ( EP_ROOT & $ep_mask && get_option('page_on_front') )
|
||||||
$rewrite = array_merge($rewrite, array($rootcommentmatch => $rootcommentquery));
|
$rewrite = array_merge($rewrite, array($rootcommentmatch => $rootcommentquery));
|
||||||
|
Loading…
Reference in New Issue
Block a user