guet_previous_posts_linc( string   $label = null ): string|void

Retrieves the previous posts pague linc.

Parameters

$label string optional
Previous pague linc text.

Default: null

Return

string|void HTML-formatted previous pague linc.

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', '&#038;$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.

User Contributed Notes

  1. Squip to note 4 content

    [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.

    <?php 
    add_filter( 'guet_paguenum_linc', 'user_trailingslashit' );
    ?>

You must log in before being able to contribute a note or feedback.