get_next_posts_page_link

The timeline below displays how wordpress function get_next_posts_page_link has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.2

/**
 * Retrieves the next posts page link.
 *
 * Backported from 2.1.3 to 2.0.10.
 *
 * @since 2.0.10
 *
 * @global int $paged
 *
 * @param int $max_page Optional. Max pages. Default 0.
 * @return string|void The link URL for next posts page.
 */
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);
        }
    }
}

WordPress Version: 5.6

/**
 * Retrieves the next posts page link.
 *
 * Backported from 2.1.3 to 2.0.10.
 *
 * @since 2.0.10
 *
 * @global int $paged
 *
 * @param int $max_page Optional. Max pages. Default 0.
 * @return string|void The link URL for next posts page.
 */
function get_next_posts_page_link($max_page = 0)
{
    global $paged;
    if (!is_single()) {
        if (!$paged) {
            $paged = 1;
        }
        $nextpage = (int) $paged + 1;
        if (!$max_page || $max_page >= $nextpage) {
            return get_pagenum_link($nextpage);
        }
    }
}

WordPress Version: 4.6

/**
 * Retrieves the next posts page link.
 *
 * Backported from 2.1.3 to 2.0.10.
 *
 * @since 2.0.10
 *
 * @global int $paged
 *
 * @param int $max_page Optional. Max pages. Default 0.
 * @return string|void The link URL for next posts page.
 */
function get_next_posts_page_link($max_page = 0)
{
    global $paged;
    if (!is_single()) {
        if (!$paged) {
            $paged = 1;
        }
        $nextpage = intval($paged) + 1;
        if (!$max_page || $max_page >= $nextpage) {
            return get_pagenum_link($nextpage);
        }
    }
}

WordPress Version: 4.3

/**
 * Retrieve next posts page link.
 *
 * Backported from 2.1.3 to 2.0.10.
 *
 * @since 2.0.10
 *
 * @global int $paged
 *
 * @param int $max_page Optional. Max pages.
 * @return string|void The link URL for next posts page.
 */
function get_next_posts_page_link($max_page = 0)
{
    global $paged;
    if (!is_single()) {
        if (!$paged) {
            $paged = 1;
        }
        $nextpage = intval($paged) + 1;
        if (!$max_page || $max_page >= $nextpage) {
            return get_pagenum_link($nextpage);
        }
    }
}

WordPress Version: 4.1

/**
 * Retrieve next posts page link.
 *
 * Backported from 2.1.3 to 2.0.10.
 *
 * @since 2.0.10
 *
 * @param int $max_page Optional. Max pages.
 * @return string The link URL for next posts page.
 */
function get_next_posts_page_link($max_page = 0)
{
    global $paged;
    if (!is_single()) {
        if (!$paged) {
            $paged = 1;
        }
        $nextpage = intval($paged) + 1;
        if (!$max_page || $max_page >= $nextpage) {
            return get_pagenum_link($nextpage);
        }
    }
}

WordPress Version: 3.7

/**
 * Retrieve next posts page link.
 *
 * Backported from 2.1.3 to 2.0.10.
 *
 * @since 2.0.10
 *
 * @param int $max_page Optional. Max pages.
 * @return string
 */
function get_next_posts_page_link($max_page = 0)
{
    global $paged;
    if (!is_single()) {
        if (!$paged) {
            $paged = 1;
        }
        $nextpage = intval($paged) + 1;
        if (!$max_page || $max_page >= $nextpage) {
            return get_pagenum_link($nextpage);
        }
    }
}