mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-14 09:34:41 +00:00
Remove wp_parse_post_content(), get_paged_content(), paginate_content() from 3.6, and remove the new $id parameters for get_the_content() and the_content().
The content parsing functions are good abstractions, but are no longer needed by core and are too closely tied to legacy globals, rather than paving a new path. For get_the_content() and the_content(), this only worsens the function prototype. It muddies theme-specific display (more links, etc) with filtered content. `apply_filters( 'the_content', $post->post_content )` is sufficient practice for now. see #24330, [24301]. see #23625, [23804]. git-svn-id: https://develop.svn.wordpress.org/trunk@24598 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4970,28 +4970,3 @@ function _prime_post_caches( $ids, $update_term_cache = true, $update_meta_cache
|
||||
update_post_caches( $fresh_posts, 'any', $update_term_cache, $update_meta_cache );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse post content for pagination
|
||||
*
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @uses paginate_content()
|
||||
*
|
||||
* @param object $post The post object.
|
||||
* @return array An array of values used for paginating the parsed content.
|
||||
*/
|
||||
function wp_parse_post_content( $post ) {
|
||||
$numpages = 1;
|
||||
|
||||
if ( strpos( $post->post_content, '<!--nextpage-->' ) ) {
|
||||
$multipage = 1;
|
||||
$pages = paginate_content( $post->post_content );
|
||||
$numpages = count( $pages );
|
||||
} else {
|
||||
$pages = array( $post->post_content );
|
||||
$multipage = 0;
|
||||
}
|
||||
|
||||
return compact( 'multipage', 'pages', 'numpages' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user