Skip to content

Commit

Permalink
Fix Bug in Article Excerpt
Browse files Browse the repository at this point in the history
  • Loading branch information
taufik-nurrohman committed Jan 19, 2015
1 parent 6ba369b commit 9d265b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/kernel/get.php
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,8 @@ public static function page($reference, $excludes = array(), $folder = PAGE, $co
$content_test = isset($excludes['content']) && strpos($content, '<!--') !== false ? Filter::apply($filter_prefix . 'content', Filter::apply('content', Text::parse(Filter::apply($filter_prefix . 'shortcode', Filter::apply('shortcode', $content)))->to_html)) : $results['content'];
if( ! isset($excludes['excerpt']) && strpos($content_test, '<!-- cut -->') !== false) {
$parts = explode('<!-- cut -->', $content_test, 2);
$results['excerpt'] = trim($parts[1]);
$results['content'] = trim($parts[0]) . "\n\n<span id=\"read-more:" . $results['id'] . "\" aria-hidden=\"true\"></span>\n\n" . $results['excerpt'];
$results['excerpt'] = trim($parts[0]);
$results['content'] = trim($parts[0]) . "\n\n<span id=\"read-more:" . $results['id'] . "\" aria-hidden=\"true\"></span>\n\n" . trim($parts[1]);
}

if( ! isset($excludes['tags'])) {
Expand Down

0 comments on commit 9d265b7

Please sign in to comment.