Closed splorp closed 2 years ago
The following page navigation functions do not add title or rel attributes to links, like post navigation functions do. This is dumb.
title
rel
next_posts_link() previous_posts_link() next_image_link() previous_image_link() next_comments_link() previous_comments_link()
next_posts_link()
previous_posts_link()
next_image_link()
previous_image_link()
next_comments_link()
previous_comments_link()
We can probably use this snippet as the basis for filtering to the affected functions.
I’ve also stumbled across the following filter hooks, which might be useful.
next_posts_link_attributes previous_posts_link_attributes next_comments_link_attributes previous_comments_link_attributes
next_posts_link_attributes
previous_posts_link_attributes
next_comments_link_attributes
previous_comments_link_attributes
add_filter('next_posts_link_attributes', 'get_next_posts_link_attributes'); add_filter('previous_posts_link_attributes', 'get_previous_posts_link_attributes'); if (!function_exists('get_next_posts_link_attributes')){ function get_next_posts_link_attributes($attr){ $attr = 'rel="myrel" title="mytitle"'; return $attr; } } if (!function_exists('get_previous_posts_link_attributes')){ function get_previous_posts_link_attributes($attr){ $attr = 'rel="myrel" title="mytitle"'; return $attr; } }
The following page navigation functions do not add
title
orrel
attributes to links, like post navigation functions do. This is dumb.next_posts_link()
previous_posts_link()
next_image_link()
previous_image_link()
next_comments_link()
previous_comments_link()
We can probably use this snippet as the basis for filtering to the affected functions.
I’ve also stumbled across the following filter hooks, which might be useful.
next_posts_link_attributes
previous_posts_link_attributes
next_comments_link_attributes
previous_comments_link_attributes