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:
Andrew Nacin
2013-07-09 05:22:50 +00:00
parent 7f0bd4bbd6
commit 65bf560b9d
3 changed files with 22 additions and 99 deletions

View File

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