Chat post format code cleanup.

see #23625. props obenland.

git-svn-id: https://develop.svn.wordpress.org/trunk@23876 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2013-03-29 21:06:37 +00:00
parent 9ffb607ce2
commit 26ba022571
2 changed files with 24 additions and 31 deletions
+8 -7
View File
@@ -3626,14 +3626,14 @@ function wp_old_slug_redirect() {
*
* @since 3.6.0
*
* @param string $content Content to split
* @return array Paged content
* @param string $content Content to split.
* @return array Paged content.
*/
function paginate_content( $content ) {
$content = str_replace( "\n<!--nextpage-->\n", '<!--nextpage-->', $content );
$content = str_replace( "\n<!--nextpage-->", '<!--nextpage-->', $content );
$content = str_replace( "<!--nextpage-->\n", '<!--nextpage-->', $content );
return explode( '<!--nextpage-->', $content);
$content = str_replace( "\n<!--nextpage-->", '<!--nextpage-->', $content );
$content = str_replace( "<!--nextpage-->\n", '<!--nextpage-->', $content );
return explode( '<!--nextpage-->', $content );
}
/**
@@ -3642,9 +3642,10 @@ function paginate_content( $content ) {
* @since 3.6.0
*
* @param string $content
* @param int $paged
* @return string
*/
function get_paged_content( $content = null, $paged = null ) {
function get_paged_content( $content = '', $paged = 0 ) {
global $page;
if ( empty( $page ) )
$page = 1;
@@ -3655,7 +3656,7 @@ function get_paged_content( $content = null, $paged = null ) {
if ( empty( $content ) ) {
$post = get_post();
if ( empty( $post ) )
return;
return '';
$content = $post->post_content;
}