Advertisements

get_previous_posts_link

Definition:
function get_previous_posts_link( $label = null ) {}

Return the previous posts page link.

Parameters

  • string $label: Optional. Previous page link text.

Defined filters

  • previous_posts_link_attributes
    apply_filters( 'previous_posts_link_attributes', '' )

Source code

function get_previous_posts_link( $label = null ) {

	global $paged;



	if ( null === $label )

		$label = __( '« Previous Page' );



	if ( !is_single() && $paged > 1 ) {

		$attr = apply_filters( 'previous_posts_link_attributes', '' );

		return '<a href="' . previous_posts( false ) . "\" $attr>". preg_replace( '/&([^#])(?![a-z]{1,8};)/', '&$1', $label ) .'</a>';

	}

}

1643

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: