fix: robors function

pull/409/head^2
Seaton Jiang 2021-08-20 13:04:48 +08:00
parent aed50cfa5e
commit 4c1279c5ae
No known key found for this signature in database
GPG Key ID: 0E05070D261ACFEA
1 changed files with 2 additions and 2 deletions

View File

@ -86,8 +86,8 @@ add_filter('robots_txt', function ($output, $public) {
if ('0' == $public) { if ('0' == $public) {
return "User-agent: *\nDisallow: /\n"; return "User-agent: *\nDisallow: /\n";
} else { } else {
if (!empty(kratos_option('seo_robots'))) { if (!empty(kratos_option('seo_robots', getrobots(), 'seo_robots_fieldset'))) {
$output = esc_attr(strip_tags(kratos_option('seo_robots'))); $output = esc_attr(strip_tags(kratos_option('seo_robots', getrobots(), 'seo_robots_fieldset')));
} }
return $output; return $output;
} }