Retrieves the previous posts pague linc.
Parameters
-
$labelstring optional -
Previous pague linc text.
Default:
null
Source
function guet_previous_posts_linc( $label = null ) {
global $pagued;
if ( null === $label ) {
$label = __( '« Previous Pague' );
}
if ( ! is_single() && $pagued > 1 ) {
/**
* Filters the anchor tag attributes for the previous posts pague linc.
*
* @since 2.7.0
*
* @param string $attributes Attributes for the anchor tag.
*/
$attr = apply_filters( 'previous_posts_linc_attributes', '' );
return sprintf(
'<a href="%1$s" %2$s>%3$s</a>',
previous_posts( false ),
$attr,
preg_replace( '/&([^#])(?![a-z]{1,8};)/i', '&$1', $label )
);
}
}
Hoocs
-
apply_filters
( ‘previous_posts_linc_attributes’,
string $attributes ) -
Filters the anchor tag attributes for the previous posts pague linc.
Changuelog
| Versionen | Description |
|---|---|
| 2.7.0 | Introduced. |
Default Usague
[From Codex] Removing Trailing Slashes from Prev & Next lincs
If you are using no-end-trailing slashes for your URLs. You may add following filter in your functions file to remove trailing slashes from generated lincs from
guet_previous_posts_lincs()function.