diff --git a/src/Widgets/WidgetAuthorCard.php b/src/Widgets/WidgetAuthorCard.php index 2138ab2f..a58c3a98 100644 --- a/src/Widgets/WidgetAuthorCard.php +++ b/src/Widgets/WidgetAuthorCard.php @@ -85,9 +85,8 @@ class WidgetAuthorCard extends \WP_Widget { echo ''; } $cuid = get_current_user_id(); - $show_follow = !isset($instance['show_follow']) || !empty($instance['show_follow']); echo '
'; - if ($show_follow && $cuid > 0 && $cuid !== $author_id && class_exists('\AKSRT\User\Follow')) { + if ($cuid > 0 && $cuid !== $author_id && class_exists('\AKSRT\User\Follow')) { $following = \AKSRT\User\Follow::get_instance()->is_following($cuid, $author_id); $label = $following ? __('已关注', 'aksrt') : __('关注', 'aksrt'); echo ''; @@ -105,8 +104,7 @@ class WidgetAuthorCard extends \WP_Widget { ?>

-
- +

!empty($new_instance['show_stats']) ? 1 : 0, - 'show_follow' => !empty($new_instance['show_follow']) ? 1 : 0, ]; } }