From 6b7466f42bd50fd4ad49258214887bdb6414d241 Mon Sep 17 00:00:00 2001 From: nanhaoluo <3075912108@qq.com> Date: Fri, 16 Jan 2026 00:23:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=92=8C=E4=BC=98=E5=8C=96=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复 argon_get_locate() 函数缺失返回语句的问题 - 优化 content-single.php 中重复的 get_option 调用(4次→1次) - 优化 content-page.php 中重复的 get_option 调用(4次→1次) - 优化 content-timeline.php 中重复的 get_option 调用(4次→1次) - 优化 post-actions.php 中重复的 get_option 调用(4次→1次) --- functions.php | 1 + template-parts/content-page.php | 9 +++++---- template-parts/content-single.php | 9 +++++---- template-parts/content-timeline.php | 9 +++++---- template-parts/post-actions.php | 9 +++++---- 5 files changed, 21 insertions(+), 16 deletions(-) diff --git a/functions.php b/functions.php index cf1b0be..12355cf 100644 --- a/functions.php +++ b/functions.php @@ -161,6 +161,7 @@ function argon_get_locate(){ if (is_admin()){ $determined_locale = get_user_locale(); } + return argon_locate_filter($determined_locale); } function theme_locale_hook($locate, $domain){ if ($domain == 'argon'){ diff --git a/template-parts/content-page.php b/template-parts/content-page.php index 98bc154..6579415 100644 --- a/template-parts/content-page.php +++ b/template-parts/content-page.php @@ -1,12 +1,13 @@
> -
"> + +
"> "; echo "
"; } - if (argon_has_post_thumbnail() && get_option('argon_show_thumbnail_in_banner_in_content_page') == 'true'){ + if (argon_has_post_thumbnail() && $show_thumbnail_in_banner == 'true'){ $thumbnail_url = argon_get_post_thumbnail(); echo "