Make WordPress Core

Opened 12 years ago

Closed 9 years ago

#21375 closed feature request (wontfix)

Add Filter for next_posts_link/prev_posts_link label

Reported by: madtownlems's profile MadtownLems Owned by:
Milestone: Priority: normal
Severity: minor Version:
Component: Posts, Post Types Keywords: 2nd-opinion close
Focuses: template Cc:

Description

There is currently a filter 'next_posts_link_attributes' that allows plugins to add/modify classes/rel/etc to the links. However, the actual label that is displayed for the link is not accessible through this.

I think that the $label variable in function get_next_posts_link should be run through a filter to allow it to be modified by plugins.

For example, a plugin that adds a custom post type of Apple might want these links to say Next Apples or Previous Apples, or if a plugin changes the ordering of posts, it might want to change 'Earlier' type labels that many themes use to better reflect the new ordering system

Change History (4)

#1 @martythornley
12 years ago

  • Cc marty@… added

#2 @DrewAPicture
10 years ago

  • Component changed from General to Posts, Post Types
  • Focuses template added
  • Keywords 2nd-opinion added

This seems like kind of a stretch. The label is already passed via the function and it seems like in any case it would mostly be up to the theme to use the function and change it as needed, such as for your post type example.

#3 @channeleaton
10 years ago

  • Keywords close added

I agree with DrewAPicture. This should be set in the theme when developed. Plugins shouldn't have the ability to change this and parent themes should provide the filter if this functionality is needed.

#4 @wonderboymusic
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Correct - this is theme material

Note: See TracTickets for help on using tickets.