apply_filters( 'content_pagination', string[] $pages, WP_Post $post )
- Since
- 4.4.0
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.
Compatibility
- WordPress
- since 4.4.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$pagesstring[]- Array of "pages" from the post content split by
<!-- nextpage -->tags. $postWP_Post- Current post object.
Where this hook fires · 1
wp-includes/class-wp-query.php:4950WP_Query::generate_postdata()
Source code
* * @since 4.4.0 * * @param string[] $pages Array of "pages" from the post content split by `<!-- nextpage -->` tags. * @param WP_Post $post Current post object. */ $pages = apply_filters( 'content_pagination', $pages, $post ); $numpages = count( $pages ); if ( $numpages > 1 ) { if ( $page > 1 ) { $more = 1;Changelog
Introduced in 4.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, 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.