Allow a plugin to add attributes to the next and previous posts links. Fixes #7434 props JohnLamansky.
git-svn-id: http://svn.automattic.com/wordpress/trunk@8502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
33ad189d78
commit
e612643a06
|
@ -696,7 +696,8 @@ function next_posts_link($label='Next Page »', $max_page=0) {
|
|||
if ( (! is_single()) && (empty($paged) || $nextpage <= $max_page) ) {
|
||||
echo '<a href="';
|
||||
next_posts($max_page);
|
||||
echo '">'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>';
|
||||
$attr = apply_filters( 'next_posts_link_attributes', '' );
|
||||
echo "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -720,7 +721,8 @@ function previous_posts_link($label='« Previous Page') {
|
|||
if ( (!is_single()) && ($paged > 1) ) {
|
||||
echo '<a href="';
|
||||
previous_posts();
|
||||
echo '">'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>';
|
||||
$attr = apply_filters( 'previous_posts_link_attributes', '' );
|
||||
echo "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue