Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#12407 closed defect (bug) (fixed)

Inconsistent use of (next|previous)_post_link and (next|previous)_posts_link functions in default themes

Reported by: solarissmoke Owned by: iandstewart
Milestone: WordPress.org Priority: low
Severity: normal Version:
Component: Themes Keywords:
Focuses: Cc:


There is an inconsistency in the way the functions next_post_link()/previous_post_link() (used in single.php) and next_posts_link()/previous_posts_link() (used in index.php and archive.php) are used in the default themes.

The current behaviour (in the default themes) is as follows:

  • next_post_link() and previous_post_link() generate an anchor tag with post title plus either » or « outside the tag.
  • next_posts_link() and previous_posts_link() generate an anchor tag with post title and » or « inside the anchor tag.

Since these functions are all used in the same visual space (div.navigation) the position of the »/« (inside out outside of the anchor tag) should be consistent. Personally I prefer having the additional text inside the anchor tag.

It just requires changing the arguments supplied to the functions in the themes. Proposed patch to follow.

Attachments (1)

Consistent navigation links.patch (665 bytes) - added by solarissmoke 8 years ago.

Download all attachments as: .zip

Change History (9)

#1 @solarissmoke
8 years ago

  • Summary changed from Inconsistent link generation between (next|previous)_post_link and (next|previous)_posts_link functions to Inconsistent use of (next|previous)_post_link and (next|previous)_posts_link functions in default themes

#2 @solarissmoke
8 years ago

Correction - this applies only to the default theme, not to classic/twentyten.

#3 @solarissmoke
8 years ago

  • Keywords has-patch added

#4 @solarissmoke
8 years ago

  • Cc solarissmoke removed
  • Keywords has-patch removed
  • Milestone 3.1 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

13879 - these themes have been removed from the core so this becomes irrelevant.

#5 @nacin
8 years ago

  • Component changed from Themes to WordPress.org
  • Milestone set to WordPress.org site
  • Resolution wontfix deleted
  • Status changed from closed to reopened

#6 @nacin
8 years ago

  • Owner set to iandstewart
  • Status changed from reopened to assigned

#7 @nacin
8 years ago

  • Component changed from WordPress.org to Themes

#8 @iandstewart
8 years ago

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

I'll apply this patch to the version in the Theme Directory. Thanks!

Note: See TracTickets for help on using tickets.