Make WordPress Core

Opened 13 years ago

Closed 10 years ago

Last modified 4 years ago

#18084 closed enhancement (fixed)

Comments Page Rewrite Customization

Reported by: webord's profile webord Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.2 Priority: normal
Severity: normal Version: 3.2
Component: Rewrite Rules Keywords: has-patch commit
Focuses: Cc:

Description

So I was doing some stuff on translation of the rewrite URLs, to pt-BR I've run into a problem, that the Comments Page Rules cannot be changed using a base variable, like all the other bases.

So Im attaching a file to this ticket with the modified File, but I didn't test if its a good solution, thats the one I can think of.

I really would like to see this enchancement.

Thanks,

Attachments (4)

rewrite.php (57.6 KB) - added by webord 13 years ago.
New Rewrite File
rewrite.2.php (57.6 KB) - added by webord 13 years ago.
New Rewrite File
18084.patch (877 bytes) - added by SergeyBiryukov 13 years ago.
18084.2.patch (5.3 KB) - added by johnbillion 10 years ago.

Download all attachments as: .zip

Change History (23)

@webord
13 years ago

New Rewrite File

@webord
13 years ago

New Rewrite File

#1 @webord
13 years ago

Sorry for the double file...

#2 @webord
13 years ago

  • Version set to 3.2

#3 @scribu
13 years ago

  • Keywords 2nd-opinion needs-testing removed

Would be a lot easier to review if you submitted this as a diff.

#4 @webord
13 years ago

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

Yes, I didn't know about .diff files at the time. And now I dont really remember what I've changed.

#5 @helenyhou
13 years ago

  • Milestone Awaiting Review deleted

#6 @SergeyBiryukov
13 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone set to Awaiting Review
  • Resolution invalid deleted
  • Status changed from closed to reopened

18084.patch contains the changes from rewrite.php.

#7 @chriscct7
10 years ago

  • Resolution set to duplicate
  • Status changed from reopened to closed

Duplicate of (and implemented in) #12507

#8 @SergeyBiryukov
10 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

Comment pagination base is still hardcoded, #12507 did not affect it.

#9 @chriscct7
10 years ago

@sergeybiryukov This is the changeset for that trac ticket which I believe to be a duplicate (I could be wrong though): [15582]

Note the changes made for rewrite.php are the same as the proposed changes in the #18084 patch but just with different variable names.

Last edited 10 years ago by SergeyBiryukov (previous) (diff)

#10 @SergeyBiryukov
10 years ago

The changes are different. The patch here was created after that changeset, not before.

[15582] replaced page with $this->pagination_base in $pageregex.

18084.patch replaces comment-page with $this->comments_pagination_base in the next line.

#11 @chriscct7
10 years ago

Ah, indeed you are correct sir. My apologies.

The proposed patch look good to go, but whoever merges it will want to update the @since on the new object parameter (as it's currently set to 3.5 and the earliest it could be in core would be 4.1).

#12 @johnbillion
10 years ago

  • Milestone changed from Awaiting Review to 4.1

#13 @johnbillion
10 years ago

18084.2.patch replaces hardcoded usage of comment-page with the comment pagination base.

#14 @johnbillion
10 years ago

  • Keywords 4.2-early added
  • Milestone changed from 4.1 to Future Release

#15 @iseulde
10 years ago

  • Milestone changed from Future Release to 4.2

has-patch 4.2-early so moving to 4.2.

This ticket was mentioned in Slack in #core by drew. View the logs.


10 years ago

#17 @johnbillion
10 years ago

  • Keywords commit added; 4.2-early removed

#18 @SergeyBiryukov
10 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from reopened to closed

In 31459:

Replace hardcoded usage of comment-page with the comment pagination base.

props johnbillion, SergeyBiryukov, webord.
fixes #18084.

#19 @SergeyBiryukov
4 years ago

#27631 was marked as a duplicate.

Note: See TracTickets for help on using tickets.