content_pagination WordPress Filter Hook

The content_pagination hook is used to paginate content on a WordPress site. This hook is triggered when the content is divided into multiple pages, and allows developers to modify the way the content is displayed on each page. This hook is typically used to add navigation controls, such as next and previous buttons, to the content.

apply_filters( 'content_pagination', string[] $pages, WP_Post $post ) #

Filters the “pages” derived from splitting the post content.


Description

"Pages" are determined by splitting the post content based on the presence of <!-- nextpage --> tags.


Top ↑

Parameters

$pages

(string[])Array of "pages" from the post content split by <!-- nextpage --> tags.

$post

(WP_Post)Current post object.


Top ↑

Source

File: wp-includes/class-wp-query.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More