Browse Source

Update functions.php

pull/686/head
danpros 1 year ago
parent
commit
036f4ba5f0
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      system/includes/functions.php

+ 3
- 5
system/includes/functions.php View File

@ -513,7 +513,7 @@ function get_posts($posts, $page = 1, $perpage = 0)
$more = explode('<!--more-->', $content); $more = explode('<!--more-->', $content);
if (isset($more['1'])) { if (isset($more['1'])) {
$content = $more['0'] . '<a id="more"></a><br>' . "\n\n" . '<!--more-->' . $more['1'];
$content = $more['0'] . '<!--more--><div class="more-wrapper"><a id="more"></a></div>' . $more['1'];
} }
// Get the contents and convert it to HTML // Get the contents and convert it to HTML
@ -2273,10 +2273,8 @@ function get_teaser($string, $url = null, $char = null)
if ($teaserType === 'full') { if ($teaserType === 'full') {
$readMore = explode('<!--more-->', $string); $readMore = explode('<!--more-->', $string);
if (isset($readMore['1'])) { if (isset($readMore['1'])) {
$patterns = array('<a id="more"></a><br>', '<p><a id="more"></a><br></p>');
$string = str_replace($patterns, '', $readMore['0']);
$string = replace_href($string, 'a', 'footnote-ref', $url);
return $string . '<p class="jump-link"><a class="read-more btn btn-cta-secondary" href="'. $url .'#more">' . $more . '</a></p>';
$string = replace_href($readMore['0'], 'a', 'footnote-ref', $url);
return $string . '<div class="jump-link"><a class="read-more btn btn-cta-secondary" href="'. $url .'#more">' . $more . '</a></div>';
} else { } else {
return $string; return $string;
} }


Loading…
Cancel
Save