WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#7942 closed enhancement (fixed)

Enable pretty permalinks for comment paging

Reported by: Viper007Bond Owned by:
Milestone: 2.7 Priority: high
Severity: normal Version: 2.7
Component: Comments Keywords: has-patch needs-testing
Focuses: Cc:

Description

Suggested format: .../comment-page-1/ (matches plugin and is nice looking IMO)

If someone doesn't beat me to it, I can probably handle it.

Attachments (4)

7492.diff (6.7 KB) - added by DD32 5 years ago.
7942.diff (2.0 KB) - added by DD32 5 years ago.
7942.2.diff (3.0 KB) - added by Viper007Bond 5 years ago.
Bug fix of DD32's patch for when newest page is showed by default
7942.3.diff (1.1 KB) - added by DD32 5 years ago.
redirect post-name/comment-page-xx/ => post-name/ when paging disabled

Download all attachments as: .zip

Change History (17)

comment:1 markjaquith5 years ago

Go for it. Agree on using that format to match the plugin.

comment:2 DD325 years ago

It'd be nice to support comment paging on attachments too(Just incase someone else does it, and only does it for Posts|Pages), I went to implement this ticket.. However, Got confused quickly in WP_Rewrite::generate_rewrite_rules() as for how its doing its black magic :)

comment:3 ryan5 years ago

  • Component changed from General to Comments
  • Owner anonymous deleted

DD325 years ago

comment:4 DD325 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

attachment 7492.diff added.

  • ../comment-page-xx/ support for pages/posts/attachments (anything with comments)
  • canonical redirection for ?cpage=xx to comment-page-xx
  • comment pagination links use pretty links if enabled
  • Yes, This patch is for this ticket, even though i managed to muddle the ticket number up in the filename..

comment:5 ryan5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [9300]) pretty permalinks for comment paging. Props Viper007Bind. fixes #7942

comment:6 ryan5 years ago

Duh, propped the wrong person and even spelt that wrong.

comment:7 ryan5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

previous_comments_link() and next_comments_link() also need to be updated.

What do we do if both the post and comments are paged? Paging comments while on page 2 of the post should preserve the post page 2 in the links?

comment:8 DD325 years ago

What do we do if both the post and comments are paged? Paging comments while on page 2 of the post should preserve the post page 2 in the links?

Another Rewrite rule will need to be added to the Paged rules for that, And some funky coding will need to happen inside the function to get the right orderings of the page/xx/comment-page-xx/ i believe

DD325 years ago

comment:9 DD325 years ago

attachment 7942.diff added.

  • (previous|next)_comments_link() converted to permalinks
  • It'd be nice to condense that If branch together, But i'm not 100% on the logic behind it, So i've left it as 2 branches.

comment:10 ryan5 years ago

  • Priority changed from normal to high

Viper007Bond5 years ago

Bug fix of DD32's patch for when newest page is showed by default

comment:11 markjaquith5 years ago

(In [9318]) Enable pretty permalinks for previous_ and next_comments_link(). props DD32, Viper007Bond. see #7942

DD325 years ago

redirect post-name/comment-page-xx/ => post-name/ when paging disabled

comment:12 markjaquith5 years ago

(In [9322]) Redirect away from paged comments permalinks when comment paging has been turned off. props DD32. see #7942

comment:13 ryan5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.