| 1 | Index: wp-includes/rewrite.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/rewrite.php (revision 10194) |
|---|
| 4 | +++ wp-includes/rewrite.php (working copy) |
|---|
| 5 | @@ -1344,6 +1344,12 @@ |
|---|
| 6 | $commentmatch = $match . $commentregex; |
|---|
| 7 | $commentquery = $index . '?' . $query . '&cpage=' . $this->preg_index($num_toks + 1); |
|---|
| 8 | |
|---|
| 9 | + if ( get_option('page_on_front') ) { |
|---|
| 10 | + //create query for Root /comment-page-xx |
|---|
| 11 | + $rootcommentmatch = $match . $commentregex; |
|---|
| 12 | + $rootcommentquery = $index . '?' . $query . '&page_id=' . get_option('page_on_front') . '&cpage=' . $this->preg_index($num_toks + 1); |
|---|
| 13 | + } |
|---|
| 14 | + |
|---|
| 15 | //create query for /feed/(feed|atom|rss|rss2|rdf) |
|---|
| 16 | $feedmatch = $match . $feedregex; |
|---|
| 17 | $feedquery = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1); |
|---|
| 18 | @@ -1368,6 +1374,8 @@ |
|---|
| 19 | //only on pages with comments add ../comment-page-xx/ |
|---|
| 20 | if ( EP_PAGES & $ep_mask || EP_PERMALINK & $ep_mask || EP_NONE & $ep_mask ) |
|---|
| 21 | $rewrite = array_merge($rewrite, array($commentmatch => $commentquery)); |
|---|
| 22 | + else if ( EP_ROOT & $ep_mask && get_option('page_on_front') ) |
|---|
| 23 | + $rewrite = array_merge($rewrite, array($rootcommentmatch => $rootcommentquery)); |
|---|
| 24 | |
|---|
| 25 | //do endpoints |
|---|
| 26 | if ($endpoints) { |
|---|