From 4c1279c5ae94b24d7228c9f7db4bdee16eba64d6 Mon Sep 17 00:00:00 2001 From: Seaton Jiang Date: Fri, 20 Aug 2021 13:04:48 +0800 Subject: [PATCH] fix: robors function --- inc/theme-setting.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/theme-setting.php b/inc/theme-setting.php index 763120a..4d2d125 100644 --- a/inc/theme-setting.php +++ b/inc/theme-setting.php @@ -86,8 +86,8 @@ add_filter('robots_txt', function ($output, $public) { if ('0' == $public) { return "User-agent: *\nDisallow: /\n"; } else { - if (!empty(kratos_option('seo_robots'))) { - $output = esc_attr(strip_tags(kratos_option('seo_robots'))); + if (!empty(kratos_option('seo_robots', getrobots(), 'seo_robots_fieldset'))) { + $output = esc_attr(strip_tags(kratos_option('seo_robots', getrobots(), 'seo_robots_fieldset'))); } return $output; }