diff --git a/inc/theme-article.php b/inc/theme-article.php index a4d0c90..5fae592 100644 --- a/inc/theme-article.php +++ b/inc/theme-article.php @@ -4,7 +4,7 @@ * 文章相关函数 * @author Seaton Jiang * @license GPL-3.0 License - * @version 2022.05.01 + * @version 2022.11.27 */ // 文章链接添加 target 和 rel @@ -12,7 +12,7 @@ function content_nofollow($content) { $regexp = "]*href=['\"][^#]([^'\"]*?)\\1[^>]*>"; if (preg_match_all("/$regexp/siU", $content, $matches, PREG_SET_ORDER)) { - if (!empty($matches)) { + if (!empty($matches) && !empty(get_option('siteurl'))) { $srcUrl = get_option('siteurl'); for ($i = 0; $i < count($matches); $i++) { $tag = $matches[$i][0];