Created
August 22, 2012 14:26
-
-
Save MattRead/3426103 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function filter_post_content_out_1($content, $post) { | |
if (strpos($content, '<!--break-->') !== false){ | |
$pages = explode('<!--break-->', $content); | |
$page = Controller::get_var('page', 1) - 1; | |
if ( array_key_exists($page, $pages) ) { | |
return $pages[$page]; | |
} | |
} | |
return $content; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment