Changeset 35285 for trunk/src/wp-includes/query.php
- Timestamp:
- 10/20/2015 06:32:16 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r35170 r35285 4772 4772 $content = $post->post_content; 4773 4773 if ( false !== strpos( $content, '<!--nextpage-->' ) ) { 4774 if ( $page > 1 )4775 $more = 1;4776 4774 $content = str_replace( "\n<!--nextpage-->\n", '<!--nextpage-->', $content ); 4777 4775 $content = str_replace( "\n<!--nextpage-->", '<!--nextpage-->', $content ); … … 4783 4781 4784 4782 $pages = explode('<!--nextpage-->', $content); 4785 $numpages = count($pages);4786 if ( $numpages > 1 )4787 $multipage = 1;4788 4783 } else { 4789 4784 $pages = array( $post->post_content ); 4790 4785 } 4786 4787 /** 4788 * Filter the "pages" derived from splitting the post content. 4789 * 4790 * "Pages" are determined by splitting the post content based on the presence 4791 * of `<!-- nextpage -->` tags. 4792 * 4793 * @since 4.4.0 4794 * 4795 * @param array $pages Array of "pages" derived from the post content. 4796 * of `<!-- nextpage -->` tags.. 4797 * @param WP_Post $post Current post object. 4798 */ 4799 $pages = apply_filters( 'content_pagination', $pages, $post ); 4800 4801 $numpages = count( $pages ); 4802 4803 if ( $numpages > 1 ) { 4804 if ( $page > 1 ) { 4805 $more = 1; 4806 } 4807 $multipage = 1; 4808 } else { 4809 $multipage = 0; 4810 } 4791 4811 4792 4812 /**
Note: See TracChangeset
for help on using the changeset viewer.