$page =
$this->
get( 'page'
);
if ( !
$page ) { $page = 1;
} /*
* Force full post content when viewing the permalink for the $post,
* or when on an RSS feed. Otherwise respect the 'more' tag.
*/
if ( get_queried_object_id() ===
$post->ID
&& ( $this->
is_page() ||
$this->
is_single() ) ) { $more = 1;
} elseif ( $this->
is_feed() ) { $more = 1;
} else { $more = 0;
} $content =
$post->post_content;
if ( str_contains( $content, '<!--nextpage-->'
) ) { $content =
str_replace( "\n<!--nextpage-->\n", '<!--nextpage-->',
$content );
$content =
str_replace( "\n<!--nextpage-->", '<!--nextpage-->',
$content );
$content =
str_replace( "<!--nextpage-->\n", '<!--nextpage-->',
$content );