wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



get_next_posts_page_link › WordPress Function

Od2.0.10
Przestarzałyn/a
get_next_posts_page_link ( $max_page = 0 )
Parametry:
  • (int) $max_page Optional. Max pages. Default 0.
    Wymagane: Nie
    Domyślny:
Powrót:
  • (string|void) The link URL for next posts page.
Zdefiniowane na:
Codex:

Retrieves the next posts page link.

Backported from 2.1.3 to 2.0.10.


Źródło

function get_next_posts_page_link( $max_page = 0 ) {
	global $paged;

	if ( ! is_single() ) {
		if ( ! $paged ) {
			$paged = 1;
		}

		$next_page = (int) $paged + 1;

		if ( ! $max_page || $max_page >= $next_page ) {
			return get_pagenum_link( $next_page );
		}
	}
}