Meta description for profile page

This commit is contained in:
danpros 2024-03-31 14:32:30 +07:00
commit cb39378b5a
4 changed files with 22 additions and 5 deletions

View file

@ -445,9 +445,11 @@ function get_posts($posts, $page = 1, $perpage = 0)
$profile = get_author($author);
if (isset($profile[0])) {
$post->authorName = $profile[0]->name;
$post->authorDescription = $profile[0]->description;
$post->authorAbout = $profile[0]->about;
} else {
$post->authorName = $author;
$post->authorDescription = i18n('Author_Description');
$post->authorAbout = i18n('Author_Description');
}
@ -1221,7 +1223,7 @@ function get_author($name)
// Get the contents and convert it to HTML
$author->about = MarkdownExtra::defaultTransform(remove_html_comments($content));
$author->description = safe_html(strip_tags($author->about));
$author->description = get_content_tag("d", $content, get_description($author->about));
$toc = explode('<!--toc-->', $author->about);
if (isset($toc['1'])) {