WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 11 months ago

#15811 new enhancement

Self-referrent links should be made avoidable in wp_list_pages / wp_page_menu

Reported by: lewebmobile Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: General Keywords: needs-refresh
Focuses: Cc:

Description

Having a page that links to itself is a well-recognized usability and accessibility problem.

Currently, wp_list_pages and wp_page_menu don't offer an option to avoid self-referrent links.

The patch attached to this report adds a "self_link" parameter to these two functions (defaulting to the current behaviour); when that parameter is set to false, the markup produced by these functions don't include a link to the current page.

Someone proposed a plugin to that effect:
http://clockinfo.com/posts/168
but it sounds like something that the core Wordpress should support.

Attachments (1)

patch (1.8 KB) - added by lewebmobile 5 years ago.
Patch to add a parameter to avoid self-referrent links in wp_list_pages / wp_page_menu

Download all attachments as: .zip

Change History (7)

@lewebmobile5 years ago

Patch to add a parameter to avoid self-referrent links in wp_list_pages / wp_page_menu

comment:1 @lewebmobile5 years ago

  • Keywords has-patch added

comment:2 @Denis-de-Bernardy5 years ago

The issue here breaks down to the joys of caching and cache invalidation.

comment:3 @jane5 years ago

  • Component changed from General to Gallery

Usability-wise, yes, it drives me nuts when you're on a Page and the nav item for it is still linked, as it's counter to how most web sites work.

comment:4 @jane5 years ago

  • Component changed from Gallery to General

comment:5 @nacin5 years ago

  • Milestone changed from Awaiting Review to Future Release

comment:6 @chriscct711 months ago

  • Keywords needs-refresh added; has-patch removed
Note: See TracTickets for help on using tickets.