Skip to content

Commit

Permalink
fix: line break exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
n0099 authored Apr 27, 2022
1 parent 0c7bd0a commit 19b2118
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/theme-widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public function widget($args, $instance)
{
$introduce = !empty(get_the_author_meta('description', '1')) ? get_the_author_meta('description', '1') : __('这个人很懒,什么都没留下', 'kratos');
$username = get_the_author_meta('display_name', '1');
$avatar = get_avatar_url('1');
$avatar = get_avatar_url('1', ['size' => '300']);
$background = !empty($instance['background']) ? $instance['background'] : ASSET_PATH . '/assets/img/about-background.png';

echo '<div class="widget w-about">';
Expand All @@ -314,6 +314,7 @@ public function widget($args, $instance)
if (kratos_option('g_login', true)) {
echo '</a>';
}
$introduce = str_replace("\n", '<br>', $introduce);
echo '</div><div class="textwidget text-center"><p class="username">' . $username . '</p><p class="about">' . $introduce . '</p></div>';
echo '</div>';
}
Expand Down

0 comments on commit 19b2118

Please sign in to comment.