Make WordPress Core

Opened 10 months ago

Closed 5 months ago

#59545 closed enhancement (fixed)

New filter admin_canonical_url

Reported by: prionkor's profile prionkor Owned by: audrasjb's profile audrasjb
Milestone: 6.5 Priority: normal
Severity: normal Version:
Component: Canonical Keywords: has-patch needs-dev-note
Focuses: administration Cc:


Admin canonical url is often problematic and there are few open ticket related to it. A good choice will be providing a filter so people can modify it if needed.

Related #35561

Attachments (1)

59545.patch (583 bytes) - added by shailu25 5 months ago.
Patch Updated

Download all attachments as: .zip

Change History (18)

#2 @prionkor
10 months ago

  • Keywords has-patch removed

#3 @audrasjb
10 months ago

  • Keywords changes-requested added

Thanks for the ticket and patch. I added two change requests in the PR :)

#4 @prionkor
10 months ago

Done! Thanks for the review!

#5 @prionkor
10 months ago

  • Keywords has-patch added; changes-requested removed

prionkor commented on PR #5412:

10 months ago

The failed test is timeout and not relevant to the change. What is the next step?

@audrasjb commented on PR #5412:

10 months ago

The failed test is timeout and not relevant to the change. What is the next step?

No worries, it clearly appears that it is a timeout, so this is not a blocker.

#8 @audrasjb
10 months ago

  • Keywords dev-feedback removed
  • Milestone changed from Awaiting Review to 6.5
  • Owner set to audrasjb
  • Status changed from new to accepted

#9 @jefferyto
10 months ago

The fact that #35561 has been open for 8 years and hasn't had any meaningful attention from a core committer for almost as long...

Compared with the near instantaneous acceptance of this change, a way for people to *work around* the issue that continues to exist in the codebase...

Which will then become the de-facto "solution" whenever someone encounters the same problem, allowing the core project to continue to at best ignore this and other similar issues (#36201 comes to mind) and at worst pretend the issues don't exist (since people will work around the problems and move on with their lives instead of pointlessly opening or commenting on issues here)... simply boggles the mind.

Last edited 10 months ago by jefferyto (previous) (diff)

#10 @devmuhib
6 months ago

Do we need to test this or it's already accepted?

#11 @audrasjb
5 months ago

  • Component changed from Administration to Canonical

#12 @audrasjb
5 months ago

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

In 57595:

Canonical: Introduce admin_canonical_url filter.

This changeset introduces the new admin_canonical_url hook to help developers and extenders to modify the admin canonical url value.

Props prionkor, audrasjb.
Fixes #59545.

#14 @audrasjb
5 months ago

  • Keywords needs-dev-note added

Adding needs-dev-note to ensure this changeset is mentioned in the misc changes dev note.

#15 @peterwilsoncc
5 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

I think this filter would be better named wp_admin_canonical_url:

  • prefixes are a good thing
  • it matches the function name it's filtering the output of

Sorry I didn't notice this until after the commit but it's impossible to track everything.

5 months ago

Patch Updated

#16 @shailu25
5 months ago

I have added Patch as per suggested in above comment.

Last edited 5 months ago by shailu25 (previous) (diff)

#17 @swissspidy
5 months ago

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

In 57651:

Canonical: Rename admin_canonical_url filter to wp_admin_canonical_url.

This improves consistency as it matches the name of the function it is used in.

Props peterwilsoncc, shailu25.
Fixes #59545.

Note: See TracTickets for help on using tickets.