From 457701a907fa5e36bf06135e8bb4bb04a80dc4d5 Mon Sep 17 00:00:00 2001 From: Seph Date: Fri, 26 Apr 2024 17:47:19 +0200 Subject: [PATCH] CharSearch --- theme/functions.php | 12 +- theme/header.php | 7 +- theme/index.php | 2 +- theme/plugins/wowpress-icons.php | 17 -- theme/single.php | 139 +++++++++--- .../components/class-button.php | 0 .../components/raid-signup.php | 0 .../components/toggle-button.php | 4 +- theme/template-parts/content/content.php | 2 +- .../template-parts/layout/header-content.php | 6 +- theme/template-parts/widgets/char_search.php | 38 +++- theme/template-parts/widgets/raid_signup.php | 4 +- theme/wowpress/Frontend/ToggleButton.php | 4 +- .../Frontend/Widgets/CharacterSearch.php | 204 ++++++++++++++++-- theme/wowpress/Models/Character.php | 15 +- theme/wowpress/Models/Signup.php | 8 +- 16 files changed, 377 insertions(+), 85 deletions(-) delete mode 100644 theme/plugins/wowpress-icons.php rename theme/{ => template-parts}/components/class-button.php (100%) rename theme/{ => template-parts}/components/raid-signup.php (100%) rename theme/{ => template-parts}/components/toggle-button.php (80%) diff --git a/theme/functions.php b/theme/functions.php index e89f560..cbac8d0 100644 --- a/theme/functions.php +++ b/theme/functions.php @@ -242,6 +242,7 @@ function wowpress_enqueue_block_editor_script() 'wp-blocks', 'wp-edit-post', ), + WOWPRESS_VERSION, true ); @@ -295,7 +296,6 @@ require get_template_directory() . '/inc/template-tags.php'; require get_template_directory() . '/inc/template-functions.php'; require get_template_directory() . '/inc/config-functions.php'; require get_template_directory() . '/plugins/wowpress-navwalker.php'; -require get_template_directory() . '/plugins/wowpress-icons.php'; /** * Hide Admin Bar @@ -470,4 +470,12 @@ function wowpress_add_category_meta($taxonomy) /** Avatar Filters */ add_filter('get_avatar_url', '\WoWPress\Models\User::getAvatar', 10, 3); - add_filter('asgarosforum_filter_username', '\WoWPress\Models\User::getUsername', 10, 2); \ No newline at end of file + add_filter('asgarosforum_filter_username', '\WoWPress\Models\User::getUsername', 10, 2); + + /** Login redirect */ + add_filter('login_redirect', fn() => "/"); + + function sanitize($word){ + $char = new Character(); + return $char->sanitize($word); + } \ No newline at end of file diff --git a/theme/header.php b/theme/header.php index dd4a33d..be72d9a 100644 --- a/theme/header.php +++ b/theme/header.php @@ -33,17 +33,20 @@ global $user; >