diff --git a/404.php b/404.php
index b380186..c3b8f59 100644
--- a/404.php
+++ b/404.php
@@ -3,7 +3,19 @@
-
+
diff --git a/assets/vendor/external/config.json b/assets/vendor/external/config.json
new file mode 100644
index 0000000..a3e9e80
--- /dev/null
+++ b/assets/vendor/external/config.json
@@ -0,0 +1,59 @@
+{
+ "version": "1.4.0",
+ "resources": {
+ "fonts": {
+ "google_fonts_open_sans": {
+ "primary": "//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700",
+ "fallback": "/wp-content/themes/argon/assets/vendor/external/fonts/open-sans.css",
+ "description": "Open Sans 字体"
+ },
+ "google_fonts_noto_serif": {
+ "primary": "//fonts.googleapis.com/css?family=Noto+Serif+SC:300,600&display=swap",
+ "fallback": "/wp-content/themes/argon/assets/vendor/external/fonts/noto-serif-sc.css",
+ "description": "Noto Serif SC 字体"
+ }
+ },
+ "scripts": {
+ "geetest": {
+ "primary": "https://static.geetest.com/v4/gt4.js",
+ "fallback": "/wp-content/themes/argon/assets/vendor/external/geetest/gt4.js",
+ "description": "极验验证码"
+ },
+ "qrcode": {
+ "primary": "https://cdn.jsdelivr.net/npm/qrcodejs@1.0.0/qrcode.min.js",
+ "fallback": "/wp-content/themes/argon/assets/vendor/external/qrcode/qrcode.min.js",
+ "description": "二维码生成器"
+ },
+ "mathjax3": {
+ "primary": "//cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js",
+ "fallback": null,
+ "description": "MathJax 3.0 数学公式渲染"
+ },
+ "mathjax2": {
+ "primary": "//cdn.jsdelivr.net/npm/mathjax@2.7.5/MathJax.js?config=TeX-AMS_HTML",
+ "fallback": null,
+ "description": "MathJax 2.0 数学公式渲染"
+ },
+ "katex_css": {
+ "primary": "//cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css",
+ "fallback": null,
+ "description": "KaTeX CSS"
+ },
+ "katex_js": {
+ "primary": "//cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js",
+ "fallback": null,
+ "description": "KaTeX JS"
+ },
+ "katex_auto_render": {
+ "primary": "//cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js",
+ "fallback": null,
+ "description": "KaTeX 自动渲染"
+ }
+ }
+ },
+ "settings": {
+ "timeout": 5000,
+ "retry_count": 2,
+ "enable_console_log": true
+ }
+}
\ No newline at end of file
diff --git a/assets/vendor/external/fonts/noto-serif-sc.css b/assets/vendor/external/fonts/noto-serif-sc.css
new file mode 100644
index 0000000..fc9ef3e
--- /dev/null
+++ b/assets/vendor/external/fonts/noto-serif-sc.css
@@ -0,0 +1,16 @@
+/* Noto Serif SC Font - Local Fallback */
+@font-face {
+ font-family: 'Noto Serif SC';
+ font-style: normal;
+ font-weight: 300;
+ font-display: swap;
+ src: local('Noto Serif SC Light'), local('NotoSerifSC-Light');
+}
+
+@font-face {
+ font-family: 'Noto Serif SC';
+ font-style: normal;
+ font-weight: 600;
+ font-display: swap;
+ src: local('Noto Serif SC SemiBold'), local('NotoSerifSC-SemiBold');
+}
\ No newline at end of file
diff --git a/assets/vendor/external/fonts/open-sans.css b/assets/vendor/external/fonts/open-sans.css
new file mode 100644
index 0000000..9377d95
--- /dev/null
+++ b/assets/vendor/external/fonts/open-sans.css
@@ -0,0 +1,32 @@
+/* Open Sans Font - Local Fallback */
+@font-face {
+ font-family: 'Open Sans';
+ font-style: normal;
+ font-weight: 300;
+ font-display: swap;
+ src: local('Open Sans Light'), local('OpenSans-Light');
+}
+
+@font-face {
+ font-family: 'Open Sans';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: local('Open Sans Regular'), local('OpenSans-Regular');
+}
+
+@font-face {
+ font-family: 'Open Sans';
+ font-style: normal;
+ font-weight: 600;
+ font-display: swap;
+ src: local('Open Sans SemiBold'), local('OpenSans-SemiBold');
+}
+
+@font-face {
+ font-family: 'Open Sans';
+ font-style: normal;
+ font-weight: 700;
+ font-display: swap;
+ src: local('Open Sans Bold'), local('OpenSans-Bold');
+}
\ No newline at end of file
diff --git a/assets/vendor/external/geetest/gt4.js b/assets/vendor/external/geetest/gt4.js
new file mode 100644
index 0000000..50a9f2b
--- /dev/null
+++ b/assets/vendor/external/geetest/gt4.js
@@ -0,0 +1,46 @@
+/* Geetest GT4 - Local Fallback */
+(function() {
+ 'use strict';
+
+ // 简化的 Geetest 备用实现
+ window.initGeetest4 = function(config, callback) {
+ console.warn('Geetest GT4 本地备用版本 - 功能受限');
+
+ // 创建一个简单的验证码替代
+ var captcha = {
+ appendTo: function(selector) {
+ var container = document.querySelector(selector);
+ if (container) {
+ container.innerHTML = '' +
+ '
验证码服务暂时不可用,请稍后重试
' +
+ '
' +
+ '
';
+ }
+ return this;
+ },
+ onReady: function(fn) {
+ setTimeout(fn, 100);
+ return this;
+ },
+ onSuccess: function(fn) {
+ // 模拟成功回调
+ return this;
+ },
+ onError: function(fn) {
+ return this;
+ },
+ getValidate: function() {
+ return {
+ lot_number: 'fallback_' + Date.now(),
+ captcha_output: 'fallback_output',
+ pass_token: 'fallback_token',
+ gen_time: Date.now()
+ };
+ }
+ };
+
+ if (typeof callback === 'function') {
+ callback(captcha);
+ }
+ };
+})();
\ No newline at end of file
diff --git a/assets/vendor/external/qrcode/qrcode.min.js b/assets/vendor/external/qrcode/qrcode.min.js
new file mode 100644
index 0000000..df97205
--- /dev/null
+++ b/assets/vendor/external/qrcode/qrcode.min.js
@@ -0,0 +1,33 @@
+/* QRCode.js - Local Fallback */
+(function() {
+ 'use strict';
+
+ // 简化的 QRCode 备用实现
+ window.QRCode = function(element, options) {
+ this.element = typeof element === 'string' ? document.getElementById(element) : element;
+ this.options = options || {};
+
+ if (this.element) {
+ this.element.innerHTML = '' +
+ '二维码生成器
暂时不可用
';
+ }
+
+ return this;
+ };
+
+ // 添加基本方法
+ window.QRCode.prototype = {
+ makeCode: function(text) {
+ console.warn('QRCode 本地备用版本 - 功能受限');
+ if (this.element) {
+ this.element.innerHTML = '' +
+ text + '
';
+ }
+ },
+ clear: function() {
+ if (this.element) {
+ this.element.innerHTML = '';
+ }
+ }
+ };
+})();
\ No newline at end of file
diff --git a/assets/vendor/external/resource-loader.js b/assets/vendor/external/resource-loader.js
new file mode 100644
index 0000000..1aff9dd
--- /dev/null
+++ b/assets/vendor/external/resource-loader.js
@@ -0,0 +1,127 @@
+/* 外部资源加载器 - 自动备用机制 */
+(function() {
+ 'use strict';
+
+ window.ArgonResourceLoader = {
+ // 资源映射表
+ resourceMap: {
+ 'fonts.googleapis.com/css?family=Open+Sans': '/wp-content/themes/argon/assets/vendor/external/fonts/open-sans.css',
+ 'fonts.googleapis.com/css?family=Noto+Serif+SC': '/wp-content/themes/argon/assets/vendor/external/fonts/noto-serif-sc.css',
+ 'static.geetest.com/v4/gt4.js': '/wp-content/themes/argon/assets/vendor/external/geetest/gt4.js',
+ 'cdn.jsdelivr.net/npm/qrcodejs@1.0.0/qrcode.min.js': '/wp-content/themes/argon/assets/vendor/external/qrcode/qrcode.min.js'
+ },
+
+ // 加载CSS资源
+ loadCSS: function(url, fallbackUrl) {
+ return new Promise(function(resolve, reject) {
+ var link = document.createElement('link');
+ link.rel = 'stylesheet';
+ link.href = url;
+
+ var timeout = setTimeout(function() {
+ console.warn('CSS资源加载超时,使用本地备用:', url);
+ if (fallbackUrl) {
+ ArgonResourceLoader.loadCSS(fallbackUrl).then(resolve).catch(reject);
+ } else {
+ reject(new Error('CSS加载失败且无备用资源'));
+ }
+ }, 5000);
+
+ link.onload = function() {
+ clearTimeout(timeout);
+ resolve();
+ };
+
+ link.onerror = function() {
+ clearTimeout(timeout);
+ console.warn('CSS资源加载失败,使用本地备用:', url);
+ if (fallbackUrl) {
+ ArgonResourceLoader.loadCSS(fallbackUrl).then(resolve).catch(reject);
+ } else {
+ reject(new Error('CSS加载失败且无备用资源'));
+ }
+ };
+
+ document.head.appendChild(link);
+ });
+ },
+
+ // 加载JS资源
+ loadJS: function(url, fallbackUrl) {
+ return new Promise(function(resolve, reject) {
+ var script = document.createElement('script');
+ script.src = url;
+ script.async = true;
+
+ var timeout = setTimeout(function() {
+ console.warn('JS资源加载超时,使用本地备用:', url);
+ if (fallbackUrl) {
+ ArgonResourceLoader.loadJS(fallbackUrl).then(resolve).catch(reject);
+ } else {
+ reject(new Error('JS加载失败且无备用资源'));
+ }
+ }, 5000);
+
+ script.onload = function() {
+ clearTimeout(timeout);
+ resolve();
+ };
+
+ script.onerror = function() {
+ clearTimeout(timeout);
+ console.warn('JS资源加载失败,使用本地备用:', url);
+ if (fallbackUrl) {
+ ArgonResourceLoader.loadJS(fallbackUrl).then(resolve).catch(reject);
+ } else {
+ reject(new Error('JS加载失败且无备用资源'));
+ }
+ };
+
+ document.head.appendChild(script);
+ });
+ },
+
+ // 智能加载资源
+ smartLoad: function(url, type) {
+ var fallbackUrl = null;
+
+ // 查找备用资源
+ for (var key in this.resourceMap) {
+ if (url.indexOf(key) !== -1) {
+ fallbackUrl = this.resourceMap[key];
+ break;
+ }
+ }
+
+ if (type === 'css') {
+ return this.loadCSS(url, fallbackUrl);
+ } else if (type === 'js') {
+ return this.loadJS(url, fallbackUrl);
+ }
+ }
+ };
+
+ // 自动替换现有的资源加载
+ var originalCreateElement = document.createElement;
+ document.createElement = function(tagName) {
+ var element = originalCreateElement.call(document, tagName);
+
+ if (tagName.toLowerCase() === 'script') {
+ var originalSetAttribute = element.setAttribute;
+ element.setAttribute = function(name, value) {
+ if (name === 'src' && value) {
+ // 检查是否需要备用资源
+ for (var key in ArgonResourceLoader.resourceMap) {
+ if (value.indexOf(key) !== -1) {
+ console.log('检测到外部JS资源,准备备用方案:', value);
+ break;
+ }
+ }
+ }
+ return originalSetAttribute.call(this, name, value);
+ };
+ }
+
+ return element;
+ };
+})();
\ No newline at end of file
diff --git a/comments.php b/comments.php
index 6c6d3a3..c6779eb 100644
--- a/comments.php
+++ b/comments.php
@@ -57,7 +57,36 @@ if (argon_is_comment_captcha_enabled() && get_option('argon_captcha_type', 'math
$captcha_id = get_option('argon_geetest_captcha_id', '');
if (!empty($captcha_id)) {
?>
-
+
';
+ }
// 加载 argon_js_merged(包含 jQuery 和其他库)
wp_enqueue_script("argon_js_merged", $GLOBALS['assets_path'] . "/assets/argon_js_merged.js", null, $GLOBALS['theme_version']);
diff --git a/info.json b/info.json
index c6adc69..9af9c18 100644
--- a/info.json
+++ b/info.json
@@ -1,5 +1,5 @@
{
- "version": "1.3.5",
- "details_url": "https://github.com/solstice23/argon-theme/releases",
- "download_url": "https://github.com/solstice23/argon-theme/releases/download/v1.3.5/argon.zip"
+ "version": "1.4.0",
+ "details_url": "https://github.com/nanhaoluo/argon-theme/releases",
+ "download_url": "https://github.com/nanhaoluo/argon-theme/releases/download/v1.4.0/argon.zip"
}
diff --git a/sidebar.php b/sidebar.php
index 7bc55a3..ea3df1f 100644
--- a/sidebar.php
+++ b/sidebar.php
@@ -780,7 +780,19 @@ $author_desc = get_option('argon_sidebar_author_description');
?>
-
+
diff --git a/style.css b/style.css
index 3ab75f8..2a3c749 100644
--- a/style.css
+++ b/style.css
@@ -8,7 +8,7 @@ Author URI: https://solstice23.top/
Description: 轻盈、简洁、美观的 Wordpress 主题
-Version: 1.3.5
+Version: 1.4.0
License: GNU General Public License v3.0
diff --git a/unsubscribe-comment-mailnotice.php b/unsubscribe-comment-mailnotice.php
index 0536547..a7f010c 100644
--- a/unsubscribe-comment-mailnotice.php
+++ b/unsubscribe-comment-mailnotice.php
@@ -33,7 +33,19 @@
-
+