diff --git a/functions.php b/functions.php index 62e1beaa..684ca546 100644 --- a/functions.php +++ b/functions.php @@ -174,6 +174,12 @@ if (class_exists('\AKSRT\User\Restriction')) { if (class_exists('\AKSRT\User\Center')) { \AKSRT\User\Center::get_instance()->init(); } +if (class_exists('\AKSRT\User\Badges')) { + \AKSRT\User\Badges::get_instance()->init(); +} +if (class_exists('\AKSRT\User\BadgeAutoAward')) { + \AKSRT\User\BadgeAutoAward::get_instance()->init(); +} if (class_exists('\AKSRT\User\Home')) { \AKSRT\User\Home::get_instance()->init(); } diff --git a/src/AKSRT/Credits/Signin.php b/src/AKSRT/Credits/Signin.php index 02ea8c4b..ffd5684c 100644 --- a/src/AKSRT/Credits/Signin.php +++ b/src/AKSRT/Credits/Signin.php @@ -168,6 +168,7 @@ class Signin { update_user_meta($user_id, 'checkin_all_day', $all_day); // zibll alias update_user_meta($user_id, 'aksrt_checkin_continuous_day', $new_streak); update_user_meta($user_id, 'checkin_continuous_day', $new_streak); // zibll alias + do_action('aksrt_checkin_done', $user_id); return new \WP_REST_Response([ 'success' => true, diff --git a/src/AKSRT/Widgets/SearchWidget.php b/src/AKSRT/Widgets/SearchWidget.php index c986b90b..394da33f 100644 --- a/src/AKSRT/Widgets/SearchWidget.php +++ b/src/AKSRT/Widgets/SearchWidget.php @@ -26,6 +26,7 @@ class SearchWidget extends \WP_Widget { $placeholder = sanitize_text_field((string) ($instance['placeholder'] ?? __('开启精彩搜索', 'aksrt'))); $show_kw = !empty($instance['show_keywords']); + $show_history = !empty($instance['show_history']); $kw_title = sanitize_text_field((string) ($instance['keywords_title'] ?? __('热门搜索', 'aksrt'))); $more_but = sanitize_text_field((string) ($instance['more_but'] ?? '')); $more_url = esc_url_raw(trim((string) ($instance['more_but_url'] ?? ''))); @@ -54,6 +55,12 @@ class SearchWidget extends \WP_Widget { + +
+