Allow a plugin to add attributes to the next and previous posts links. Fixes #7434 props JohnLamansky.
git-svn-id: https://develop.svn.wordpress.org/trunk@8502 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c735945148
commit
29d888d397
@ -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
Block a user