Make WordPress Core


Ignore:
Timestamp:
07/09/2013 05:22:50 AM (12 years ago)
Author:
nacin
Message:

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].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r24490 r24598  
    49714971    }
    49724972}
    4973 
    4974 /**
    4975  * Parse post content for pagination
    4976  *
    4977  * @since 3.6.0
    4978  *
    4979  * @uses paginate_content()
    4980  *
    4981  * @param object $post The post object.
    4982  * @return array An array of values used for paginating the parsed content.
    4983  */
    4984 function wp_parse_post_content( $post ) {
    4985     $numpages = 1;
    4986 
    4987     if ( strpos( $post->post_content, '<!--nextpage-->' ) ) {
    4988         $multipage = 1;
    4989         $pages = paginate_content( $post->post_content );
    4990         $numpages = count( $pages );
    4991     } else {
    4992         $pages = array( $post->post_content );
    4993         $multipage = 0;
    4994     }
    4995 
    4996     return compact( 'multipage', 'pages', 'numpages' );
    4997 }
Note: See TracChangeset for help on using the changeset viewer.