wppaste
WordPress

get_next_posts_page_link( int $max_page = 0 ): string|null

Since
2.0.10
Source
wp-includes/link-template.php:2519
Retrieves the next posts page link.

Description

Backported from 2.1.3 to 2.0.10.

Parameters

$max_pageintoptional
Max pages. Default 0.Default: 0

Return

string|null
The link URL for next posts page.

Uses · 2

Used by · 1

Source

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 );		}	}}

History

Introduced in 2.0.10. One change between 6.7.7 and 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

7.0.4
Return type changed from string|void to string|null.verified against source
2.0.10
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/link-template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.