From 79c921f853b3e617c17eafe50897d997fcf84423 Mon Sep 17 00:00:00 2001 From: Yaosanqi137 Date: Mon, 2 Mar 2026 02:08:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BD=91=E7=AB=99=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E5=92=8C=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/functions.php b/functions.php index 2947731..925876a 100644 --- a/functions.php +++ b/functions.php @@ -20,6 +20,35 @@ function itstudio_theme_setup() { } add_action('after_setup_theme', 'itstudio_theme_setup'); +function itstudio_apply_site_identity() { + $site_name = base64_decode('54ix54m55bel5L2c5a6k'); + $site_tagline = base64_decode('54ix54m55bel5L2c5a6k5a6Y5pa5572R56uZ'); + + if (get_option('blogname') !== $site_name) { + update_option('blogname', $site_name); + } + + if (get_option('blogdescription') !== $site_tagline) { + update_option('blogdescription', $site_tagline); + } +} +add_action('init', 'itstudio_apply_site_identity', 20); + +function itstudio_output_favicon() { + $favicon_url = get_template_directory_uri() . '/resources/it_logo_2024.svg'; + echo '' . "\n"; + echo '' . "\n"; +} +function itstudio_disable_default_site_icon() { + remove_action('wp_head', 'wp_site_icon', 99); + remove_action('admin_head', 'wp_site_icon', 99); + remove_action('login_head', 'wp_site_icon', 99); +} +add_action('init', 'itstudio_disable_default_site_icon'); +add_action('wp_head', 'itstudio_output_favicon', 1); +add_action('admin_head', 'itstudio_output_favicon', 1); +add_action('login_head', 'itstudio_output_favicon', 1); + function itstudio_enqueue_scripts() { // 基础样式 (Style.css) wp_enqueue_style('itstudio-style', get_stylesheet_uri(), array(), '2.1.2');