[wp-trac] Re: [WordPress Trac] #4209: Add rel="prev" to
previous_post_link() and rel="next" to next_post_link()
WordPress Trac
wp-trac at lists.automattic.com
Mon May 25 16:05:17 GMT 2009
#4209: Add rel="prev" to previous_post_link() and rel="next" to next_post_link()
----------------------------+-----------------------------------------------
Reporter: FekketCantenel | Type: enhancement
Status: new | Priority: normal
Milestone: 2.9 | Component: Template
Version: | Severity: normal
Keywords: has-patch |
----------------------------+-----------------------------------------------
Comment(by mtekk):
Replying to [comment:27 vladimir_kolesnikov]:
> Attached two patches.
>
> The first one adds rel="prev/next" before xxx_posts_link_attributes is
fired, thus the plugins have to check if rel is already there (IMHO they
should do that anyway).
>
> The second one lets xxx_posts_link_attributes run, then checks if rel=
is already there; if not, it is added.
>
> Personally I like the first one more, as it is simplier and plugins in
theory can add their own <a> tags in xxx_posts_link_attributes, in which
case rel will be added to too many places.
Looks like the functions dealing with this have changed, and that
"next_posts_link_attributes" and "previous_posts_link_attributes" are now
gone.
+1 on the first patch.
When using "next_post_link"/"previous_post_link" plugin authors should be
able to see what is in the rel="" attribute. The first patch should be all
that is needed for it to work since no one should be adding in rel=""
before the new filters are run.
In the codex we should show how to intelligently add rel="" attributes, or
others using the new filters.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/4209#comment:28>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list