Skip to content

Instantly share code, notes, and snippets.

@MattRead
Created August 22, 2012 14:26
Show Gist options
  • Save MattRead/3426103 to your computer and use it in GitHub Desktop.
Save MattRead/3426103 to your computer and use it in GitHub Desktop.
<?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