From 19b21185739e612ba4e93cb69240311fa057ccf6 Mon Sep 17 00:00:00 2001 From: n0099 Date: Wed, 27 Apr 2022 18:21:46 +0800 Subject: [PATCH] fix: line break exceptions --- inc/theme-widgets.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/theme-widgets.php b/inc/theme-widgets.php index f76dd03..13ac9d2 100644 --- a/inc/theme-widgets.php +++ b/inc/theme-widgets.php @@ -298,7 +298,7 @@ class widget_about extends WP_Widget { $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 '
'; @@ -314,6 +314,7 @@ class widget_about extends WP_Widget if (kratos_option('g_login', true)) { echo ''; } + $introduce = str_replace("\n", '
', $introduce); echo '

' . $username . '

' . $introduce . '

'; echo ''; }