Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/readme.md b/readme.md
index 5a45d2c..27a783d 100644
--- a/readme.md
+++ b/readme.md
@@ -1,7 +1,7 @@
# WP-China-Yes
## 简介
-WP中国本土化社区([WP-China.org][0])出品,旨在将你的WordPress一键接入到本土生态体系中
+LitePress社区([litepress.cn][0])出品,旨在将你的WordPress一键接入到本土生态体系中
## 安装
如果你期望参与测试,可以直接Clone Master分支中的代码,此处是功能模块基本完整的测试版本。
@@ -9,7 +9,7 @@ WP中国本土化社区([WP-China.org][0])出品,旨在将你的WordPress
若期望用于正式环境请移步[发布列表][1],下载最新稳定版的压缩包后直接访问[http://你的域名/wp-admin/plugin-install.php][2],然后点击页面左上角的“上传插件”,上传安装即可。
## 插件截图
-
+
## 主要特性
- 对来自wordpress.org的所有外部服务进行加速
diff --git a/wp-china-yes.php b/wp-china-yes.php
index 8007524..98c772b 100644
--- a/wp-china-yes.php
+++ b/wp-china-yes.php
@@ -2,9 +2,9 @@
/**
* Plugin Name: WP-China-Yes
* Description: 将你的WordPress接入本土生态体系中,这将为你提供一个更贴近中国人使用习惯的WordPress
- * Author: WP中国本土化社区
- * Author URI:https://wp-china.org/
- * Version: 3.5.4
+ * Author: LitePress社区
+ * Author URI:https://litepress.cn/
+ * Version: 3.5.5
* Network: True
* License: GPLv3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -53,7 +53,6 @@ if ( ! class_exists( 'WP_CHINA_YES' ) ) {
update_option( "super_gravatar", get_option( 'super_gravatar' ) ?: '1' );
update_option( "super_googlefonts", get_option( 'super_googlefonts' ) ?: '2' );
update_option( "super_googleajax", get_option( 'super_googleajax' ) ?: '2' );
- update_option( "super_cdnjs", get_option( 'super_cdnjs' ) ?: '2' );
/**
@@ -65,7 +64,6 @@ if ( ! class_exists( 'WP_CHINA_YES' ) ) {
delete_option( "super_gravatar" );
delete_option( "super_googlefonts" );
delete_option( "super_googleajax" );
- delete_option( "super_cdnjs" );
} );
@@ -96,7 +94,7 @@ if ( ! class_exists( 'WP_CHINA_YES' ) ) {
) {
$this->page_str_replace( 'preg_replace', [
'~' . home_url( '/' ) . '(wp-admin|wp-includes)/(css|js)/~',
- sprintf( 'https://wpstatic.cdn.wepublish.cn/%s/$1/$2/', $GLOBALS['wp_version'] )
+ sprintf('https://a2.wp-china-yes.net/WordPress@%s/$1/$2/', $GLOBALS['wp_version'])
], get_option( 'super_admin' ) );
}
}
@@ -123,11 +121,6 @@ if ( ! class_exists( 'WP_CHINA_YES' ) ) {
* super_googlefonts用以标记用户是否启用谷歌字体加速功能
*/
register_setting( 'wpcy', 'super_googlefonts' );
-
- /**
- * super_cdnjs用以标记用户是否启用CDNJS加速功能
- */
- register_setting( 'wpcy', 'super_cdnjs' );
add_settings_section(
'wpcy_section_main',
@@ -175,14 +168,7 @@ if ( ! class_exists( 'WP_CHINA_YES' ) ) {
'wpcy',
'wpcy_section_main'
);
-
- add_settings_field(
- 'wpcy_field_select_super_cdnjs',
- '加速CDNJS前端公共库',
- [ $this, 'field_super_cdnjs_cb' ],
- 'wpcy',
- 'wpcy_section_main'
- );
+
} );
/**
@@ -221,34 +207,25 @@ if ( ! class_exists( 'WP_CHINA_YES' ) ) {
if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
/**
- * 替换谷歌字体为WePublish维护的加速节点
+ * 替换谷歌字体为 LitePress 维护的加速节点
*/
if ( get_option( 'super_googlefonts' ) != 2 ) {
$this->page_str_replace( 'str_replace', [
'fonts.googleapis.com',
- 'gfont.cdn.wepublish.cn'
+ 'googlefonts.wp-china-yes.net'
], get_option( 'super_googlefonts' ) );
}
/**
- * 替换谷歌前端公共库为WePublish维护的加速节点
+ * 替换谷歌前端公共库为 LitePress 维护的加速节点
*/
if ( get_option( 'super_googleajax' ) != 2 ) {
$this->page_str_replace( 'str_replace', [
'ajax.googleapis.com',
- 'gajax.cdn.wepublish.cn'
+ 'googleajax.wp-china-yes.net'
], get_option( 'super_googleajax' ) );
}
-
- /**
- * 替换CDNJS前端公共库为WePublish维护的加速节点
- */
- if ( get_option( 'super_cdnjs' ) != 2 ) {
- $this->page_str_replace( 'str_replace', [
- 'cdnjs.cloudflare.com/ajax/libs',
- 'cdnjs.cdn.wepublish.cn'
- ], get_option( 'super_cdnjs' ) );
- }
+
}
/**
@@ -337,10 +314,6 @@ if ( ! class_exists( 'WP_CHINA_YES' ) ) {
public function field_super_googleajax_cb() {
$this->field_cb( 'super_googleajax', '请只在包含谷歌前端公共库的情况下才启用该选项,以免造成不必要的性能损失' );
}
-
- public function field_super_cdnjs_cb() {
- $this->field_cb( 'super_cdnjs', '请只在包含CDNJS前端公共库的情况下才启用该选项,以免造成不必要的性能损失' );
- }
public function options_page_html() {
if ( $_SERVER['REQUEST_METHOD'] === 'POST' ) {
@@ -349,7 +322,6 @@ if ( ! class_exists( 'WP_CHINA_YES' ) ) {
update_option( "super_gravatar", sanitize_text_field( $_POST['super_gravatar'] ) );
update_option( "super_googlefonts", sanitize_text_field( $_POST['super_googlefonts'] ) );
update_option( "super_googleajax", sanitize_text_field( $_POST['super_googleajax'] ) );
- update_option( "super_cdnjs", sanitize_text_field( $_POST['super_cdnjs'] ) );
echo '';
}
@@ -371,7 +343,7 @@ if ( ! class_exists( 'WP_CHINA_YES' ) ) {
- WP中国本土化社区的使命是帮助WordPress在中国建立起良好的本土生态环境,以求推进行业整体发展,做大市场蛋糕。
+ LitePress社区的使命是帮助WordPress在中国建立起良好的本土生态环境,以求推进行业整体发展,做大市场蛋糕。
特别感谢知更鸟、薇晓朵团队、AppNode在项目萌芽期给予的帮助。
From d01723c7373f9b026547ab3d3a306a7e4c794d8a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=99=E9=94=A1=E6=BA=90?=
Date: Tue, 15 Nov 2022 00:05:27 +0800
Subject: [PATCH 065/120] =?UTF-8?q?=E7=89=B9=E6=80=A7=EF=BC=9A=E6=8F=90?=
=?UTF-8?q?=E9=AB=98=E4=BB=93=E5=BA=93=E6=BA=90=E6=9B=BF=E6=8D=A2=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E7=9A=84=E4=BC=98=E5=85=88=E7=BA=A7=EF=BC=8C=E9=81=BF?=
=?UTF-8?q?=E5=85=8D=E8=A2=AB=E8=A6=86=E7=9B=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
wp-china-yes.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wp-china-yes.php b/wp-china-yes.php
index 98c772b..bb73864 100644
--- a/wp-china-yes.php
+++ b/wp-china-yes.php
@@ -201,7 +201,7 @@ if ( ! class_exists( 'WP_CHINA_YES' ) ) {
}
return wp_remote_request( $url, $r );
- }, 1, 3 );
+ }, 999999, 3 );
}
From af8107006b9b05d169aaeee4b72146521e3c68cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=99=E9=94=A1=E6=BA=90?=
Date: Tue, 15 Nov 2022 00:48:45 +0800
Subject: [PATCH 066/120] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=9B=BF?=
=?UTF-8?q?=E6=8D=A2=20WP=20China=20=E9=93=BE=E6=8E=A5=E5=8F=8A=E6=8F=8F?=
=?UTF-8?q?=E8=BF=B0=E4=B8=BA=20LitePress?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
readme.md | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/readme.md b/readme.md
index 27a783d..4052949 100644
--- a/readme.md
+++ b/readme.md
@@ -14,7 +14,7 @@ LitePress社区([litepress.cn][0])出品,旨在将你的WordPress一键接
## 主要特性
- 对来自wordpress.org的所有外部服务进行加速
- 对来自谷歌公共库的一些服务进行加速
- - 对接[本土翻译平台][3],为WordPress本身及官方应用市场中的所有应用推送基于AI翻译+人工辅助校准的全量汉化包
+ - 对接[LitePress翻译平台][3],为WordPress本身及官方应用市场中的所有应用推送基于AI翻译+人工辅助校准的全量汉化包
- 使WordPress内置应用市场支持中文作品信息展示及中文语义化搜索(开发中)
- 使WordPress内置应用市场中支持选购国内开发者所推出的优秀作品并享受集成式的安装及更新推送服务(开发中)
@@ -24,7 +24,7 @@ LitePress社区([litepress.cn][0])出品,旨在将你的WordPress一键接
你可以选择以下三种方式反馈问题:
1. 提交一个[Issue][4]
- 2. 在本土化社区的[论坛][5]中提交一个帖子
+ 2. 在LitePress社区的[论坛][5]中提交一个帖子
3. 加项目交流QQ群:1046115671
无论选择何种方式提交问题,都希望你可以详细描述问题的表现及触发条件,这样对减少交流成本及快速定位问题有很大好处。
@@ -44,14 +44,14 @@ LitePress社区([litepress.cn][0])出品,旨在将你的WordPress一键接
-[0]: https://wp-china.org
+[0]: https://litepress.cn
-[1]: https://github.com/wp-china/wp-china-yes/releases
+[1]: https://github.com/litepress/wp-china-yes/releases
[2]: http://你的域名/wp-admin/plugin-install.php
-[3]: https://translate.wp-china.org
+[3]: https://litepress.cn/translate/
-[4]: https://github.com/wp-china/wp-china-yes/issues
+[4]: https://github.com/litepress/wp-china-yes/issues
-[5]: https://wp-china.org/forums
+[5]: https://litepress.cn/forums
From e1a6083779cf2d54737ba7f13cca92716aa6e281 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Fri, 8 Mar 2024 20:36:09 +0800
Subject: [PATCH 067/120] =?UTF-8?q?refactor:=20=E5=85=A8=E5=B1=80=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/ISSUE_TEMPLATE/bug_report.yml | 101 +++++
.github/ISSUE_TEMPLATE/config.yml | 5 +
.github/ISSUE_TEMPLATE/feature_request.yml | 55 +++
.github/workflows/update-changelog.yml | 31 ++
.gitignore | 1 +
CHANGELOG.md | 4 +
Plugin.php | 98 +++++
Service/Base.php | 29 ++
Service/Setting.php | 267 +++++++++++++
Service/Super.php | 324 ++++++++++++++++
Service/Update.php | 24 ++
composer.json | 24 ++
composer.lock | 113 ++++++
license | 2 +-
readme.md | 71 ++--
wp-china-yes.php | 416 ++-------------------
16 files changed, 1127 insertions(+), 438 deletions(-)
create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml
create mode 100644 .github/ISSUE_TEMPLATE/config.yml
create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml
create mode 100644 .github/workflows/update-changelog.yml
create mode 100644 .gitignore
create mode 100644 CHANGELOG.md
create mode 100644 Plugin.php
create mode 100644 Service/Base.php
create mode 100644 Service/Setting.php
create mode 100644 Service/Super.php
create mode 100644 Service/Update.php
create mode 100644 composer.json
create mode 100644 composer.lock
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 0000000..1d278bc
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,101 @@
+name: 报告问题 (Bug Report)
+description: 创建一个报告以帮助我们改进 (Create a report to help us improve)
+title: "[Bug Report]: "
+labels: ["bug"]
+
+body:
+ - type: markdown
+ attributes:
+ value: |
+ **请仅使用 简体中文 或 英文 进行填写**
+ **Please only use Simplified Chinese or English to fill in**
+ - type: checkboxes
+ id: checks
+ attributes:
+ label: 在提问之前 (Before asking)
+ description: |
+ 提问之前,先回答几个小问题。
+ Before asking questions, answer a few quick questions.
+ options:
+ - label: 我已经搜索了现有的 Issues 和 Discussions (I've searched the existing Issues and Discussions)
+ required: true
+ - label: 我已经阅读了 README 中除版本记录以外的所有内容 (I've read everything in the README except the version notes)
+ required: true
+ - label: 我在提问题之前至少花费了 5 分钟来思考和准备 (I spend at least 5 minutes thinking and preparing before asking a question)
+ required: true
+ - label: 这个问题出现在最新版的 WP-China-Yes 上 (This question appears on the latest version of WP-China-Yes)
+ required: false
+ - label: 我使用过旧版的 WP-China-Yes 并且没有出现这个问题 (I've used an older version of WP-China-Yes and didn't have this problem)
+ required: false
+ - label: 这个问题出现了至少 3 次 (This question has occurred at least 3 times)
+ required: false
+ - type: textarea
+ id: describe
+ attributes:
+ label: 描述问题 (Describe the problem)
+ description: |
+ 简明概要地描述你遇到的问题。
+ Briefly describe the problem you are having.
+ validations:
+ required: true
+ - type: textarea
+ id: expected
+ attributes:
+ label: 预期行为 (Expected behavior)
+ description: |
+ 简明概要地描述你期望发生的事情。
+ Briefly describe what you expect to happen.
+ validations:
+ required: true
+ - type: textarea
+ id: reproduce
+ attributes:
+ label: 如何复现 (How to reproduce)
+ description: |
+ 重现该问题的详细步骤。
+ Detailed steps to reproduce the problem.
+ value: |
+ 1. 安装 WP-China-Yes
+ 2. 设置 '...'
+ 3. 点击 '...'
+ 4. 出现问题
+ validations:
+ required: false
+ - type: textarea
+ id: logs
+ attributes:
+ label: 相关日志 (Related logs)
+ description: |
+ 请复制并粘贴任何相关的日志输出。
+ Please copy and paste any relevant log output.
+ 可以把文件拖入这个区域以添加日志文件。
+ Files can be dragged into this area to add log files.
+ 日志文件可通过开启 WordPress 的调试模式获取。
+ Log files can be accessed by enabling WordPress debug mode.
+ render: Text
+ validations:
+ required: false
+ - type: textarea
+ id: screenshots
+ attributes:
+ label: 截图 (Screenshots)
+ description: |
+ 如果有,添加屏幕截图可帮助更快定位你的问题。
+ If so, adding screenshots can help locate your issue faster.
+ 可以复制图片后在此区域内粘贴以添加图片。
+ Pictures can be copied and pasted in this area to add pictures.
+ 如有必要,使用马赛克遮盖敏感信息。
+ Use a mosaic to obscure sensitive information if necessary.
+ validations:
+ required: false
+ - type: textarea
+ id: others
+ attributes:
+ label: 还有别的吗 (Anything else)
+ description: |
+ 运行环境?浏览器?WordPress 版本?相关的配置?链接?参考资料?
+ Environment? Browser? WordPress version? Related configuration? Link? References?
+ 任何能让我们对你所遇到的问题有更多了解的东西。
+ Anything that can give us more insight into the problem you're having.
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..c117656
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@
+blank_issues_enabled: false
+contact_links:
+ - name: 讨论、问答和非项目问题 (Discussions, questions, and non-project issues)
+ url: https://jq.qq.com/?_wv=1027&k=I1oJKSTH
+ about: 其他不明之处,请移步我们的QQ群 12370907 (For other unclear things, please move to our qq group 12370907)
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
index 0000000..5e9619d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,55 @@
+name: 功能请求 (Feature request)
+description: 为这个项目提出一个想法 (Suggest an idea for this project)
+title: "[Feature Request]: "
+labels: ["enhancement"]
+
+body:
+ - type: markdown
+ attributes:
+ value: |
+ **请仅使用 简体中文 或 英文 进行填写**
+ **Please only use Simplified Chinese or English to fill in**
+ - type: checkboxes
+ attributes:
+ label: 在提问之前 (Before asking)
+ description: |
+ 提问之前,先回答几个小问题。
+ Before asking questions, answer a few quick questions.
+ options:
+ - label: 我已经搜索了全部 Issues 和 Commits (I have searched all Issues and Commits)
+ required: true
+ - label: 它们当中没有我将要提交的新功能 (None of them have new feature that I'm going to submit)
+ required: true
+ - type: textarea
+ id: feature
+ attributes:
+ label: 描述功能 (Describe feature)
+ description: |
+ 简明概要地描述你的新功能,以及它将解决什么问题。
+ Briefly describe your new feature and what problem it will solve.
+ validations:
+ required: true
+ - type: textarea
+ id: workflow
+ attributes:
+ label: 工作流程 (Workflow)
+ description: |
+ 请向我们提供有关该功能的实现流程。
+ Please provide us with the implementation flow for this feature.
+ value: |
+ 1. 新建文件 ....
+ 2. 添加函数 ....
+ 3. ...
+ validations:
+ required: true
+ - type: textarea
+ id: others
+ attributes:
+ label: 还有别的吗 (Anything else)
+ description: |
+ 运行环境?浏览器?WordPress 版本?相关的配置?链接?参考资料?
+ Environment? Browser? WordPress version? Related configuration? Link? References?
+ 任何能让我们对该功能的实现有更多帮助的东西。
+ Anything that can help us more with the implementation of this feature.
+ validations:
+ required: false
diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml
new file mode 100644
index 0000000..07e3c7d
--- /dev/null
+++ b/.github/workflows/update-changelog.yml
@@ -0,0 +1,31 @@
+name: "Update Changelog"
+
+on:
+ release:
+ types: [released]
+
+jobs:
+ update:
+ runs-on: ubuntu-latest
+
+ permissions:
+ contents: write
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ ref: main
+
+ - name: Update Changelog
+ uses: stefanzweifel/changelog-updater-action@v1
+ with:
+ latest-version: ${{ github.event.release.tag_name }}
+ release-notes: ${{ github.event.release.body }}
+
+ - name: Commit updated CHANGELOG
+ uses: stefanzweifel/git-auto-commit-action@v5
+ with:
+ branch: main
+ commit_message: "docs: Update CHANGELOG"
+ file_pattern: CHANGELOG.md
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5657f6e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+vendor
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..9d8a8f3
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,4 @@
+# Changelog
+
+All notable changes to `WP-China-Yes` will be documented in this file.
+
diff --git a/Plugin.php b/Plugin.php
new file mode 100644
index 0000000..1d3f726
--- /dev/null
+++ b/Plugin.php
@@ -0,0 +1,98 @@
+' . sprintf( __( 'WP-China-Yes 插件需要 PHP 5.6.0 或更高版本,当前版本为 %s,插件已自动禁用。',
+ 'wp-china-yes' ),
+ PHP_VERSION ) . '
';
+ }
+ if ( is_plugin_active( 'wp-china-no/wp-china-no.php' ) ) {
+ deactivate_plugins( 'wp-china-no/wp-china-no.php' );
+ $notices[] = '
+
' . __( '检测到旧版插件 WP-China-No,已自动禁用!', 'wp-china-yes' ) . '
+
';
+ }
+ if ( is_plugin_active( 'wp-china-plus/wp-china-plus.php' ) ) {
+ deactivate_plugins( 'wp-china-plus/wp-china-plus.php' );
+ $notices[] = '
+
' . __( '检测到不兼容的插件 WP-China-Plus,已自动禁用!', 'wp-china-yes' ) . '
+
';
+ }
+ if ( is_plugin_active( 'kill-429/kill-429.php' ) ) {
+ deactivate_plugins( 'kill-429/kill-429.php' );
+ $notices[] = '
+
' . __( '检测到不兼容的插件 Kill 429,已自动禁用!', 'wp-china-yes' ) . '
+
';
+
+ }
+ // 代理服务器检测
+ if ( defined( 'WP_PROXY_HOST' ) || defined( 'WP_PROXY_PORT' ) ) {
+ $notices[] = '
+
' . __( '检测到已在 WordPress 配置文件中设置代理服务器,这可能会导致插件无法正常工作!',
+ 'wp-china-yes' ) . '
+
';
+ }
+
+ set_transient( 'wp-china-yes-admin-notices', $notices, 10 );
+ }
+
+ /**
+ * 输出管理后台提示信息
+ */
+ public function admin_notices() {
+ $notices = get_transient( 'wp-china-yes-admin-notices' );
+ if ( $notices ) {
+ foreach ( $notices as $notice ) {
+ echo $notice;
+ }
+ delete_transient( 'wp-china-yes-admin-notices' );
+ }
+ }
+}
diff --git a/Service/Base.php b/Service/Base.php
new file mode 100644
index 0000000..03bbf19
--- /dev/null
+++ b/Service/Base.php
@@ -0,0 +1,29 @@
+参与翻译';
+
+ return $links;
+ }, 10, 2 );
+
+ // 加速服务
+ new Super();
+ // 更新服务
+ new Update();
+ }
+}
diff --git a/Service/Setting.php b/Service/Setting.php
new file mode 100644
index 0000000..7b13d7f
--- /dev/null
+++ b/Service/Setting.php
@@ -0,0 +1,267 @@
+setting_api = new API();
+ add_action( 'admin_init', [ $this, 'admin_init' ] );
+ add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', [ $this, 'admin_menu' ] );
+ }
+
+ /**
+ * 挂载设置项
+ */
+ public function admin_init() {
+
+ $sections = [
+ [
+ 'id' => 'wp_china_yes',
+ 'title' => __( '设置', 'wp-china-yes' )
+ ]
+ ];
+
+ $fields = [
+ 'wp_china_yes' => [
+ [
+ 'name' => 'store',
+ 'label' => __( '应用市场', 'wp-china-yes' ),
+ 'desc' => __( '官方加速源(WPMirror):直接从 .org 反代至大陆分发;文派存储库:中国境内自建托管仓库,同时集成文派集市产品更新。',
+ 'wp-china-yes' ),
+ 'type' => 'radio',
+ 'default' => 'wenpai',
+ 'options' => [
+ 'proxy' => '官方镜像',
+ 'wenpai' => '文派中国',
+ 'off' => '不启用'
+ ]
+ ],
+ [
+ 'name' => 'admincdn',
+ 'label' => __( '萌芽加速', 'wp-china-yes' ),
+ 'desc' => __( '萌芽加速(adminCDN):将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需要加速的项目,更多细节控制和功能,请关注 adminCDN 项目。',
+ 'wp-china-yes' ),
+ 'type' => 'multicheck',
+ 'default' => [
+ 'admin' => 'admin',
+ ],
+ 'options' => [
+ 'admin' => '后台加速',
+ 'frontend' => '前台加速',
+ 'googlefonts' => 'Google 字体',
+ 'googleajax' => 'Google 前端公共库',
+ 'cdnjs' => 'CDNJS 前端公共库'
+ ]
+ ],
+ [
+ 'name' => 'cravatar',
+ 'label' => __( '初认头像', 'wp-china-yes' ),
+ 'desc' => __( '初认头像(Cravatar):是 Gravatar 在中国的完美替代方案,您可以在 https://cravatar.com 上传头像,更多选项请安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 WordPress)',
+ 'wp-china-yes' ),
+ 'type' => 'radio',
+ 'default' => 'cn',
+ 'options' => [
+ 'cn' => '全局启用',
+ 'global' => '国际线路',
+ 'weavatar' => '备用源',
+ 'off' => '不启用'
+ ]
+ ],
+ [
+ 'name' => 'windfonts',
+ 'label' => __( '文风字体', 'wp-china-yes' ),
+ 'desc' => __( '文风字体(Windfonts):即将为您的网页渲染中文字体并对主题、插件内的 Google 字体进行加速。',
+ 'wp-china-yes' ),
+ 'type' => 'radio',
+ 'default' => 'off',
+ 'options' => [
+ 'off' => '即将上线',
+ ]
+ ],
+ [
+ 'name' => 'adblock',
+ 'label' => __( '广告拦截', 'wp-china-yes' ),
+ 'desc' => __( '文派叶子🍃(WP-China-Yes):独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,查看可优化插件列表。',
+ 'wp-china-yes' ),
+ 'type' => 'radio',
+ 'default' => 'off',
+ 'options' => [
+ 'off' => '即将上线',
+ ]
+ ],
+ ]
+ ];
+
+ $this->setting_api->set_sections( $sections );
+ $this->setting_api->set_fields( $fields );
+ $this->setting_api->admin_init();
+ }
+
+ /**
+ * 挂载设置页面
+ */
+ public function admin_menu() {
+ // 后台设置
+ add_submenu_page(
+ is_multisite() ? 'settings.php' : 'options-general.php',
+ esc_html__( 'WP-China-Yes', 'wp-china-yes' ),
+ esc_html__( 'WP-China-Yes', 'wp-china-yes' ),
+ is_multisite() ? 'manage_network_options' : 'manage_options',
+ 'wp-china-yes',
+ [ $this, 'setting_page' ]
+ );
+ // 插件页设置
+ add_filter( 'plugin_action_links', function ( $links, $file ) {
+ if ( 'wp-china-yes/wp-china-yes.php' !== $file ) {
+ return $links;
+ }
+ $settings_link = '' . esc_html__( '设置',
+ 'wp-china-yes' ) . '';
+ array_unshift( $links, $settings_link );
+
+ return $links;
+ }, 10, 2 );
+ }
+
+ /**
+ * 设置页面模版
+ */
+ public function setting_page() {
+ echo 'WP-China-Yes
';
+ echo '将您的 WordPress 接入本土生态体系,这将为您提供一个更贴近中国人使用习惯的 WordPress。
100% 开源代码,一起参与文派(WordPress)软件国产化进程,打造属于您自己的开源自助建站程序。
';
+ echo <<
+ .container {
+ display: flex;
+ flex-wrap: wrap;
+ width: 100%;
+ }
+ .left-column, .right-column {
+ width: 100%;
+ }
+ .left-column {
+ background-color: #f0f0f0;
+ }
+ .right-column {
+ padding: 20px;
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+ }
+ .card {
+ background-color: #fff;
+ padding: 20px;
+ box-shadow: 0 1px 3px rgba(0,0,0,0.13);
+ border-radius: 4px;
+ }
+ .card h3 {
+ margin-top: 0;
+ }
+ .card a {
+ text-decoration: none;
+ }
+ .card-body, .card-footer {
+ margin: 10px 0;
+ }
+
+ .sponsor-logos {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ }
+
+ .sponsor-logos img {
+ width: 30%;
+ margin-bottom: 12px;
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+ height: fit-content;
+ }
+
+ @media (min-width: 768px) {
+ .container {
+ flex-wrap: nowrap;
+ }
+ .left-column {
+ width: 70%;
+ }
+ .right-column {
+ width: 30%;
+ }
+ }
+
+
+
+HTML;
+ $this->setting_api->show_navigation();
+ $this->setting_api->show_forms();
+
+ echo <<
+
+
+
项目简介
+
+ 文派叶子 🍃(WP-China-Yes)是一款不可多得的 WordPress 系统底层优化和生态基础设施软件。项目起源于 2019 年,专为解决困扰了中国互联网数十年的特色问题而存在。此为文派开源(WenPai.org)的一部分。
+
+
+
+
+
+
+
+
+
+
+
+
提示:此处选项设置并不与任何文派插件及独立功能扩展冲突,可放心安装启用。
+
帮助:您可以随时在此处调整个性化设置以便适应不同的业务场景,萌新请保持默认即可。此项目的发展离不开您的支持和建议,查看联系方式。
+HTML;
+
+ }
+}
diff --git a/Service/Super.php b/Service/Super.php
new file mode 100644
index 0000000..b2962b7
--- /dev/null
+++ b/Service/Super.php
@@ -0,0 +1,324 @@
+ 'wenpai',
+ 'admincdn' => [
+ 'admin' => 'admin',
+ ],
+ 'cravatar' => 'cn',
+ 'windfonts' => 'off',
+ 'adblock' => 'off',
+ ];
+
+ public function __construct() {
+ $this->settings = is_multisite() ? get_site_option( 'wp_china_yes' ) : get_option( 'wp_china_yes' );
+ $this->settings = wp_parse_args( $this->settings, $this->default );
+
+ /**
+ * WordPress.Org API 替换
+ */
+ if ( is_admin() || wp_doing_cron() ) {
+ if ( $this->settings['store'] != 'off' ) {
+ add_filter( 'pre_http_request', [ $this, 'filter_wordpress_org' ], 100, 3 );
+ }
+ }
+
+ /**
+ * 添加「文派茶馆」小组件
+ */
+ if ( is_admin() ) {
+ add_action( 'wp_dashboard_setup', function () {
+ global $wp_meta_boxes;
+
+ unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );
+ wp_add_dashboard_widget( 'wenpai_tea', '文派茶馆', function () {
+ echo <<
+
+
+
+ HTML;
+ } );
+ } );
+ add_action( 'wp_network_dashboard_setup', function () {
+ global $wp_meta_boxes;
+
+ unset( $wp_meta_boxes['dashboard-network']['side']['core']['dashboard_primary'] );
+ wp_add_dashboard_widget( 'wenpai_tea', '文派茶馆', function () {
+ echo <<
+
+
+
+ HTML;
+ } );
+ } );
+ }
+
+ /**
+ * WordPress 核心静态文件链接替换
+ */
+ if ( is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
+ if (
+ ! empty( $this->settings['admincdn']['admin'] ) &&
+ ! stristr( $GLOBALS['wp_version'], 'alpha' ) &&
+ ! stristr( $GLOBALS['wp_version'], 'beta' ) &&
+ ! stristr( $GLOBALS['wp_version'], 'RC' )
+ ) {
+ // 禁用合并加载,以便于使用公共资源节点
+ global $concatenate_scripts;
+ $concatenate_scripts = false;
+
+ $this->page_str_replace( 'preg_replace', [
+ '~' . home_url( '/' ) . '(wp-admin|wp-includes)/(css|js)/~',
+ sprintf( 'https://wpstatic.admincdn.com/%s/$1/$2/', $GLOBALS['wp_version'] )
+ ] );
+ }
+ }
+
+ if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
+ /**
+ * 前台静态加速
+ */
+ if ( ! empty( $this->settings['admincdn']['frontend'] ) ) {
+ add_action( 'template_redirect', function () {
+ ob_start( function ( $content ) {
+ $regex = '#(?<=[(\"\'])(?:' . quotemeta( home_url() ) . ')?/(?:((?:wp-content|wp-includes)[^\"\')]+\.(css|js)[^\"\')]+))(?=[\"\')])#';
+
+ return preg_replace_callback( $regex, function ( $asset ) {
+ return 'https://public.admincdn.com/' . $asset[0];
+ }, $content );
+ } );
+ } );
+ }
+
+ /**
+ * Google 字体替换
+ */
+ if ( ! empty( $this->settings['admincdn']['googlefonts'] ) ) {
+ $this->page_str_replace( 'str_replace', [
+ 'fonts.googleapis.com',
+ 'googlefonts.admincdn.com'
+ ] );
+ }
+
+ /**
+ * Google 前端公共库替换
+ */
+ if ( ! empty( $this->settings['admincdn']['googleajax'] ) ) {
+ $this->page_str_replace( 'str_replace', [
+ 'ajax.googleapis.com',
+ 'googleajax.admincdn.com'
+ ] );
+ }
+
+ /**
+ * CDNJS 前端公共库替换
+ */
+ if ( ! empty( $this->settings['admincdn']['cdnjs'] ) ) {
+ $this->page_str_replace( 'str_replace', [
+ 'cdnjs.cloudflare.com/ajax/libs',
+ 'cdnjs.admincdn.com'
+ ] );
+ }
+ }
+
+ /**
+ * 初认头像
+ */
+ if ( ! empty( $this->settings['cravatar'] ) ) {
+ add_filter( 'user_profile_picture_description', [ $this, 'set_user_profile_picture_for_cravatar' ], 1 );
+ add_filter( 'avatar_defaults', [ $this, 'set_defaults_for_cravatar' ], 1 );
+ add_filter( 'um_user_avatar_url_filter', [ $this, 'get_cravatar_url' ], 1 );
+ add_filter( 'bp_gravatar_url', [ $this, 'get_cravatar_url' ], 1 );
+ add_filter( 'get_avatar_url', [ $this, 'get_cravatar_url' ], 1 );
+ }
+ }
+
+ /**
+ * WordPress.Org 替换
+ */
+ public function filter_wordpress_org( $preempt, $args, $url ) {
+ if ( ( ! strpos( $url, 'api.wordpress.org' ) && ! strpos( $url,
+ 'downloads.wordpress.org' ) ) ) {
+ return $preempt;
+ }
+
+ if ( $this->settings['store'] == 'wenpai' ) {
+ $url = str_replace( 'api.wordpress.org', 'api.wenpai.org', $url );
+ } else {
+ $url = str_replace( 'api.wordpress.org', 'wpa.cdn.haozi.net', $url );
+ }
+ $url = str_replace( 'downloads.wordpress.org', 'wpd.cdn.haozi.net', $url );
+
+ $curl_version = '1.0.0';
+ if ( function_exists( 'curl_version' ) ) {
+ $curl_version_array = curl_version();
+ if ( is_array( $curl_version_array ) && key_exists( 'version', $curl_version_array ) ) {
+ $curl_version = $curl_version_array['version'];
+ }
+ }
+ if ( version_compare( $curl_version, '7.15.0', '<' ) ) {
+ $url = str_replace( 'https://', 'http://', $url );
+ }
+
+ return wp_remote_request( $url, $args );
+ }
+
+ /**
+ * 初认头像替换
+ */
+ public function get_cravatar_url( $url ) {
+ switch ( $this->settings['cravatar'] ) {
+ case 'cn':
+ return $this->replace_avatar_url( $url, 'cn.cravatar.com' );
+ case 'global':
+ return $this->replace_avatar_url( $url, 'en.cravatar.com' );
+ case 'weavatar':
+ return $this->replace_avatar_url( $url, 'weavatar.com' );
+ default:
+ return $url;
+ }
+ }
+
+ /**
+ * 头像 URL 替换
+ */
+ public function replace_avatar_url( $url, $domain ) {
+ $sources = array(
+ 'www.gravatar.com',
+ '0.gravatar.com',
+ '1.gravatar.com',
+ '2.gravatar.com',
+ 's.gravatar.com',
+ 'secure.gravatar.com',
+ 'cn.gravatar.com',
+ 'en.gravatar.com',
+ 'gravatar.com',
+ 'sdn.geekzu.org',
+ 'gravatar.duoshuo.com',
+ 'gravatar.loli.net',
+ 'dn-qiniu-avatar.qbox.me'
+ );
+
+ return str_replace( $sources, $domain, $url );
+ }
+
+ /**
+ * WordPress 讨论设置中的默认 LOGO 名称替换
+ */
+ public function set_defaults_for_cravatar( $avatar_defaults ) {
+ $avatar_defaults['gravatar_default'] = '初认头像';
+
+ return $avatar_defaults;
+ }
+
+ /**
+ * 个人资料卡中的头像上传地址替换
+ */
+ public function set_user_profile_picture_for_cravatar() {
+ return '
您可以在初认头像修改您的资料图片';
+ }
+
+ /**
+ * 页面替换
+ *
+ * @param $replace_func string 要调用的字符串关键字替换函数
+ * @param $param array 传递给字符串替换函数的参数
+ */
+ private function page_str_replace( $replace_func, $param ) {
+ add_action( 'init', function () use ( $replace_func, $param ) {
+ ob_start( function ( $buffer ) use ( $replace_func, $param ) {
+ $param[] = $buffer;
+
+ return call_user_func_array( $replace_func, $param );
+ } );
+ }, 999999 );
+ }
+}
diff --git a/Service/Update.php b/Service/Update.php
new file mode 100644
index 0000000..c8a5951
--- /dev/null
+++ b/Service/Update.php
@@ -0,0 +1,24 @@
+=5.6"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "TheTNB\\Setting\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-3.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "耗子",
+ "email": "i@haozi.net"
+ }
+ ],
+ "description": "WordPress Setting API for developers",
+ "homepage": "https://github.com/thetnb/wp-setting-api",
+ "keywords": [
+ "wordpress"
+ ],
+ "support": {
+ "issues": "https://github.com/TheTNB/wp-setting-api/issues",
+ "source": "https://github.com/TheTNB/wp-setting-api/tree/2.0.2"
+ },
+ "time": "2024-03-08T07:11:27+00:00"
+ },
+ {
+ "name": "yahnis-elsts/plugin-update-checker",
+ "version": "v5.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/YahnisElsts/plugin-update-checker.git",
+ "reference": "e8e53e6d98e37fa7c895c93417f52e3775494715"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/e8e53e6d98e37fa7c895c93417f52e3775494715",
+ "reference": "e8e53e6d98e37fa7c895c93417f52e3775494715",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "php": ">=5.6.20"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "load-v5p4.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Yahnis Elsts",
+ "email": "whiteshadow@w-shadow.com",
+ "homepage": "https://w-shadow.com/",
+ "role": "Developer"
+ }
+ ],
+ "description": "A custom update checker for WordPress plugins and themes. Useful if you can't host your plugin in the official WP repository but still want it to support automatic updates.",
+ "homepage": "https://github.com/YahnisElsts/plugin-update-checker/",
+ "keywords": [
+ "automatic updates",
+ "plugin updates",
+ "theme updates",
+ "wordpress"
+ ],
+ "support": {
+ "issues": "https://github.com/YahnisElsts/plugin-update-checker/issues",
+ "source": "https://github.com/YahnisElsts/plugin-update-checker/tree/v5.4"
+ },
+ "time": "2024-02-24T09:56:49+00:00"
+ }
+ ],
+ "packages-dev": [],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": [],
+ "platform-dev": [],
+ "plugin-api-version": "2.6.0"
+}
diff --git a/license b/license
index 3c67163..f288702 100644
--- a/license
+++ b/license
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
- Copyright (C) 2020 LitePress社区
+ Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/readme.md b/readme.md
index 4052949..0cd9af6 100644
--- a/readme.md
+++ b/readme.md
@@ -1,57 +1,44 @@
# WP-China-Yes
+文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,生生不息。
+
## 简介
-LitePress社区([litepress.cn][0])出品,旨在将你的WordPress一键接入到本土生态体系中
+
+文派叶子 🍃(WP-China-Yes)是一款不可多得的 WordPress 系统底层优化和生态基础设施软件。项目起源于 2019 年,专为解决困扰了中国互联网数十年的特色问题而存在。此为文派开源(WenPai.org)的一部分。
+
+## 功能
+
+- [x] 优化 WordPress 相关服务在中国大陆的访问速度
+- [x] 优化 WordPress 后台加载速度
+- [x] 优化 WordPress 前台加载速度
+- [x] 移除后台无用请求与组件
+- [x] 替换 Gravatar 头像为[初认头像](https://cravatar.com/)
+- [x] 优化 谷歌字体 加载速度
+- [x] 优化 谷歌前端库 加载速度
+- [x] 优化 CDNJS 加载速度
## 安装
-如果你期望参与测试,可以直接Clone Master分支中的代码,此处是功能模块基本完整的测试版本。
-若期望用于正式环境请移步[发布列表][1],下载最新稳定版的压缩包后直接访问[http://你的域名/wp-admin/plugin-install.php][2],然后点击页面左上角的“上传插件”,上传安装即可。
+同其他 WordPress 插件一样,**从 Release 页面下载最新版本的插件**(不要直接下载源码!!!),在后台插件管理页面上传并启用即可。
-## 插件截图
-
-
-## 主要特性
- - 对来自wordpress.org的所有外部服务进行加速
- - 对来自谷歌公共库的一些服务进行加速
- - 对接[LitePress翻译平台][3],为WordPress本身及官方应用市场中的所有应用推送基于AI翻译+人工辅助校准的全量汉化包
- - 使WordPress内置应用市场支持中文作品信息展示及中文语义化搜索(开发中)
- - 使WordPress内置应用市场中支持选购国内开发者所推出的优秀作品并享受集成式的安装及更新推送服务(开发中)
+当然,你也可以选择将插件手动上传到`wp-content/plugins`目录下,然后在后台启用。
## 问题反馈
-需要着重说明一下:**任何问题都会在第一时间得到积极的处理**,所以,有问题尽管提。
-你可以选择以下三种方式反馈问题:
+对于 WordPress 相关的问题,可在 [文派支持论坛](https://wenpai.org/support) 提问寻求帮助。
- 1. 提交一个[Issue][4]
- 2. 在LitePress社区的[论坛][5]中提交一个帖子
- 3. 加项目交流QQ群:1046115671
+对于此插件自身问题,可在`Issues`页面提交问题反馈,注意[提问的智慧](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md)。
-无论选择何种方式提交问题,都希望你可以详细描述问题的表现及触发条件,这样对减少交流成本及快速定位问题有很大好处。
-
-## 参与项目发展
-
-对于普通用户来讲,最好的参与项目发展的方式就是帮助项目宣传推广及参与[翻译贡献][3]
-
-如果你有好的Idea,或是对参与项目开发有兴趣可以加项目交流QQ群:1046115671
-
-我想,对于在校大学生来讲,参与一个开源项目无疑是积累开发经验的最好方式。同时,工作并不是完全无偿的,项目赞助商会视情况为每位开发者提供周期性资金支持。
+交流QQ群:[1046115671](https://qm.qq.com/q/BATf8KsCje)
## 赞助商
-### 服务器及管理软件
-
-
-
-
-[0]: https://litepress.cn
-
-[1]: https://github.com/litepress/wp-china-yes/releases
-
-[2]: http://你的域名/wp-admin/plugin-install.php
-
-[3]: https://litepress.cn/translate/
-
-[4]: https://github.com/litepress/wp-china-yes/issues
-
-[5]: https://litepress.cn/forums
+
+
+
+
+
+
+
+
+
diff --git a/wp-china-yes.php b/wp-china-yes.php
index bb73864..3752e6d 100644
--- a/wp-china-yes.php
+++ b/wp-china-yes.php
@@ -1,407 +1,33 @@
page_url = network_admin_url( is_multisite() ? 'settings.php?page=wp-china-yes' : 'options-general.php?page=wp-china-yes' );
- }
+require_once( plugin_dir_path( __FILE__ ) . 'vendor/autoload.php' );
- public function init() {
- if ( is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
- /**
- * 插件列表项目中增加设置项
- */
- add_filter( sprintf( '%splugin_action_links_%s', is_multisite() ? 'network_admin_' : '', plugin_basename( __FILE__ ) ), function ( $links ) {
- return array_merge(
- [ sprintf( '%s', $this->page_url, '设置' ) ],
- $links
- );
- } );
+// 注册插件激活钩子
+register_activation_hook( PLUGIN_FILE, [ Plugin::class, 'activate' ] );
+// 注册插件删除钩子
+register_uninstall_hook( PLUGIN_FILE, [ Plugin::class, 'uninstall' ] );
-
- /**
- * 插件列表页中所有插件增加“翻译校准”链接
- */
- // if (get_option('wpapi') == 1) {
- add_filter( sprintf( '%splugin_action_links', is_multisite() ? 'network_admin_' : '' ), function ( $links, $plugin = '' ) {
- $links[] = '参与翻译';
-
- return $links;
- }, 10, 2 );
- //}
-
-
- /**
- * 初始化设置项
- */
- update_option( "wpapi", get_option( 'wpapi' ) ?: '2' );
- update_option( "super_admin", get_option( 'super_admin' ) ?: '2' );
- update_option( "super_gravatar", get_option( 'super_gravatar' ) ?: '1' );
- update_option( "super_googlefonts", get_option( 'super_googlefonts' ) ?: '2' );
- update_option( "super_googleajax", get_option( 'super_googleajax' ) ?: '2' );
-
-
- /**
- * 禁用插件时删除配置
- */
- register_deactivation_hook( __FILE__, function () {
- delete_option( "wpapi" );
- delete_option( "super_admin" );
- delete_option( "super_gravatar" );
- delete_option( "super_googlefonts" );
- delete_option( "super_googleajax" );
- } );
-
-
- /**
- * 菜单注册
- */
- add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', function () {
- add_submenu_page(
- is_multisite() ? 'settings.php' : 'options-general.php',
- 'WP-China-Yes',
- 'WP-China-Yes',
- is_multisite() ? 'manage_network_options' : 'manage_options',
- 'wp-china-yes',
- [ $this, 'options_page_html' ]
- );
- } );
-
-
- /**
- * 将WordPress核心所依赖的静态文件访问链接替换为公共资源节点
- */
- if (
- get_option( 'super_admin' ) != 2 &&
- ! stristr( $GLOBALS['wp_version'], 'alpha' ) &&
- ! stristr( $GLOBALS['wp_version'], 'beta' ) &&
- ! stristr( $GLOBALS['wp_version'], 'RC' ) &&
- ! isset( $GLOBALS['lp_version'] )
- ) {
- $this->page_str_replace( 'preg_replace', [
- '~' . home_url( '/' ) . '(wp-admin|wp-includes)/(css|js)/~',
- sprintf('https://a2.wp-china-yes.net/WordPress@%s/$1/$2/', $GLOBALS['wp_version'])
- ], get_option( 'super_admin' ) );
- }
- }
-
-
- if ( is_admin() || wp_doing_cron() ) {
- add_action( 'admin_init', function () {
- /**
- * wpapi用以标记用户所选的仓库api,数值说明:1 使用LitePress的API,2 只是经代理加速的api.wordpress.org原版API
- */
- register_setting( 'wpcy', 'wpapi' );
-
- /**
- * super_admin用以标记用户是否启用管理后台加速功能
- */
- register_setting( 'wpcy', 'super_admin' );
-
- /**
- * super_gravatar用以标记用户是否启用Cravatar头像功能
- */
- register_setting( 'wpcy', 'super_gravatar' );
-
- /**
- * super_googlefonts用以标记用户是否启用谷歌字体加速功能
- */
- register_setting( 'wpcy', 'super_googlefonts' );
-
- add_settings_section(
- 'wpcy_section_main',
- '将你的WordPress接入本土生态体系中,这将为你提供一个更贴近中国人使用习惯的WordPress',
- '',
- 'wpcy'
- );
-
- add_settings_field(
- 'wpcy_field_select_wpapi',
- '选择应用市场',
- [ $this, 'field_wpapi_cb' ],
- 'wpcy',
- 'wpcy_section_main'
- );
-
- add_settings_field(
- 'wpcy_field_select_super_admin',
- '加速管理后台',
- [ $this, 'field_super_admin_cb' ],
- 'wpcy',
- 'wpcy_section_main'
- );
-
- add_settings_field(
- 'wpcy_field_select_super_gravatar',
- '使用 Cravatar 头像',
- [ $this, 'field_super_gravatar_cb' ],
- 'wpcy',
- 'wpcy_section_main'
- );
-
- add_settings_field(
- 'wpcy_field_select_super_googlefonts',
- '加速谷歌字体',
- [ $this, 'field_super_googlefonts_cb' ],
- 'wpcy',
- 'wpcy_section_main'
- );
-
- add_settings_field(
- 'wpcy_field_select_super_googleajax',
- '加速谷歌前端公共库',
- [ $this, 'field_super_googleajax_cb' ],
- 'wpcy',
- 'wpcy_section_main'
- );
-
- } );
-
- /**
- * 替换api.wordpress.org和downloads.wordpress.org为WP-China.org维护的大陆加速节点
- * URL替换代码来自于我爱水煮鱼(http://blog.wpjam.com/)开发的WPJAM Basic插件
- */
- add_filter( 'pre_http_request', function ( $preempt, $r, $url ) {
- if ( ( ! stristr( $url, 'api.wordpress.org' ) && ! stristr( $url, 'downloads.wordpress.org' ) ) || get_option( 'wpapi' ) == 3 ) {
- return $preempt;
- }
- if ( get_option( 'wpapi' ) == 1 ) {
- $url = str_replace( 'api.wordpress.org', 'api.litepress.cn', $url );
- $url = str_replace( 'downloads.wordpress.org', 'd.w.org.ibadboy.net', $url );
- } else {
- $url = str_replace( 'api.wordpress.org', 'api.w.org.ibadboy.net', $url );
- $url = str_replace( 'downloads.wordpress.org', 'd.w.org.ibadboy.net', $url );
- }
-
- $curl_version = '1.0.0';
- if ( function_exists( 'curl_version' ) ) {
- $curl_version_array = curl_version();
- if ( is_array( $curl_version_array ) && key_exists( 'version', $curl_version_array ) ) {
- $curl_version = $curl_version_array['version'];
- }
- }
-
- // 如果CURL版本小于7.15.0,说明不支持SNI,无法通过HTTPS访问又拍云的节点,故而改用HTTP
- if ( version_compare( $curl_version, '7.15.0', '<' ) ) {
- $url = str_replace( 'https://', 'http://', $url );
- }
-
- return wp_remote_request( $url, $r );
- }, 999999, 3 );
- }
-
-
- if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
- /**
- * 替换谷歌字体为 LitePress 维护的加速节点
- */
- if ( get_option( 'super_googlefonts' ) != 2 ) {
- $this->page_str_replace( 'str_replace', [
- 'fonts.googleapis.com',
- 'googlefonts.wp-china-yes.net'
- ], get_option( 'super_googlefonts' ) );
- }
-
- /**
- * 替换谷歌前端公共库为 LitePress 维护的加速节点
- */
- if ( get_option( 'super_googleajax' ) != 2 ) {
- $this->page_str_replace( 'str_replace', [
- 'ajax.googleapis.com',
- 'googleajax.wp-china-yes.net'
- ], get_option( 'super_googleajax' ) );
- }
-
- }
-
- /**
- * 替换Gravatar头像为Cravatar头像
- */
- if ( get_option( 'super_gravatar' ) == 1 ) {
- if ( ! function_exists( 'get_cravatar_url' ) ) {
- /**
- * 替换Gravatar头像为Cravatar头像
- *
- * Cravatar是Gravatar在中国的完美替代方案,你可以在https://cravatar.cn更新你的头像
- */
- function get_cravatar_url( $url ) {
- $sources = array(
- 'www.gravatar.com',
- '0.gravatar.com',
- '1.gravatar.com',
- '2.gravatar.com',
- 'secure.gravatar.com',
- 'cn.gravatar.com',
- 'gravatar.com',
- );
-
- return str_replace( $sources, 'cravatar.cn', $url );
- }
-
- /**
- * 替换WordPress讨论设置中的默认LOGO名称
- */
- function set_defaults_for_cravatar( $avatar_defaults ) {
- $avatar_defaults['gravatar_default'] = 'Cravatar 标志';
-
- return $avatar_defaults;
- }
-
- /**
- * 替换个人资料卡中的头像上传地址
- */
- function set_user_profile_picture_for_cravatar() {
- return '您可以在 Cravatar 修改您的资料图片';
- }
-
- add_filter( 'user_profile_picture_description', 'set_user_profile_picture_for_cravatar' );
- add_filter( 'avatar_defaults', 'set_defaults_for_cravatar', 1 );
- add_filter( 'um_user_avatar_url_filter', 'get_cravatar_url', 1 );
- add_filter( 'bp_gravatar_url', 'get_cravatar_url', 1 );
- add_filter( 'get_avatar_url', 'get_cravatar_url', 1 );
- }
- }
- }
-
- public function field_wpapi_cb() {
- $wpapi = get_option( 'wpapi' );
- ?>
-
-
-
-
- 官方应用市场加速镜像:直接从官方反代并在大陆分发,除了增加对 WP-China-Yes 插件的更新支持外未做任何更改
-
-
- LitePress 应用市场:该接口处于开发阶段,目前提供了与 LitePress
- 翻译平台 的整合(注意,你可能在使用此接口时遇到未知 BUG,希望能帮忙 反馈)
-
- field_cb( 'super_admin', '将WordPress核心所依赖的静态文件切换为公共资源,此选项极大的加快管理后台访问速度', true );
- }
-
- public function field_super_gravatar_cb() {
- $this->field_cb( 'super_gravatar', 'Cravatar 是 Gravatar 在中国的完美替代方案,你可以在 https://cravatar.cn 更新你的头像。(任何开发者均可在自己的产品中集成该服务)' );
- }
-
- public function field_super_googlefonts_cb() {
- $this->field_cb( 'super_googlefonts', '请只在包含谷歌字体的情况下才启用该选项,以免造成不必要的性能损失' );
- }
-
- public function field_super_googleajax_cb() {
- $this->field_cb( 'super_googleajax', '请只在包含谷歌前端公共库的情况下才启用该选项,以免造成不必要的性能损失' );
- }
-
- public function options_page_html() {
- if ( $_SERVER['REQUEST_METHOD'] === 'POST' ) {
- update_option( "wpapi", sanitize_text_field( $_POST['wpapi'] ) );
- update_option( "super_admin", sanitize_text_field( $_POST['super_admin'] ) );
- update_option( "super_gravatar", sanitize_text_field( $_POST['super_gravatar'] ) );
- update_option( "super_googlefonts", sanitize_text_field( $_POST['super_googlefonts'] ) );
- update_option( "super_googleajax", sanitize_text_field( $_POST['super_googleajax'] ) );
-
- echo '';
- }
-
- if ( ! current_user_can( 'manage_options' ) ) {
- return;
- }
-
- settings_errors( 'wpcy_messages' );
- ?>
-
-
-
-
-
- LitePress社区的使命是帮助WordPress在中国建立起良好的本土生态环境,以求推进行业整体发展,做大市场蛋糕。
- 特别感谢知更鸟、薇晓朵团队、AppNode在项目萌芽期给予的帮助。
- 项目所需服务器资源由硅云和又拍云提供。
-
-
-
-
-
-
-
-
-
-
- init();
-}
+new Plugin();
From 646c032e70648bf1fb12adbca6e060a0b031fc26 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Fri, 8 Mar 2024 21:48:15 +0800
Subject: [PATCH 068/120] =?UTF-8?q?feat:=20=E8=8A=82=E7=82=B9=E5=8F=AF?=
=?UTF-8?q?=E7=94=A8=E6=80=A7=E7=9B=91=E6=8E=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Service/Base.php | 2 +
Service/Monitor.php | 156 ++++++++++++++++++++++++++++++++++++++++++++
Service/Setting.php | 24 +++----
Service/Super.php | 14 +---
composer.json | 5 +-
helpers.php | 20 ++++++
6 files changed, 195 insertions(+), 26 deletions(-)
create mode 100644 Service/Monitor.php
create mode 100644 helpers.php
diff --git a/Service/Base.php b/Service/Base.php
index 03bbf19..d1dd9e5 100644
--- a/Service/Base.php
+++ b/Service/Base.php
@@ -23,6 +23,8 @@ class Base {
// 加速服务
new Super();
+ // 监控服务
+ new Monitor();
// 更新服务
new Update();
}
diff --git a/Service/Monitor.php b/Service/Monitor.php
new file mode 100644
index 0000000..a147a36
--- /dev/null
+++ b/Service/Monitor.php
@@ -0,0 +1,156 @@
+settings = get_settings();
+
+ add_action( 'init', [ $this, 'init' ] );
+ add_action( 'wp_china_yes_maybe_check_store', [
+ $this,
+ 'maybe_check_store'
+ ] );
+ add_action( 'wp_china_yes_maybe_check_cravatar', [
+ $this,
+ 'maybe_check_cravatar'
+ ] );
+ add_action( 'wp_china_yes_maybe_check_admincdn', [
+ $this,
+ 'maybe_check_admincdn'
+ ] );
+ }
+
+ /**
+ * 初始化
+ */
+ public function init() {
+ // 检查应用市场可用性
+ if ( ! wp_next_scheduled( 'wp_china_yes_maybe_check_store' ) && $this->settings['store'] != 'off' ) {
+ wp_schedule_event( time(), 'hourly', 'wp_china_yes_maybe_check_store' );
+ }
+ // 检查初认头像可用性
+ if ( ! wp_next_scheduled( 'wp_china_yes_maybe_check_cravatar' ) && $this->settings['cravatar'] != 'off' ) {
+ wp_schedule_event( time(), 'hourly', 'wp_china_yes_maybe_check_cravatar' );
+ }
+ // 检查萌芽加速可用性
+ if ( ! wp_next_scheduled( 'wp_china_yes_maybe_check_admincdn' ) && ! empty( $this->settings['admincdn'] ) ) {
+ wp_schedule_event( time(), 'hourly', 'wp_china_yes_maybe_check_admincdn' );
+ }
+ }
+
+ /**
+ * 检查应用市场可用性
+ */
+ public function maybe_check_store() {
+ $test_url = 'https://api.wenpai.org/china-yes/version-check';
+ if ( $this->settings['store'] == 'proxy' ) {
+ $test_url = 'http://wpa.cdn.haozi.net/core/version-check/1.7/';
+ }
+ $response = wp_remote_get( $test_url );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ if ( $this->settings['store'] == 'wenpai' ) {
+ $this->settings['store'] = 'proxy';
+ } elseif ( $this->settings['store'] == 'proxy' ) {
+ $this->settings['store'] = 'off';
+ }
+ $this->update_settings();
+ }
+ }
+
+ /**
+ * 检查初认头像可用性
+ */
+ public function maybe_check_cravatar() {
+ $test_url = 'https://cn.cravatar.com/avatar/';
+ switch ( $this->settings['cravatar'] ) {
+ case 'global':
+ $test_url = 'https://en.cravatar.com/avatar/';
+ break;
+ case 'weavatar':
+ $test_url = 'https://weavatar.com/avatar/';
+ break;
+ }
+ $response = wp_remote_get( $test_url );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ if ( $this->settings['cravatar'] == 'cn' ) {
+ $this->settings['cravatar'] = 'global';
+ } elseif ( $this->settings['cravatar'] == 'global' ) {
+ $this->settings['cravatar'] = 'weavatar';
+ } elseif ( $this->settings['cravatar'] == 'weavatar' ) {
+ $this->settings['cravatar'] = 'cn';
+ }
+ $this->update_settings();
+ }
+ }
+
+ /**
+ * 检查萌芽加速可用性
+ */
+ public function maybe_check_admincdn() {
+ // 后台加速
+ if ( ! empty( $this->settings['admincdn']['admin'] ) ) {
+ $response = wp_remote_get( 'https://wpstatic.admincdn.com/6.4.3/wp-includes/js/wp-sanitize.min.js' );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ unset( $this->settings['admincdn']['admin'] );
+ $this->update_settings();
+ }
+ }
+ // 前台加速
+ if ( ! empty( $this->settings['admincdn']['frontend'] ) ) {
+ $url = network_site_url( '/wp-includes/js/wp-sanitize.min.js' );
+ $response = wp_remote_get( 'https://public.admincdn.com/' . $url );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ unset( $this->settings['admincdn']['frontend'] );
+ $this->update_settings();
+ }
+ }
+ // Google 字体
+ if ( ! empty( $this->settings['admincdn']['googlefonts'] ) ) {
+ $response = wp_remote_get( 'https://googlefonts.admincdn.com/css?family=Roboto:400,700' );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ unset( $this->settings['admincdn']['googlefonts'] );
+ $this->update_settings();
+ }
+ }
+ // Google 前端公共库
+ if ( ! empty( $this->settings['admincdn']['googleajax'] ) ) {
+ $response = wp_remote_get( 'https://googleajax.admincdn.com/ajax/libs/jquery/3.5.1/jquery.min.js' );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ unset( $this->settings['admincdn']['googleajax'] );
+ $this->update_settings();
+ }
+ }
+ // CDNJS 前端公共库
+ if ( ! empty( $this->settings['admincdn']['cdnjs'] ) ) {
+ $response = wp_remote_get( 'https://cdnjs.admincdn.com/jquery/3.5.1/jquery.min.js' );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ unset( $this->settings['admincdn']['cdnjs'] );
+ $this->update_settings();
+ }
+ }
+ }
+
+ /**
+ * 更新设置
+ */
+ private function update_settings() {
+ if ( is_multisite() ) {
+ update_site_option( 'wp_china_yes', $this->settings );
+ } else {
+ update_option( 'wp_china_yes', $this->settings );
+ }
+ }
+}
diff --git a/Service/Setting.php b/Service/Setting.php
index 7b13d7f..ded015a 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -37,20 +37,20 @@ class Setting {
[
'name' => 'store',
'label' => __( '应用市场', 'wp-china-yes' ),
- 'desc' => __( '官方加速源(WPMirror):直接从 .org 反代至大陆分发;文派存储库:中国境内自建托管仓库,同时集成文派集市产品更新。',
+ 'desc' => __( '官方加速源(WPMirror)直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文派翻译平台。',
'wp-china-yes' ),
'type' => 'radio',
'default' => 'wenpai',
'options' => [
'proxy' => '官方镜像',
- 'wenpai' => '文派中国',
+ 'wenpai' => '文派开源',
'off' => '不启用'
]
],
[
'name' => 'admincdn',
'label' => __( '萌芽加速', 'wp-china-yes' ),
- 'desc' => __( '萌芽加速(adminCDN):将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需要加速的项目,更多细节控制和功能,请关注 adminCDN 项目。',
+ 'desc' => __( '萌芽加速(adminCDN)将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需要加速的项目,更多细节控制和功能,请关注 adminCDN 项目。',
'wp-china-yes' ),
'type' => 'multicheck',
'default' => [
@@ -67,21 +67,21 @@ class Setting {
[
'name' => 'cravatar',
'label' => __( '初认头像', 'wp-china-yes' ),
- 'desc' => __( '初认头像(Cravatar):是 Gravatar 在中国的完美替代方案,您可以在 https://cravatar.com 上传头像,更多选项请安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 WordPress)',
+ 'desc' => __( '初认头像(Cravatar)Gravatar 在中国的完美替代方案,您可以在 https://cravatar.com 上传头像,更多选项请安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 WordPress)',
'wp-china-yes' ),
'type' => 'radio',
'default' => 'cn',
'options' => [
- 'cn' => '全局启用',
+ 'cn' => '默认线路',
'global' => '国际线路',
- 'weavatar' => '备用源',
+ 'weavatar' => '备用源(WeAvatar)',
'off' => '不启用'
]
],
[
'name' => 'windfonts',
'label' => __( '文风字体', 'wp-china-yes' ),
- 'desc' => __( '文风字体(Windfonts):即将为您的网页渲染中文字体并对主题、插件内的 Google 字体进行加速。',
+ 'desc' => __( '文风字体(Windfonts)即将为您的网页渲染中文字体并对主题、插件内的字体进行加速。',
'wp-china-yes' ),
'type' => 'radio',
'default' => 'off',
@@ -92,7 +92,7 @@ class Setting {
[
'name' => 'adblock',
'label' => __( '广告拦截', 'wp-china-yes' ),
- 'desc' => __( '文派叶子🍃(WP-China-Yes):独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,查看可优化插件列表。',
+ 'desc' => __( '文派叶子🍃(WP-China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,查看可优化插件列表。',
'wp-china-yes' ),
'type' => 'radio',
'default' => 'off',
@@ -169,7 +169,7 @@ class Setting {
.card h3 {
margin-top: 0;
}
- .card a {
+ .card a, .left-column a {
text-decoration: none;
}
.card-body, .card-footer {
@@ -221,8 +221,6 @@ HTML;
了解更多
-
-
赞助商
@@ -240,8 +238,6 @@ HTML;
成为赞助商
-
-
建站套件
@@ -259,7 +255,7 @@ HTML;
-提示:此处选项设置并不与任何文派插件及独立功能扩展冲突,可放心安装启用。
+提示:插件会定期检查节点可用性,并在节点不可用时自动切换至可用节点,以保证您的网站正常访问。如您发现设置项被自动切换,可在此页面重新设置。
帮助:您可以随时在此处调整个性化设置以便适应不同的业务场景,萌新请保持默认即可。此项目的发展离不开您的支持和建议,查看联系方式。
HTML;
diff --git a/Service/Super.php b/Service/Super.php
index b2962b7..fc55de4 100644
--- a/Service/Super.php
+++ b/Service/Super.php
@@ -4,6 +4,8 @@ namespace WenPai\ChinaYes\Service;
defined( 'ABSPATH' ) || exit;
+use function WenPai\ChinaYes\get_settings;
+
/**
* Class Super
* 插件加速服务
@@ -12,19 +14,9 @@ defined( 'ABSPATH' ) || exit;
class Super {
private $settings;
- private $default = [
- 'store' => 'wenpai',
- 'admincdn' => [
- 'admin' => 'admin',
- ],
- 'cravatar' => 'cn',
- 'windfonts' => 'off',
- 'adblock' => 'off',
- ];
public function __construct() {
- $this->settings = is_multisite() ? get_site_option( 'wp_china_yes' ) : get_option( 'wp_china_yes' );
- $this->settings = wp_parse_args( $this->settings, $this->default );
+ $this->settings = get_settings();
/**
* WordPress.Org API 替换
diff --git a/composer.json b/composer.json
index c1e9b4d..8f816bf 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,10 @@
"autoload": {
"psr-4": {
"WenPai\\ChinaYes\\": "./"
- }
+ },
+ "files": [
+ "helpers.php"
+ ]
},
"authors": [
{
diff --git a/helpers.php b/helpers.php
new file mode 100644
index 0000000..e3e545d
--- /dev/null
+++ b/helpers.php
@@ -0,0 +1,20 @@
+ 'wenpai',
+ 'admincdn' => [
+ 'admin' => 'admin',
+ ],
+ 'cravatar' => 'cn',
+ 'windfonts' => 'off',
+ 'adblock' => 'off',
+ ] );
+}
From 41c27fe48701359e43ae6b3a092fcf34634c55c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Fri, 8 Mar 2024 22:04:26 +0800
Subject: [PATCH 069/120] workflow: fix CI branch
---
.github/workflows/update-changelog.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml
index 07e3c7d..df49076 100644
--- a/.github/workflows/update-changelog.yml
+++ b/.github/workflows/update-changelog.yml
@@ -15,7 +15,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
- ref: main
+ ref: master
- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
@@ -26,6 +26,6 @@ jobs:
- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v5
with:
- branch: main
+ branch: master
commit_message: "docs: Update CHANGELOG"
file_pattern: CHANGELOG.md
From b255b869474e2d22c084ad1752b9032b800cabad Mon Sep 17 00:00:00 2001
From: devhaozi
Date: Fri, 8 Mar 2024 14:07:09 +0000
Subject: [PATCH 070/120] docs: Update CHANGELOG
---
CHANGELOG.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9d8a8f3..a02b6ad 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,3 +2,12 @@
All notable changes to `WP-China-Yes` will be documented in this file.
+## v3.6.1 - 2024-03-08
+
+1. 重构全部代码
+2. 应用市场调整为[文派开源](https://wenpai.org)
+3. 加速服务调整为[萌芽加速](https://admincdn.com)
+4. 头像调整为[初认头像](https://cravatar.com)
+5. 支持自动检测节点可用性
+
+**Full Changelog**: https://github.com/WenPai-org/wp-china-yes/compare/V3.5.5...v3.6.1
From 597c0943d5e47fb01e34dcfaa4ea50ff9ebac521 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=96=87=E6=B4=BE=E5=A4=87=E6=A1=88?=
<130886204+modiqi@users.noreply.github.com>
Date: Sat, 9 Mar 2024 00:39:13 +0800
Subject: [PATCH 071/120] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AE=BE=E7=BD=AE=20?=
=?UTF-8?q?UI=20=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
更新叶子插件设置界面样式
---
Service/Setting.php | 173 ++++++++++++++++++++++++++++----------------
1 file changed, 112 insertions(+), 61 deletions(-)
diff --git a/Service/Setting.php b/Service/Setting.php
index ded015a..c997e92 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -139,70 +139,119 @@ class Setting {
* 设置页面模版
*/
public function setting_page() {
- echo 'WP-China-Yes
';
- echo '将您的 WordPress 接入本土生态体系,这将为您提供一个更贴近中国人使用习惯的 WordPress。
100% 开源代码,一起参与文派(WordPress)软件国产化进程,打造属于您自己的开源自助建站程序。
';
+ echo '';
echo <<
- .container {
- display: flex;
- flex-wrap: wrap;
- width: 100%;
- }
- .left-column, .right-column {
- width: 100%;
- }
- .left-column {
- background-color: #f0f0f0;
- }
- .right-column {
- padding: 20px;
- display: flex;
- flex-direction: column;
- gap: 20px;
- }
- .card {
- background-color: #fff;
- padding: 20px;
- box-shadow: 0 1px 3px rgba(0,0,0,0.13);
- border-radius: 4px;
- }
- .card h3 {
- margin-top: 0;
- }
- .card a, .left-column a {
- text-decoration: none;
- }
- .card-body, .card-footer {
- margin: 10px 0;
- }
-
- .sponsor-logos {
- display: flex;
- flex-wrap: wrap;
- justify-content: center;
- }
+
+ .wpcy-settings-footer p {
+ font-size: x-small;
+ line-height: 2;
+ }
+ .sponsor-logos {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ }
+
+ .sponsor-logos img {
+ width: 26%;
+ margin-bottom: 30px;
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+ height: fit-content;
+ }
+
+ @media screen and (max-width: 782px){
+ .auto-fold #wpcontent {
+ padding: 10px;
+ }
+ }
+ @media (min-width: 768px) {
+ .container {
+ flex-wrap: nowrap;
+ max-width: 1280px;
+ margin: 0 auto;
+ }
+ .left-column {
+ width: 70%;
+ }
+ .right-column {
+ width: 30%;
+ }
+ }
+
HTML;
@@ -210,6 +259,10 @@ HTML;
$this->setting_api->show_forms();
echo <<
+
提示:插件会定期检查节点可用性,并在节点不可用时自动切换至可用节点,以保证您的网站正常访问。如您发现设置项被自动切换,可在此页面重新设置。
+
帮助:您可以随时在此处调整个性化设置以便适应不同的业务场景,萌新请保持默认即可。此项目的发展离不开您的支持和建议,查看联系方式。
+
@@ -255,8 +308,6 @@ HTML;
-提示:插件会定期检查节点可用性,并在节点不可用时自动切换至可用节点,以保证您的网站正常访问。如您发现设置项被自动切换,可在此页面重新设置。
-帮助:您可以随时在此处调整个性化设置以便适应不同的业务场景,萌新请保持默认即可。此项目的发展离不开您的支持和建议,查看联系方式。
HTML;
}
From 2223b022b76c10f26dbf02ea7160f3b14a4c0168 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Sat, 9 Mar 2024 01:40:34 +0800
Subject: [PATCH 072/120] =?UTF-8?q?fix:=20=E5=B8=82=E5=9C=BA=E5=8A=A0?=
=?UTF-8?q?=E9=80=9F=E5=AF=BC=E8=87=B4=20Beta=20=E6=B5=8B=E8=AF=95?=
=?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=A4=B1=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Plugin.php | 2 +-
Service/Setting.php | 224 ++++++++++++-----------------------------
Service/Super.php | 8 +-
Service/Update.php | 3 +-
assets/css/setting.css | 120 ++++++++++++++++++++++
wp-china-yes.php | 13 +--
6 files changed, 200 insertions(+), 170 deletions(-)
create mode 100644 assets/css/setting.css
diff --git a/Plugin.php b/Plugin.php
index 1d3f726..1e5d455 100644
--- a/Plugin.php
+++ b/Plugin.php
@@ -38,7 +38,7 @@ class Plugin {
* 插件加载时执行
*/
public function plugins_loaded() {
- load_plugin_textdomain( 'wp-china-yes', false, plugin_dir_path( PLUGIN_FILE ) . 'languages' );
+ load_plugin_textdomain( 'wp-china-yes', false, CHINA_YES_PLUGIN_PATH . 'languages' );
add_action( 'admin_notices', [ $this, 'admin_notices' ] );
}
diff --git a/Service/Setting.php b/Service/Setting.php
index c997e92..32818ba 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -17,6 +17,7 @@ class Setting {
public function __construct() {
$this->setting_api = new API();
add_action( 'admin_init', [ $this, 'admin_init' ] );
+ add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_admin_assets' ] );
add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', [ $this, 'admin_menu' ] );
}
@@ -108,6 +109,16 @@ class Setting {
$this->setting_api->admin_init();
}
+ /**
+ * 加载后台资源
+ */
+ public function enqueue_admin_assets( $hook_suffix ) {
+ if ( strpos( $hook_suffix, 'wp-china-yes' ) === false ) {
+ return;
+ }
+ wp_enqueue_style( 'wpcy-admin', CHINA_YES_PLUGIN_URL . 'assets/css/setting.css', [], CHINA_YES_VERSION );
+ }
+
/**
* 挂载设置页面
*/
@@ -139,174 +150,69 @@ class Setting {
* 设置页面模版
*/
public function setting_page() {
- echo '';
echo <<
- html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
- font-family: "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", sans-serif, -apple-system, "Noto Sans", "Helvetica Neue", Helvetica, "Nimbus Sans L", Arial, "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, "WenQuanYi Zen Hei Sharp", sans-serif;
-}
- #wpcontent, #wpfooter {
- background-color: #ffffff;
- }
- .container {
- display: flex;
- flex-wrap: wrap;
- width: 100%;
- }
- .left-column, .right-column {
- width: 100%;
- }
- .right-column {
- padding: 20px;
- display: flex;
- flex-direction: column;
- gap: 20px;
- }
- .card {
- background-color: #fff;
- padding: 10%;
- border-radius: 10px;
- text-transform: none;
- border: 0px solid #c3c4c7;
- font-size: 14px;
- line-height: 2;
- box-shadow: 0 0.375rem 1.5rem 0 rgba(141, 153, 165, 0.13);
- }
-
- .card h3 {
- margin-top: 0;
- font-size: 18px;
- font-weight: 400;
- }
- .card a, .left-column a {
- text-decoration: none;
- }
- .card-body, .card-footer {
- margin: 10px 0;
- }
-
- .card-footer a.button.button-primary {
- padding: 1% 5%;
- margin-top: 10px;
- }
- .form-table th {
- width: 120px;
- padding: 5% 0;
- }
- .form-table td {
- padding: 5% 0;
- }
- .wpcy-settings-header {
- padding-top: 20px;
- max-width: 1280px;
- margin: 0 auto;
- line-height: 1.5;
- }
- .wpcy-settings-title-section {
- padding: 1% 0;
- }
- .wpcy-settings-title-section h3 {
- font-size: large;
- }
- .wpcy-settings-title-section h4 {
- font-size: large;
- font-weight: 400;
- }
- .wpcy-settings-footer p {
- font-size: x-small;
- line-height: 2;
- }
- .sponsor-logos {
- display: flex;
- flex-wrap: wrap;
- justify-content: center;
- }
-
- .sponsor-logos img {
- width: 26%;
- margin-bottom: 30px;
- display: block;
- margin-left: auto;
- margin-right: auto;
- height: fit-content;
- }
-
- @media screen and (max-width: 782px){
- .auto-fold #wpcontent {
- padding: 10px;
- }
- }
- @media (min-width: 768px) {
- .container {
- flex-wrap: nowrap;
- max-width: 1280px;
- margin: 0 auto;
- }
- .left-column {
- width: 70%;
- }
- .right-column {
- width: 30%;
- }
- }
-
+
-
+
HTML;
$this->setting_api->show_navigation();
$this->setting_api->show_forms();
echo <<
-
提示:插件会定期检查节点可用性,并在节点不可用时自动切换至可用节点,以保证您的网站正常访问。如您发现设置项被自动切换,可在此页面重新设置。
-
帮助:您可以随时在此处调整个性化设置以便适应不同的业务场景,萌新请保持默认即可。此项目的发展离不开您的支持和建议,查看联系方式。
-
-
-
-
-
项目简介
-
- 文派叶子 🍃(WP-China-Yes)是一款不可多得的 WordPress 系统底层优化和生态基础设施软件。项目起源于 2019 年,专为解决困扰了中国互联网数十年的特色问题而存在。此为文派开源(WenPai.org)的一部分。
-
-
+
-
-
赞助商
-
-
+
+
+
项目简介
+
+ 文派叶子 🍃(WP-China-Yes)是一款不可多得的 WordPress 系统底层优化和生态基础设施软件。项目起源于 2019 年,专为解决困扰了中国互联网数十年的特色问题而存在。此为文派开源(WenPai.org)的一部分。
+
+
+
+
+
-
-
HTML;
diff --git a/Service/Super.php b/Service/Super.php
index fc55de4..d3b0ee4 100644
--- a/Service/Super.php
+++ b/Service/Super.php
@@ -217,8 +217,10 @@ class Super {
* WordPress.Org 替换
*/
public function filter_wordpress_org( $preempt, $args, $url ) {
- if ( ( ! strpos( $url, 'api.wordpress.org' ) && ! strpos( $url,
- 'downloads.wordpress.org' ) ) ) {
+ if ( $preempt || isset( $args['_wp_china_yes'] ) ) {
+ return $preempt;
+ }
+ if ( ( ! strpos( $url, 'api.wordpress.org' ) && ! strpos( $url, 'downloads.wordpress.org' ) ) ) {
return $preempt;
}
@@ -240,6 +242,8 @@ class Super {
$url = str_replace( 'https://', 'http://', $url );
}
+ $args['_wp_china_yes'] = true;
+
return wp_remote_request( $url, $args );
}
diff --git a/Service/Update.php b/Service/Update.php
index c8a5951..daccdd7 100644
--- a/Service/Update.php
+++ b/Service/Update.php
@@ -5,7 +5,6 @@ namespace WenPai\ChinaYes\Service;
defined( 'ABSPATH' ) || exit;
use YahnisElsts\PluginUpdateChecker\v5\PucFactory;
-use const WenPai\ChinaYes\PLUGIN_FILE;
/**
* Class Update
@@ -17,7 +16,7 @@ class Update {
public function __construct() {
PucFactory::buildUpdateChecker(
'https://api.wenpai.org/china-yes/version-check',
- PLUGIN_FILE,
+ CHINA_YES_PLUGIN_FILE,
'wp-china-yes'
);
}
diff --git a/assets/css/setting.css b/assets/css/setting.css
new file mode 100644
index 0000000..de2b0e5
--- /dev/null
+++ b/assets/css/setting.css
@@ -0,0 +1,120 @@
+html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
+ font-family: "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", sans-serif, -apple-system, "Noto Sans", "Helvetica Neue", Helvetica, "Nimbus Sans L", Arial, "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, "WenQuanYi Zen Hei Sharp", sans-serif;
+}
+
+#wpcontent, #wpfooter {
+ background-color: #ffffff;
+}
+
+.notice {
+ background-color: #f5f5f5;
+}
+
+.container {
+ display: flex;
+ flex-wrap: wrap;
+ width: 100%;
+}
+
+.left-column, .right-column {
+ width: 100%;
+}
+
+.right-column {
+ padding: 20px;
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+}
+
+.card {
+ background-color: #fff;
+ padding: 10%;
+ border-radius: 10px;
+ text-transform: none;
+ border: 0px solid #c3c4c7;
+ font-size: 14px;
+ line-height: 2;
+ box-shadow: 0 0.375rem 1.5rem 0 rgba(141, 153, 165, 0.13);
+}
+
+.card h3 {
+ margin-top: 0;
+ font-size: 18px;
+ font-weight: 400;
+}
+
+.card a, .left-column a {
+ text-decoration: none;
+}
+
+.card-body, .card-footer {
+ margin: 10px 0;
+}
+
+.card-footer a.button.button-primary {
+ padding: 1% 5%;
+ margin-top: 10px;
+}
+
+.form-table th {
+ width: 120px;
+ padding: 5% 0;
+}
+
+.form-table td {
+ padding: 5% 0;
+}
+
+.settings-header {
+ padding-top: 20px;
+ max-width: 1280px;
+ margin: 0 auto;
+ line-height: 1.5;
+}
+
+.settings-title-section {
+ padding: 1% 0;
+}
+
+.settings-footer p {
+ font-size: 12px;
+ line-height: 2;
+}
+
+.sponsor-logos {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+}
+
+.sponsor-logos img {
+ width: 26%;
+ margin-bottom: 30px;
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+ height: fit-content;
+}
+
+@media screen and (max-width: 782px) {
+ .auto-fold #wpcontent {
+ padding: 10px;
+ }
+}
+
+@media (min-width: 768px) {
+ .container {
+ flex-wrap: nowrap;
+ max-width: 1280px;
+ margin: 0 auto;
+ }
+
+ .left-column {
+ width: 70%;
+ }
+
+ .right-column {
+ width: 30%;
+ }
+}
\ No newline at end of file
diff --git a/wp-china-yes.php b/wp-china-yes.php
index 3752e6d..54094cc 100644
--- a/wp-china-yes.php
+++ b/wp-china-yes.php
@@ -19,15 +19,16 @@ namespace WenPai\ChinaYes;
defined( 'ABSPATH' ) || exit;
-const VERSION = '3.6.1';
-const PLUGIN_FILE = __FILE__;
-const PLUGIN_DIR = __DIR__;
+define( 'CHINA_YES_VERSION', '3.6.1' );
+define( 'CHINA_YES_PLUGIN_FILE', __FILE__ );
+define( 'CHINA_YES_PLUGIN_URL', plugin_dir_url( CHINA_YES_PLUGIN_FILE ) );
+define( 'CHINA_YES_PLUGIN_PATH', plugin_dir_path( CHINA_YES_PLUGIN_FILE ) );
-require_once( plugin_dir_path( __FILE__ ) . 'vendor/autoload.php' );
+require_once( plugin_dir_path( CHINA_YES_PLUGIN_FILE ) . 'vendor/autoload.php' );
// 注册插件激活钩子
-register_activation_hook( PLUGIN_FILE, [ Plugin::class, 'activate' ] );
+register_activation_hook( CHINA_YES_PLUGIN_FILE, [ Plugin::class, 'activate' ] );
// 注册插件删除钩子
-register_uninstall_hook( PLUGIN_FILE, [ Plugin::class, 'uninstall' ] );
+register_uninstall_hook( CHINA_YES_PLUGIN_FILE, [ Plugin::class, 'uninstall' ] );
new Plugin();
From cd8e420e81d2504e2d444d5ffc409413e501b01d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Sat, 9 Mar 2024 03:53:48 +0800
Subject: [PATCH 073/120] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Service/Monitor.php | 4 ++--
Service/Setting.php | 2 +-
Service/Super.php | 6 +++---
Service/Update.php | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Service/Monitor.php b/Service/Monitor.php
index a147a36..d80b9f3 100644
--- a/Service/Monitor.php
+++ b/Service/Monitor.php
@@ -55,9 +55,9 @@ class Monitor {
* 检查应用市场可用性
*/
public function maybe_check_store() {
- $test_url = 'https://api.wenpai.org/china-yes/version-check';
+ $test_url = 'https://api.wenpai.net/china-yes/version-check';
if ( $this->settings['store'] == 'proxy' ) {
- $test_url = 'http://wpa.cdn.haozi.net/core/version-check/1.7/';
+ $test_url = 'https://api.wpmirror.com/core/version-check/1.7/';
}
$response = wp_remote_get( $test_url );
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
diff --git a/Service/Setting.php b/Service/Setting.php
index 32818ba..588d1bb 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -153,7 +153,7 @@ class Setting {
echo <<
-
文派叶子🍃(WP-China-Yes)
+ 文派叶子🍃(WP-China-Yes)
将您的 WordPress 接入本土生态体系,这将为您提供一个更贴近中国人使用习惯的 WordPress。
100% 开源代码,一起参与文派(WordPress)软件国产化进程,打造属于您自己的开源自助建站程序。
diff --git a/Service/Super.php b/Service/Super.php
index d3b0ee4..d103155 100644
--- a/Service/Super.php
+++ b/Service/Super.php
@@ -225,11 +225,11 @@ class Super {
}
if ( $this->settings['store'] == 'wenpai' ) {
- $url = str_replace( 'api.wordpress.org', 'api.wenpai.org', $url );
+ $url = str_replace( 'api.wordpress.org', 'api.wenpai.net', $url );
} else {
- $url = str_replace( 'api.wordpress.org', 'wpa.cdn.haozi.net', $url );
+ $url = str_replace( 'api.wordpress.org', 'api.wpmirror.com', $url );
}
- $url = str_replace( 'downloads.wordpress.org', 'wpd.cdn.haozi.net', $url );
+ $url = str_replace( 'downloads.wordpress.org', 'downloads.wenpai.net', $url );
$curl_version = '1.0.0';
if ( function_exists( 'curl_version' ) ) {
diff --git a/Service/Update.php b/Service/Update.php
index daccdd7..e102b82 100644
--- a/Service/Update.php
+++ b/Service/Update.php
@@ -15,7 +15,7 @@ class Update {
public function __construct() {
PucFactory::buildUpdateChecker(
- 'https://api.wenpai.org/china-yes/version-check',
+ 'https://api.wenpai.net/china-yes/version-check',
CHINA_YES_PLUGIN_FILE,
'wp-china-yes'
);
From 7d38bc7adc8abfb7592856e9b5bdd66c8698ed9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=96=87=E6=B4=BE=E5=A4=87=E6=A1=88?=
<130886204+modiqi@users.noreply.github.com>
Date: Sat, 9 Mar 2024 15:57:44 +0800
Subject: [PATCH 074/120] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20UI=20=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
调整字体大小
---
Service/Setting.php | 2 +-
assets/css/setting.css | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Service/Setting.php b/Service/Setting.php
index 588d1bb..aed8de9 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -68,7 +68,7 @@ class Setting {
[
'name' => 'cravatar',
'label' => __( '初认头像', 'wp-china-yes' ),
- 'desc' => __( '初认头像(Cravatar)Gravatar 在中国的完美替代方案,您可以在 https://cravatar.com 上传头像,更多选项请安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 WordPress)',
+ 'desc' => __( '初认头像(Cravatar)Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 WordPress)',
'wp-china-yes' ),
'type' => 'radio',
'default' => 'cn',
diff --git a/assets/css/setting.css b/assets/css/setting.css
index de2b0e5..5a1bfdb 100644
--- a/assets/css/setting.css
+++ b/assets/css/setting.css
@@ -5,7 +5,9 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
#wpcontent, #wpfooter {
background-color: #ffffff;
}
-
+#wpbody-content {
+ padding-bottom: 10%;
+}
.notice {
background-color: #f5f5f5;
}
@@ -72,6 +74,10 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
margin: 0 auto;
line-height: 1.5;
}
+.settings-header .update-messages h2, .update-php h2, h4 {
+ font-size: 15px;
+ font-weight: 400;
+}
.settings-title-section {
padding: 1% 0;
From 2c86b5c546acb16a1398dec3b3b24211af118f42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Sat, 9 Mar 2024 18:23:41 +0800
Subject: [PATCH 075/120] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=B5=8B?=
=?UTF-8?q?=E8=AF=95=20URL=20=E5=8F=8A=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Service/Monitor.php | 4 ++--
assets/css/setting.css | 5 ++++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Service/Monitor.php b/Service/Monitor.php
index d80b9f3..c244f9b 100644
--- a/Service/Monitor.php
+++ b/Service/Monitor.php
@@ -127,7 +127,7 @@ class Monitor {
}
// Google 前端公共库
if ( ! empty( $this->settings['admincdn']['googleajax'] ) ) {
- $response = wp_remote_get( 'https://googleajax.admincdn.com/ajax/libs/jquery/3.5.1/jquery.min.js' );
+ $response = wp_remote_get( 'https://googleajax.admincdn.com/ajax/libs/jquery/3.7.1/jquery.slim.min.js' );
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
unset( $this->settings['admincdn']['googleajax'] );
$this->update_settings();
@@ -135,7 +135,7 @@ class Monitor {
}
// CDNJS 前端公共库
if ( ! empty( $this->settings['admincdn']['cdnjs'] ) ) {
- $response = wp_remote_get( 'https://cdnjs.admincdn.com/jquery/3.5.1/jquery.min.js' );
+ $response = wp_remote_get( 'https://cdnjs.admincdn.com/jquery/3.7.1/jquery.slim.min.js' );
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
unset( $this->settings['admincdn']['cdnjs'] );
$this->update_settings();
diff --git a/assets/css/setting.css b/assets/css/setting.css
index 5a1bfdb..99975fb 100644
--- a/assets/css/setting.css
+++ b/assets/css/setting.css
@@ -5,9 +5,11 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
#wpcontent, #wpfooter {
background-color: #ffffff;
}
+
#wpbody-content {
padding-bottom: 10%;
}
+
.notice {
background-color: #f5f5f5;
}
@@ -74,6 +76,7 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
margin: 0 auto;
line-height: 1.5;
}
+
.settings-header .update-messages h2, .update-php h2, h4 {
font-size: 15px;
font-weight: 400;
@@ -123,4 +126,4 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
.right-column {
width: 30%;
}
-}
\ No newline at end of file
+}
From c947537af6b687b090456227539a080fbaa26ed8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Sat, 9 Mar 2024 19:36:59 +0800
Subject: [PATCH 076/120] =?UTF-8?q?feat:=20=E5=8F=91=E5=B8=83=20v3.6.2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
wp-china-yes.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wp-china-yes.php b/wp-china-yes.php
index 54094cc..fe0b3e5 100644
--- a/wp-china-yes.php
+++ b/wp-china-yes.php
@@ -4,7 +4,7 @@
* Description: 文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,生生不息。
* Author: 文派开源
* Author URI: https://wp-china-yes.com
- * Version: 3.6.1
+ * Version: 3.6.2
* License: GPLv3 or later
* Text Domain: wp-china-yes
* Domain Path: /languages
@@ -19,7 +19,7 @@ namespace WenPai\ChinaYes;
defined( 'ABSPATH' ) || exit;
-define( 'CHINA_YES_VERSION', '3.6.1' );
+define( 'CHINA_YES_VERSION', '3.6.2' );
define( 'CHINA_YES_PLUGIN_FILE', __FILE__ );
define( 'CHINA_YES_PLUGIN_URL', plugin_dir_url( CHINA_YES_PLUGIN_FILE ) );
define( 'CHINA_YES_PLUGIN_PATH', plugin_dir_path( CHINA_YES_PLUGIN_FILE ) );
From ce026464632dc0565dc938b5404daf873b398815 Mon Sep 17 00:00:00 2001
From: devhaozi
Date: Sat, 9 Mar 2024 11:41:25 +0000
Subject: [PATCH 077/120] docs: Update CHANGELOG
---
CHANGELOG.md | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a02b6ad..f9b7bdb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,14 @@
All notable changes to `WP-China-Yes` will be documented in this file.
+## v3.6.2 - 2024-03-09
+
+1. UI 重构
+2. 修复市场加速导致 Beta 测试插件失效的问题
+3. 更新接口及测试 URL
+
+**Full Changelog**: https://github.com/WenPai-org/wp-china-yes/compare/v3.6.1...v3.6.2
+
## v3.6.1 - 2024-03-08
1. 重构全部代码
From 4a7c871c5cf2fe9f3a27c5c45166af846b5020d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Fri, 23 Aug 2024 14:45:34 +0800
Subject: [PATCH 078/120] feat: bump version 3.6.3
---
Plugin.php | 2 +-
Service/Monitor.php | 11 +++++++++++
Service/Setting.php | 24 +++++++++++++++++++-----
Service/Super.php | 19 +++++++++++++++++++
assets/css/fonts.css | 3 +++
assets/css/setting.css | 2 +-
helpers.php | 1 +
wp-china-yes.php | 4 ++--
8 files changed, 57 insertions(+), 9 deletions(-)
create mode 100644 assets/css/fonts.css
diff --git a/Plugin.php b/Plugin.php
index 1e5d455..3d74313 100644
--- a/Plugin.php
+++ b/Plugin.php
@@ -10,7 +10,7 @@ use WenPai\ChinaYes\Service\Setting;
class Plugin {
/**
- * 创建一个插件实例
+ * 创建插件实例
*/
public function __construct() {
new Base();
diff --git a/Service/Monitor.php b/Service/Monitor.php
index c244f9b..1f867f7 100644
--- a/Service/Monitor.php
+++ b/Service/Monitor.php
@@ -37,6 +37,9 @@ class Monitor {
* 初始化
*/
public function init() {
+ if ( $this->settings['monitor'] != 'on' ) {
+ return;
+ }
// 检查应用市场可用性
if ( ! wp_next_scheduled( 'wp_china_yes_maybe_check_store' ) && $this->settings['store'] != 'off' ) {
wp_schedule_event( time(), 'hourly', 'wp_china_yes_maybe_check_store' );
@@ -141,6 +144,14 @@ class Monitor {
$this->update_settings();
}
}
+ // jsDelivr 公共库
+ if ( ! empty( $this->settings['admincdn']['jsdelivr'] ) ) {
+ $response = wp_remote_get( 'https://jsd.admincdn.com/npm/jquery@3.7.1/dist/jquery.slim.min.js' );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ unset( $this->settings['admincdn']['jsdelivr'] );
+ $this->update_settings();
+ }
+ }
}
/**
diff --git a/Service/Setting.php b/Service/Setting.php
index aed8de9..c64c782 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -62,7 +62,8 @@ class Setting {
'frontend' => '前台加速',
'googlefonts' => 'Google 字体',
'googleajax' => 'Google 前端公共库',
- 'cdnjs' => 'CDNJS 前端公共库'
+ 'cdnjs' => 'CDNJS 前端公共库',
+ 'jsdelivr' => 'jsDelivr 公共库',
]
],
[
@@ -75,19 +76,20 @@ class Setting {
'options' => [
'cn' => '默认线路',
'global' => '国际线路',
- 'weavatar' => '备用源(WeAvatar)',
+ 'weavatar' => '备用源(WeAvatar)',
'off' => '不启用'
]
],
[
'name' => 'windfonts',
'label' => __( '文风字体', 'wp-china-yes' ),
- 'desc' => __( '文风字体(Windfonts)即将为您的网页渲染中文字体并对主题、插件内的字体进行加速。',
+ 'desc' => __( '文风字体(Windfonts)为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器字体调用。',
'wp-china-yes' ),
'type' => 'radio',
'default' => 'off',
'options' => [
- 'off' => '即将上线',
+ 'optimize' => '优化模式',
+ 'off' => '不启用',
]
],
[
@@ -101,6 +103,18 @@ class Setting {
'off' => '即将上线',
]
],
+ [
+ 'name' => 'monitor',
+ 'label' => __( '自动监控', 'wp-china-yes' ),
+ 'desc' => __( '文派叶子🍃(WP-China-Yes)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节点或关闭加速,以保证您的网站正常访问。',
+ 'wp-china-yes' ),
+ 'type' => 'radio',
+ 'default' => 'on',
+ 'options' => [
+ 'on' => '启用',
+ 'off' => '不启用',
+ ]
+ ],
]
];
@@ -166,7 +180,7 @@ HTML;
echo <<
- 提示:插件会定期检查节点可用性,并在节点不可用时自动切换至可用节点,以保证您的网站正常访问。如您发现设置项被自动切换,可在此页面重新设置。
+ 提示:插件会定期检查节点可用性,并在节点不可用时自动切换至可用节点,以保证您的网站正常访问。如您发现设置项被自动切换,可重新设置或关闭自动监控功能。
帮助:您可以随时在此处调整个性化设置以便适应不同的业务场景,萌新请保持默认即可。此项目的发展离不开您的支持和建议,查看联系方式。
diff --git a/Service/Super.php b/Service/Super.php
index d103155..1597550 100644
--- a/Service/Super.php
+++ b/Service/Super.php
@@ -199,6 +199,16 @@ class Super {
'cdnjs.admincdn.com'
] );
}
+
+ /**
+ * jsDelivr 前端公共库替换
+ */
+ if ( ! empty( $this->settings['admincdn']['jsdelivr'] ) ) {
+ $this->page_str_replace( 'str_replace', [
+ 'cdn.jsdelivr.net',
+ 'jsd.admincdn.com'
+ ] );
+ }
}
/**
@@ -211,6 +221,15 @@ class Super {
add_filter( 'bp_gravatar_url', [ $this, 'get_cravatar_url' ], 1 );
add_filter( 'get_avatar_url', [ $this, 'get_cravatar_url' ], 1 );
}
+
+ /**
+ * 文风字体
+ */
+ if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] == 'optimize' ) {
+ add_action( 'init', function () {
+ wp_enqueue_style( 'windfonts-optimize', CHINA_YES_PLUGIN_URL . 'assets/css/fonts.css', [], CHINA_YES_VERSION );
+ } );
+ }
}
/**
diff --git a/assets/css/fonts.css b/assets/css/fonts.css
new file mode 100644
index 0000000..5b0941e
--- /dev/null
+++ b/assets/css/fonts.css
@@ -0,0 +1,3 @@
+html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
+ font-family: -apple-system, "Noto Sans", "Helvetica Neue", Helvetica, "Nimbus Sans L", Arial, "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, "WenQuanYi Zen Hei Sharp", sans-serif;
+}
\ No newline at end of file
diff --git a/assets/css/setting.css b/assets/css/setting.css
index 99975fb..bf4544f 100644
--- a/assets/css/setting.css
+++ b/assets/css/setting.css
@@ -1,5 +1,5 @@
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
- font-family: "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", sans-serif, -apple-system, "Noto Sans", "Helvetica Neue", Helvetica, "Nimbus Sans L", Arial, "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, "WenQuanYi Zen Hei Sharp", sans-serif;
+ font-family: -apple-system, "Noto Sans", "Helvetica Neue", Helvetica, "Nimbus Sans L", Arial, "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, "WenQuanYi Zen Hei Sharp", sans-serif;
}
#wpcontent, #wpfooter {
diff --git a/helpers.php b/helpers.php
index e3e545d..c69e791 100644
--- a/helpers.php
+++ b/helpers.php
@@ -16,5 +16,6 @@ function get_settings() {
'cravatar' => 'cn',
'windfonts' => 'off',
'adblock' => 'off',
+ 'monitor' => 'on',
] );
}
diff --git a/wp-china-yes.php b/wp-china-yes.php
index fe0b3e5..51a627d 100644
--- a/wp-china-yes.php
+++ b/wp-china-yes.php
@@ -4,7 +4,7 @@
* Description: 文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,生生不息。
* Author: 文派开源
* Author URI: https://wp-china-yes.com
- * Version: 3.6.2
+ * Version: 3.6.3
* License: GPLv3 or later
* Text Domain: wp-china-yes
* Domain Path: /languages
@@ -19,7 +19,7 @@ namespace WenPai\ChinaYes;
defined( 'ABSPATH' ) || exit;
-define( 'CHINA_YES_VERSION', '3.6.2' );
+define( 'CHINA_YES_VERSION', '3.6.3' );
define( 'CHINA_YES_PLUGIN_FILE', __FILE__ );
define( 'CHINA_YES_PLUGIN_URL', plugin_dir_url( CHINA_YES_PLUGIN_FILE ) );
define( 'CHINA_YES_PLUGIN_PATH', plugin_dir_path( CHINA_YES_PLUGIN_FILE ) );
From de8b6ccaa60ee1dd6b57ebb74832f4f6338dfd1b Mon Sep 17 00:00:00 2001
From: devhaozi
Date: Fri, 23 Aug 2024 06:47:40 +0000
Subject: [PATCH 079/120] docs: Update CHANGELOG
---
CHANGELOG.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f9b7bdb..dfc8b8d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,15 @@
All notable changes to `WP-China-Yes` will be documented in this file.
+## v3.6.3 - 2024-08-23
+
+1. 为自动监控功能添加开关
+2. adminCDN 支持 jsDelivr 加速
+3. Windfonts 支持优化模式开关
+
+**adminCDN 的 jsd 加速默认屏蔽 gh 端点,如有主题插件作者需要使用请联系加白。**
+**Full Changelog**: https://github.com/WenPai-org/wp-china-yes/compare/v3.6.2...v3.6.3
+
## v3.6.2 - 2024-03-09
1. UI 重构
From 8a4d74e997fcb7ae9af5ef8299e0c2c946c6efa0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Fri, 23 Aug 2024 14:48:31 +0800
Subject: [PATCH 080/120] feat: bump version 3.6.4
---
Service/Super.php | 33 +++---
languages/wp-china-yes-en_US.mo | Bin 0 -> 5870 bytes
languages/wp-china-yes-en_US.po | 171 ++++++++++++++++++++++++++++++++
languages/wp-china-yes-zh_CN.mo | Bin 0 -> 5468 bytes
languages/wp-china-yes-zh_CN.po | 160 ++++++++++++++++++++++++++++++
languages/wp-china-yes-zh_TW.mo | Bin 0 -> 5492 bytes
languages/wp-china-yes-zh_TW.po | 160 ++++++++++++++++++++++++++++++
wp-china-yes.php | 4 +-
8 files changed, 513 insertions(+), 15 deletions(-)
create mode 100644 languages/wp-china-yes-en_US.mo
create mode 100644 languages/wp-china-yes-en_US.po
create mode 100644 languages/wp-china-yes-zh_CN.mo
create mode 100644 languages/wp-china-yes-zh_CN.po
create mode 100644 languages/wp-china-yes-zh_TW.mo
create mode 100644 languages/wp-china-yes-zh_TW.po
diff --git a/Service/Super.php b/Service/Super.php
index 1597550..38518cf 100644
--- a/Service/Super.php
+++ b/Service/Super.php
@@ -159,15 +159,10 @@ class Super {
* 前台静态加速
*/
if ( ! empty( $this->settings['admincdn']['frontend'] ) ) {
- add_action( 'template_redirect', function () {
- ob_start( function ( $content ) {
- $regex = '#(?<=[(\"\'])(?:' . quotemeta( home_url() ) . ')?/(?:((?:wp-content|wp-includes)[^\"\')]+\.(css|js)[^\"\')]+))(?=[\"\')])#';
-
- return preg_replace_callback( $regex, function ( $asset ) {
- return 'https://public.admincdn.com/' . $asset[0];
- }, $content );
- } );
- } );
+ $this->page_str_replace( 'preg_replace', [
+ '#(?<=[(\"\'])(?:' . quotemeta( home_url() ) . ')?/(?:((?:wp-content|wp-includes)[^\"\')]+\.(css|js)[^\"\')]+))(?=[\"\')])#',
+ 'https://public.admincdn.com/$0'
+ ] );
}
/**
@@ -309,7 +304,11 @@ class Super {
* WordPress 讨论设置中的默认 LOGO 名称替换
*/
public function set_defaults_for_cravatar( $avatar_defaults ) {
- $avatar_defaults['gravatar_default'] = '初认头像';
+ if ( $this->settings['cravatar'] == 'weavatar' ) {
+ $avatar_defaults['gravatar_default'] = 'WeAvatar';
+ } else {
+ $avatar_defaults['gravatar_default'] = '初认头像';
+ }
return $avatar_defaults;
}
@@ -318,7 +317,11 @@ class Super {
* 个人资料卡中的头像上传地址替换
*/
public function set_user_profile_picture_for_cravatar() {
- return '您可以在初认头像修改您的资料图片';
+ if ( $this->settings['cravatar'] == 'weavatar' ) {
+ return '您可以在 WeAvatar 修改您的资料图片';
+ } else {
+ return '您可以在初认头像修改您的资料图片';
+ }
}
/**
@@ -328,12 +331,16 @@ class Super {
* @param $param array 传递给字符串替换函数的参数
*/
private function page_str_replace( $replace_func, $param ) {
- add_action( 'init', function () use ( $replace_func, $param ) {
+ // CLI 下返回,防止影响缓冲区
+ if ( class_exists( 'WP_CLI' ) ) {
+ return;
+ }
+ add_action( 'template_redirect', function () use ( $replace_func, $param ) {
ob_start( function ( $buffer ) use ( $replace_func, $param ) {
$param[] = $buffer;
return call_user_func_array( $replace_func, $param );
} );
- }, 999999 );
+ }, PHP_INT_MAX );
}
}
diff --git a/languages/wp-china-yes-en_US.mo b/languages/wp-china-yes-en_US.mo
new file mode 100644
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=JG8gBWW~k|Ue@%qrR6=FdZ1f-Xf|
zstL+|=q-_R%M{+XX+9360bz7a4|yT$l5h#6pY19&(E7$dvwd?4Act1^#zp}V=ovYY56-0wy!
vPBocj#LAorFPD%k$_D9~c+XYh^XGepZODXkE$}#RzE|mWP2{^lB
literal 0
HcmV?d00001
diff --git a/languages/wp-china-yes-en_US.po b/languages/wp-china-yes-en_US.po
new file mode 100644
index 0000000..9e7e54b
--- /dev/null
+++ b/languages/wp-china-yes-en_US.po
@@ -0,0 +1,171 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: WP-China-Yes\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-08-23 03:41+0000\n"
+"PO-Revision-Date: 2024-08-23 12:21+0800\n"
+"Last-Translator: \n"
+"Language-Team: English (United States)\n"
+"Language: en_US\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Poedit 3.4.4\n"
+"X-Loco-Version: 2.6.11; wp-6.6\n"
+"X-Domain: wp-china-yes\n"
+
+#: Service/Setting.php:54
+msgid ""
+"萌芽加速(adminCDN)"
+"将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需要"
+"加速的项目,更多细节控制和功能,请关注 adminCDN 项目。"
+msgstr ""
+"adminCDN switches "
+"the static files that WordPress relies on to public resources to speed up "
+"website access. You can enable the projects that need to be accelerated as "
+"needed. For more detailed control and functions, please pay attention to the "
+"adminCDN project."
+
+#: Service/Setting.php:72
+msgid ""
+"初认头像(Cravatar)"
+"a>Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请安"
+"装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 "
+"WordPress)"
+msgstr ""
+"Cravatar is a "
+"perfect alternative to Gravatar in China. You can upload your avatar on "
+"Cravatar.com. For more options, please install the WPAavatar plugin. (Any "
+"developer can integrate this service into their own products, not limited to "
+"WordPress)"
+
+#: Service/Setting.php:86
+msgid ""
+"文风字体(Windfonts)"
+"a>为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器"
+"字体调用。"
+msgstr ""
+"Windfonts renders "
+"Chinese fonts for your web pages and accelerates fonts in themes and plug-"
+"ins; the optimization mode can optimize browser font calls."
+
+#: Service/Setting.php:109
+msgid ""
+"文派叶子🍃(WP-"
+"China-Yes)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节点"
+"或关闭加速,以保证您的网站正常访问。"
+msgstr ""
+"WP-China-Yes 🍃 "
+"(文派叶子) supports automatic monitoring of the availability of each "
+"acceleration node. When a node is unavailable, it automatically switches to "
+"an available node or turns off acceleration to ensure normal access to your "
+"website."
+
+#: Service/Setting.php:98
+msgid ""
+"文派叶子🍃(WP-"
+"China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用"
+"插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,"
+"查看可优化插件列表"
+"a>。"
+msgstr ""
+"WP-China-Yes 🍃 "
+"(文派叶子) unique features allow you to have a clean and tidy WordPress "
+"backend, removing all kinds of intrusive backend ads, notifications and "
+"useless information from commonly used plugins; if there is abnormal "
+"interception after enabling, please switch to manual mode and check the list of optimizable "
+"plugins."
+
+#: Service/Setting.php:41
+msgid ""
+"官方加速源(WPMirror)"
+"a>直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文"
+"派翻译平台。"
+msgstr ""
+"The official "
+"acceleration source (WPMirror) is directly reverse-generated from .org "
+"to the mainland for distribution; WenPai.org Open Source has its own hosting warehouse "
+"in China and is integrated with the WenPai translation platform."
+
+#. Author URI of the plugin
+msgid "https://wp-china-yes.com"
+msgstr "https://wp-china-yes.com"
+
+#. Name of the plugin
+#: Service/Setting.php:143 Service/Setting.php:144
+msgid "WP-China-Yes"
+msgstr "WP-China-Yes"
+
+#: Plugin.php:52
+#, php-format
+msgid ""
+"WP-China-Yes 插件需要 PHP 5.6.0 或更高版本,当前版本为 %s,插件已自动禁用。"
+msgstr ""
+"The WP-China-Yes plugin requires PHP 5.6.0 or higher. The current version is "
+"%s and the plugin has been automatically disabled."
+
+#: Service/Setting.php:71
+msgid "初认头像"
+msgstr "Cravatar"
+
+#: Service/Setting.php:97
+msgid "广告拦截"
+msgstr "Ad Blocker"
+
+#: Service/Setting.php:40
+msgid "应用市场"
+msgstr "App Market"
+
+#. Description of the plugin
+msgid ""
+"文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,"
+"生生不息。"
+msgstr ""
+"WP-China-Yes 🍃 (文派叶子) is the infrastructure software for the Chinese "
+"WordPress ecosystem, just like fallen leaves sprouting new leaves, it is "
+"everlasting."
+
+#. Author of the plugin
+msgid "文派开源"
+msgstr "WenPai.org"
+
+#: Service/Setting.php:85
+msgid "文风字体"
+msgstr "Windfonts"
+
+#: Plugin.php:71
+msgid "检测到不兼容的插件 Kill 429,已自动禁用!"
+msgstr "Incompatible plugin Kill 429 detected, automatically disabled!"
+
+#: Plugin.php:65
+msgid "检测到不兼容的插件 WP-China-Plus,已自动禁用!"
+msgstr "Incompatible plugin WP-China-Plus detected and automatically disabled!"
+
+#: Plugin.php:78
+msgid ""
+"检测到已在 WordPress 配置文件中设置代理服务器,这可能会导致插件无法正常工作!"
+msgstr ""
+"A proxy server has been detected in the WordPress configuration file. This "
+"may cause the plugin to not work properly!"
+
+#: Plugin.php:59
+msgid "检测到旧版插件 WP-China-No,已自动禁用!"
+msgstr ""
+"An old version of the plugin WP-China-No has been detected and automatically "
+"disabled!"
+
+#: Service/Setting.php:108
+msgid "自动监控"
+msgstr "Automatic Monitor"
+
+#: Service/Setting.php:53
+msgid "萌芽加速"
+msgstr "adminCDN"
+
+#: Service/Setting.php:32 Service/Setting.php:155
+msgid "设置"
+msgstr "Setting"
diff --git a/languages/wp-china-yes-zh_CN.mo b/languages/wp-china-y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k@8sM{#7XnLgY7>fC>*Td0@oB5h(OAdm`sWTWWFpM%y;qe2~TGW
zyvQFAwKfs(I2kqN8Rl50)?xo`Ah*LXT#8h@UGczgW|%&ml>07#r1_q)@enH#u#jFMTk@
z%N2RJY}Do-VM}LLS+MP_!hz@1+KbxbSstvp!oll`z-b9yUHgOL3rTPIrMDG57|>Kt
zb5&Gu*IP=zriY{p!R~-x`pvcOpma&|h%WDMrMHyp0X9K8Cx;Y|*x~LtA-PXW9WRQ<
zJ3Jlk7u=`aZr6D^7?LjOvKs7_Lz<46=Vi6~n%u2OmlV0rBbxaz4n%&??SJ!#AN9P`
zbaWIc%6+2u>GN~fFS*w$AS
zU3x|JY5suP?GaDE8wj}&SY7UwUe)xzphr~u?Pl=I@lKKdJmc-wVlG}b6Ourd05B(De5|WXE?fFIv4Gu`{mL7
j^5}kv|57?9-G8}IAKfpH?w3dR%jT8q=zjVCdcXWPOdu@z
literal 0
HcmV?d00001
diff --git a/languages/wp-china-yes-zh_CN.po b/languages/wp-china-yes-zh_CN.po
new file mode 100644
index 0000000..08cf984
--- /dev/null
+++ b/languages/wp-china-yes-zh_CN.po
@@ -0,0 +1,160 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: WP-China-Yes\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-08-23 03:41+0000\n"
+"PO-Revision-Date: 2024-08-23 12:20+0800\n"
+"Last-Translator: \n"
+"Language-Team: 简体中文\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 3.4.4\n"
+"X-Loco-Version: 2.6.10; wp-6.6\n"
+"X-Domain: wp-china-yes\n"
+
+#: Service/Setting.php:54
+msgid ""
+"萌芽加速(adminCDN)"
+"将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需"
+"要加速的项目,更多细节控制和功能,请关注 adminCDN 项目。"
+msgstr ""
+"萌芽加速(adminCDN)"
+"将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需"
+"要加速的项目,更多细节控制和功能,请关注 adminCDN 项目。"
+
+#: Service/Setting.php:72
+msgid ""
+"初认头像(Cravatar)"
+"a>Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请"
+"安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 "
+"WordPress)"
+msgstr ""
+"初认头像(Cravatar)"
+"a>Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请"
+"安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 "
+"WordPress)"
+
+#: Service/Setting.php:86
+msgid ""
+"文风字体(Windfonts)"
+"a>为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器"
+"字体调用。"
+msgstr ""
+"文风字体(Windfonts)"
+"a>为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器"
+"字体调用。"
+
+#: Service/Setting.php:109
+msgid ""
+"文派叶子🍃(WP-"
+"China-Yes)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节"
+"点或关闭加速,以保证您的网站正常访问。"
+msgstr ""
+"文派叶子🍃(WP-"
+"China-Yes)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节"
+"点或关闭加速,以保证您的网站正常访问。"
+
+#: Service/Setting.php:98
+msgid ""
+"文派叶子🍃(WP-"
+"China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用"
+"插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,"
+"查看可优化插件列表"
+"a>。"
+msgstr ""
+"文派叶子🍃(WP-"
+"China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用"
+"插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,"
+"查看可优化插件列表"
+"a>。"
+
+#: Service/Setting.php:41
+msgid ""
+"官方加速源(WPMirror)"
+"a>直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文"
+"派翻译平台。"
+msgstr ""
+"官方加速源(WPMirror)"
+"a>直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文"
+"派翻译平台。"
+
+#. Author URI of the plugin
+msgid "https://wp-china-yes.com"
+msgstr "https://wp-china-yes.com"
+
+#. Name of the plugin
+#: Service/Setting.php:143 Service/Setting.php:144
+msgid "WP-China-Yes"
+msgstr "WP-China-Yes"
+
+#: Plugin.php:52
+#, php-format
+msgid ""
+"WP-China-Yes 插件需要 PHP 5.6.0 或更高版本,当前版本为 %s,插件已自动禁用。"
+msgstr ""
+"WP-China-Yes 插件需要 PHP 5.6.0 或更高版本,当前版本为 %s,插件已自动禁用。"
+
+#: Service/Setting.php:71
+msgid "初认头像"
+msgstr "初认头像"
+
+#: Service/Setting.php:97
+msgid "广告拦截"
+msgstr "广告拦截"
+
+#: Service/Setting.php:40
+msgid "应用市场"
+msgstr "应用市场"
+
+#. Description of the plugin
+msgid ""
+"文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,"
+"生生不息。"
+msgstr ""
+"文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,"
+"生生不息。"
+
+#. Author of the plugin
+msgid "文派开源"
+msgstr "文派开源"
+
+#: Service/Setting.php:85
+msgid "文风字体"
+msgstr "文风字体"
+
+#: Plugin.php:71
+msgid "检测到不兼容的插件 Kill 429,已自动禁用!"
+msgstr "检测到不兼容的插件 Kill 429,已自动禁用!"
+
+#: Plugin.php:65
+msgid "检测到不兼容的插件 WP-China-Plus,已自动禁用!"
+msgstr "检测到不兼容的插件 WP-China-Plus,已自动禁用!"
+
+#: Plugin.php:78
+msgid ""
+"检测到已在 WordPress 配置文件中设置代理服务器,这可能会导致插件无法正常工"
+"作!"
+msgstr ""
+"检测到已在 WordPress 配置文件中设置代理服务器,这可能会导致插件无法正常工"
+"作!"
+
+#: Plugin.php:59
+msgid "检测到旧版插件 WP-China-No,已自动禁用!"
+msgstr "检测到旧版插件 WP-China-No,已自动禁用!"
+
+#: Service/Setting.php:108
+msgid "自动监控"
+msgstr "自动监控"
+
+#: Service/Setting.php:53
+msgid "萌芽加速"
+msgstr "萌芽加速"
+
+#: Service/Setting.php:32 Service/Setting.php:155
+msgid "设置"
+msgstr "设置"
diff --git a/languages/wp-china-yes-zh_TW.mo b/languages/wp-china-yes-zh_TW.mo
new file mode 100644
index 0000000000000000000000000000000000000000..69ac10ceb5e68effc045a644c6af17621786528e
GIT binary patch
literal 5492
zcmchb+jARN9mf|4(3)!lr93dO;~AbhvK=?cBu!oc-O;NBR576Hx)zOZa>bpTFSq1AIcC!yjDFeI6fte;%?G^5ho;;m;U9b3zcF
zK%V%bAp8;IpFpyCzyGozd==v#J|_r0kY32|LjD7ijh}d)%NKO{eaPDwe_6j@&}A0#
zJjP3qmmvQMX@NY`A_!+8mmt}Gf77J``6b+c0yzLZ{sqbOF=G0@
zyl%DicH2yLyD06?DmyXx?ua@Yr%o4*d8Ohm@pIIkaMSTs;@c%3VdptzxQwSt_95|X(XF&tQCs9I@eZNE5j{5JZ6nNoiX(_`R>>@p
zrEM}Ch9fTPvvo(jq2G!mnU?Y!BvFQ%BomVN$7$j~DlXF49!>d}%9?RfaTznk$}a4k
zqLdFvrTNMmblX&?A38HjGJa*zBVO$f{$Wz|RGX?;m<7zxxg;&+A&
zJ^f~j(eQzZTV(9DH&y_&qucu=yh}DBPv*vknPJ_A%i6+Une4i4bP5UUV*U=K<-`O_
z#>fa)6uBw8_n;s2pw3meoRlZ|AoD#RpWfwbdATUwEk4etQC|#+tWIxKEDs@nq=Q){
z>#8~wWkfd?Nj}eu=`%N24&Eo3UD>~<_%~}6m-!e9(IB$RPxBtxSEkWzy6r*$YpErY
z$T$h-SS{o|YJ3Tfk{=YIIrEPea%q2uc$QgEw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Press 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需"
+"要加速的项目,更多细节控制和功能,请关注 adminCDN 项目。"
+msgstr ""
+"萌芽加速(adminCDN)"
+"將 WordPress 依賴的靜態檔案切換為公共資源,加快網站訪問速度。您可按需啟用需"
+"要加速的專案,更多細節控制和功能,請關注 adminCDN 專案。"
+
+#: Service/Setting.php:72
+msgid ""
+"初认头像(Cravatar)"
+"a>Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请"
+"安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 "
+"WordPress)"
+msgstr ""
+"初認頭像(Cravatar)"
+"a>Gravatar 在中國的完美替代方案,您可以在 Cravatar.com 上傳頭像,更多選項請"
+"安裝 WPAavatar 外掛。(任何開發者均可在自己的產品中整合該服務,不侷限於 "
+"WordPress)"
+
+#: Service/Setting.php:86
+msgid ""
+"文风字体(Windfonts)"
+"a>为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器"
+"字体调用。"
+msgstr ""
+"文風字型(Windfonts)"
+"a>為您的網頁渲染中文字型並對主題、外掛內的字型進行加速;最佳化模式可最佳化瀏"
+"覽器字型呼叫。"
+
+#: Service/Setting.php:109
+msgid ""
+"文派叶子🍃(WP-"
+"China-Yes)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节"
+"点或关闭加速,以保证您的网站正常访问。"
+msgstr ""
+"文派葉子🍃(WP-"
+"China-Yes)支援自動監控各加速節點可用性,當節點不可用時自動切換至可用節"
+"點或關閉加速,以保證您的網站正常訪問。"
+
+#: Service/Setting.php:98
+msgid ""
+"文派叶子🍃(WP-"
+"China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用"
+"插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,"
+"查看可优化插件列表"
+"a>。"
+msgstr ""
+"文派葉子🍃(WP-"
+"China-Yes)獨家特色功能,讓您擁有清爽整潔的 WordPress 後臺,清除各類常用"
+"外掛侵入式後臺廣告、通知及無用資訊;啟用後若存在異常攔截,請切換為手動模式,"
+"檢視可最佳化外掛列表"
+"。"
+
+#: Service/Setting.php:41
+msgid ""
+"官方加速源(WPMirror)"
+"a>直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文"
+"派翻译平台。"
+msgstr ""
+"官方加速源(WPMirror)"
+"a>直接從 .org 反代至大陸分發;文派開源(WenPai.org)中國境內自建託管倉庫,同時整合文"
+"派翻譯平臺。"
+
+#. Author URI of the plugin
+msgid "https://wp-china-yes.com"
+msgstr "https://wp-china-yes.com"
+
+#. Name of the plugin
+#: Service/Setting.php:143 Service/Setting.php:144
+msgid "WP-China-Yes"
+msgstr "文派葉子"
+
+#: Plugin.php:52
+#, php-format
+msgid ""
+"WP-China-Yes 插件需要 PHP 5.6.0 或更高版本,当前版本为 %s,插件已自动禁用。"
+msgstr ""
+"WP-China-Yes 外掛程式需要PHP 5.6.0 或更高版本,目前版本為%s,外掛程式已自動"
+"停用。"
+
+#: Service/Setting.php:71
+msgid "初认头像"
+msgstr "初認頭像"
+
+#: Service/Setting.php:97
+msgid "广告拦截"
+msgstr "廣告攔截"
+
+#: Service/Setting.php:40
+msgid "应用市场"
+msgstr "應用市場"
+
+#. Description of the plugin
+msgid ""
+"文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,"
+"生生不息。"
+msgstr ""
+"文派葉子 🍃(WP-China-Yes)是中國 WordPress 生態基礎設施軟體,猶如落葉新芽,"
+"生生不息。"
+
+#. Author of the plugin
+msgid "文派开源"
+msgstr "文派開源"
+
+#: Service/Setting.php:85
+msgid "文风字体"
+msgstr "文風字體"
+
+#: Plugin.php:71
+msgid "检测到不兼容的插件 Kill 429,已自动禁用!"
+msgstr "偵測到不相容的插件Kill 429,已自動停用!"
+
+#: Plugin.php:65
+msgid "检测到不兼容的插件 WP-China-Plus,已自动禁用!"
+msgstr "偵測到不相容的外掛程式WP-China-Plus,已自動停用!"
+
+#: Plugin.php:78
+msgid ""
+"检测到已在 WordPress 配置文件中设置代理服务器,这可能会导致插件无法正常工"
+"作!"
+msgstr ""
+"偵測到已在WordPress 設定檔中設定代理伺服器,這可能會導致外掛無法正常運作!"
+
+#: Plugin.php:59
+msgid "检测到旧版插件 WP-China-No,已自动禁用!"
+msgstr "偵測到舊版外掛程式WP-China-No,已自動停用!"
+
+#: Service/Setting.php:108
+msgid "自动监控"
+msgstr "自動監控"
+
+#: Service/Setting.php:53
+msgid "萌芽加速"
+msgstr "萌芽加速"
+
+#: Service/Setting.php:32 Service/Setting.php:155
+msgid "设置"
+msgstr "設定"
diff --git a/wp-china-yes.php b/wp-china-yes.php
index 51a627d..be3c2fe 100644
--- a/wp-china-yes.php
+++ b/wp-china-yes.php
@@ -4,7 +4,7 @@
* Description: 文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,生生不息。
* Author: 文派开源
* Author URI: https://wp-china-yes.com
- * Version: 3.6.3
+ * Version: 3.6.4
* License: GPLv3 or later
* Text Domain: wp-china-yes
* Domain Path: /languages
@@ -19,7 +19,7 @@ namespace WenPai\ChinaYes;
defined( 'ABSPATH' ) || exit;
-define( 'CHINA_YES_VERSION', '3.6.3' );
+define( 'CHINA_YES_VERSION', '3.6.4' );
define( 'CHINA_YES_PLUGIN_FILE', __FILE__ );
define( 'CHINA_YES_PLUGIN_URL', plugin_dir_url( CHINA_YES_PLUGIN_FILE ) );
define( 'CHINA_YES_PLUGIN_PATH', plugin_dir_path( CHINA_YES_PLUGIN_FILE ) );
From 73f4d6eba58ffb0bf1f1715ad355d258e868cea3 Mon Sep 17 00:00:00 2001
From: devhaozi
Date: Fri, 23 Aug 2024 06:51:52 +0000
Subject: [PATCH 081/120] docs: Update CHANGELOG
---
CHANGELOG.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dfc8b8d..0f07db0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,13 @@
All notable changes to `WP-China-Yes` will be documented in this file.
+## v3.6.4 - 2024-08-23
+
+1. WP-CLI 下不运行 adminCDN 部分,防止影响缓冲区。
+2. 部分文案调整支持多语言。
+
+**Full Changelog**: https://github.com/WenPai-org/wp-china-yes/compare/v3.6.3...v3.6.4
+
## v3.6.3 - 2024-08-23
1. 为自动监控功能添加开关
From 7f1b9a5672c4c0ca0093359aee7f777e8928d4ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Fri, 23 Aug 2024 15:34:45 +0800
Subject: [PATCH 082/120] =?UTF-8?q?fix:=20cli=E5=88=A4=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Service/Super.php | 18 +++++++++---------
wp-china-yes.php | 4 ++--
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/Service/Super.php b/Service/Super.php
index 38518cf..5506a35 100644
--- a/Service/Super.php
+++ b/Service/Super.php
@@ -147,7 +147,7 @@ class Super {
global $concatenate_scripts;
$concatenate_scripts = false;
- $this->page_str_replace( 'preg_replace', [
+ $this->page_str_replace( 'init', 'preg_replace', [
'~' . home_url( '/' ) . '(wp-admin|wp-includes)/(css|js)/~',
sprintf( 'https://wpstatic.admincdn.com/%s/$1/$2/', $GLOBALS['wp_version'] )
] );
@@ -159,7 +159,7 @@ class Super {
* 前台静态加速
*/
if ( ! empty( $this->settings['admincdn']['frontend'] ) ) {
- $this->page_str_replace( 'preg_replace', [
+ $this->page_str_replace( 'template_redirect', 'preg_replace', [
'#(?<=[(\"\'])(?:' . quotemeta( home_url() ) . ')?/(?:((?:wp-content|wp-includes)[^\"\')]+\.(css|js)[^\"\')]+))(?=[\"\')])#',
'https://public.admincdn.com/$0'
] );
@@ -169,7 +169,7 @@ class Super {
* Google 字体替换
*/
if ( ! empty( $this->settings['admincdn']['googlefonts'] ) ) {
- $this->page_str_replace( 'str_replace', [
+ $this->page_str_replace( 'init', 'str_replace', [
'fonts.googleapis.com',
'googlefonts.admincdn.com'
] );
@@ -179,7 +179,7 @@ class Super {
* Google 前端公共库替换
*/
if ( ! empty( $this->settings['admincdn']['googleajax'] ) ) {
- $this->page_str_replace( 'str_replace', [
+ $this->page_str_replace( 'init', 'str_replace', [
'ajax.googleapis.com',
'googleajax.admincdn.com'
] );
@@ -189,7 +189,7 @@ class Super {
* CDNJS 前端公共库替换
*/
if ( ! empty( $this->settings['admincdn']['cdnjs'] ) ) {
- $this->page_str_replace( 'str_replace', [
+ $this->page_str_replace( 'init', 'str_replace', [
'cdnjs.cloudflare.com/ajax/libs',
'cdnjs.admincdn.com'
] );
@@ -199,7 +199,7 @@ class Super {
* jsDelivr 前端公共库替换
*/
if ( ! empty( $this->settings['admincdn']['jsdelivr'] ) ) {
- $this->page_str_replace( 'str_replace', [
+ $this->page_str_replace( 'init', 'str_replace', [
'cdn.jsdelivr.net',
'jsd.admincdn.com'
] );
@@ -330,12 +330,12 @@ class Super {
* @param $replace_func string 要调用的字符串关键字替换函数
* @param $param array 传递给字符串替换函数的参数
*/
- private function page_str_replace( $replace_func, $param ) {
+ private function page_str_replace( $hook, $replace_func, $param ) {
// CLI 下返回,防止影响缓冲区
- if ( class_exists( 'WP_CLI' ) ) {
+ if ( php_sapi_name() == 'cli' ) {
return;
}
- add_action( 'template_redirect', function () use ( $replace_func, $param ) {
+ add_action( $hook, function () use ( $replace_func, $param ) {
ob_start( function ( $buffer ) use ( $replace_func, $param ) {
$param[] = $buffer;
diff --git a/wp-china-yes.php b/wp-china-yes.php
index be3c2fe..1fe9762 100644
--- a/wp-china-yes.php
+++ b/wp-china-yes.php
@@ -4,7 +4,7 @@
* Description: 文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,生生不息。
* Author: 文派开源
* Author URI: https://wp-china-yes.com
- * Version: 3.6.4
+ * Version: 3.6.5
* License: GPLv3 or later
* Text Domain: wp-china-yes
* Domain Path: /languages
@@ -19,7 +19,7 @@ namespace WenPai\ChinaYes;
defined( 'ABSPATH' ) || exit;
-define( 'CHINA_YES_VERSION', '3.6.4' );
+define( 'CHINA_YES_VERSION', '3.6.5' );
define( 'CHINA_YES_PLUGIN_FILE', __FILE__ );
define( 'CHINA_YES_PLUGIN_URL', plugin_dir_url( CHINA_YES_PLUGIN_FILE ) );
define( 'CHINA_YES_PLUGIN_PATH', plugin_dir_path( CHINA_YES_PLUGIN_FILE ) );
From dd912a9e31cb89d221eb4a37cf0ac7e5047278a0 Mon Sep 17 00:00:00 2001
From: devhaozi
Date: Fri, 23 Aug 2024 07:36:09 +0000
Subject: [PATCH 083/120] docs: Update CHANGELOG
---
CHANGELOG.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0f07db0..1d10811 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,13 @@
All notable changes to `WP-China-Yes` will be documented in this file.
+## v3.6.5 - 2024-08-23
+
+1. 优化 CLI 判断
+2. 回退替换钩子修改
+
+**Full Changelog**: https://github.com/WenPai-org/wp-china-yes/compare/v3.6.4...v3.6.5
+
## v3.6.4 - 2024-08-23
1. WP-CLI 下不运行 adminCDN 部分,防止影响缓冲区。
From 2391c18baebb36ef6333f63159ed83572177b13d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Mon, 23 Sep 2024 20:15:18 +0800
Subject: [PATCH 084/120] feat: v3.7.0
---
Service/Monitor.php | 26 +-
Service/Setting.php | 488 +++--
Service/Super.php | 101 +-
assets/css/setting.css | 241 +--
composer.json | 4 +-
composer.lock | 46 +-
framework/assets/css/style-rtl.min.css | 1 +
framework/assets/css/style.min.css | 1 +
framework/assets/images/checkerboard.png | Bin 0 -> 2340 bytes
framework/assets/images/wp-logo.svg | 1 +
framework/assets/images/wp-plugin-logo.svg | 1 +
framework/assets/js/main.min.js | 2 +
framework/assets/js/plugins.min.js | 2 +
framework/classes/abstract.class.php | 195 ++
framework/classes/admin-options.class.php | 667 +++++++
framework/classes/fields.class.php | 405 +++++
framework/classes/setup.class.php | 800 ++++++++
framework/fields/accordion/accordion.php | 64 +
framework/fields/background/background.php | 340 ++++
framework/fields/backup/backup.php | 38 +
framework/fields/border/border.php | 176 ++
framework/fields/button_set/button_set.php | 67 +
framework/fields/callback/callback.php | 31 +
framework/fields/checkbox/checkbox.php | 101 ++
framework/fields/code_editor/code_editor.php | 58 +
framework/fields/color/color.php | 52 +
framework/fields/color_group/color_group.php | 42 +
framework/fields/content/content.php | 28 +
framework/fields/date/date.php | 64 +
framework/fields/datetime/datetime.php | 61 +
framework/fields/dimensions/dimensions.php | 101 ++
framework/fields/fieldset/fieldset.php | 41 +
framework/fields/gallery/gallery.php | 52 +
framework/fields/group/group.php | 164 ++
framework/fields/heading/heading.php | 24 +
framework/fields/icon/fa4-icons.php | 12 +
framework/fields/icon/fa5-icons.php | 12 +
framework/fields/icon/icon.php | 71 +
.../fields/image_select/image_select.php | 79 +
framework/fields/index.php | 1 +
framework/fields/link/link.php | 82 +
framework/fields/link_color/link_color.php | 91 +
framework/fields/map/map.php | 98 +
framework/fields/media/media.php | 96 +
framework/fields/notice/notice.php | 26 +
framework/fields/number/number.php | 63 +
framework/fields/palette/palette.php | 58 +
framework/fields/radio/radio.php | 93 +
framework/fields/repeater/repeater.php | 108 ++
framework/fields/select/select.php | 132 ++
framework/fields/slider/slider.php | 78 +
framework/fields/sortable/sortable.php | 87 +
framework/fields/sorter/sorter.php | 76 +
framework/fields/spacing/spacing.php | 171 ++
framework/fields/spinner/spinner.php | 70 +
framework/fields/subheading/subheading.php | 24 +
framework/fields/submessage/submessage.php | 26 +
framework/fields/switcher/switcher.php | 40 +
framework/fields/tabbed/tabbed.php | 64 +
framework/fields/text/text.php | 30 +
framework/fields/textarea/textarea.php | 58 +
framework/fields/typography/google-fonts.php | 1607 +++++++++++++++++
framework/fields/typography/typography.php | 544 ++++++
framework/fields/upload/upload.php | 61 +
framework/fields/wp_editor/wp_editor.php | 107 ++
framework/functions/actions.php | 190 ++
framework/functions/customize.php | 142 ++
framework/functions/helpers.php | 58 +
framework/functions/sanitize.php | 29 +
framework/functions/validate.php | 152 ++
framework/functions/walker.php | 28 +
framework/index.php | 1 +
framework/languages/zh_CN.mo | Bin 0 -> 8354 bytes
framework/languages/zh_CN.po | 672 +++++++
helpers.php | 18 +-
wp-china-yes.php | 4 +-
76 files changed, 9491 insertions(+), 353 deletions(-)
create mode 100644 framework/assets/css/style-rtl.min.css
create mode 100644 framework/assets/css/style.min.css
create mode 100644 framework/assets/images/checkerboard.png
create mode 100644 framework/assets/images/wp-logo.svg
create mode 100644 framework/assets/images/wp-plugin-logo.svg
create mode 100644 framework/assets/js/main.min.js
create mode 100644 framework/assets/js/plugins.min.js
create mode 100644 framework/classes/abstract.class.php
create mode 100644 framework/classes/admin-options.class.php
create mode 100644 framework/classes/fields.class.php
create mode 100644 framework/classes/setup.class.php
create mode 100644 framework/fields/accordion/accordion.php
create mode 100644 framework/fields/background/background.php
create mode 100644 framework/fields/backup/backup.php
create mode 100644 framework/fields/border/border.php
create mode 100644 framework/fields/button_set/button_set.php
create mode 100644 framework/fields/callback/callback.php
create mode 100644 framework/fields/checkbox/checkbox.php
create mode 100644 framework/fields/code_editor/code_editor.php
create mode 100644 framework/fields/color/color.php
create mode 100644 framework/fields/color_group/color_group.php
create mode 100644 framework/fields/content/content.php
create mode 100644 framework/fields/date/date.php
create mode 100644 framework/fields/datetime/datetime.php
create mode 100644 framework/fields/dimensions/dimensions.php
create mode 100644 framework/fields/fieldset/fieldset.php
create mode 100644 framework/fields/gallery/gallery.php
create mode 100644 framework/fields/group/group.php
create mode 100644 framework/fields/heading/heading.php
create mode 100644 framework/fields/icon/fa4-icons.php
create mode 100644 framework/fields/icon/fa5-icons.php
create mode 100644 framework/fields/icon/icon.php
create mode 100644 framework/fields/image_select/image_select.php
create mode 100644 framework/fields/index.php
create mode 100644 framework/fields/link/link.php
create mode 100644 framework/fields/link_color/link_color.php
create mode 100644 framework/fields/map/map.php
create mode 100644 framework/fields/media/media.php
create mode 100644 framework/fields/notice/notice.php
create mode 100644 framework/fields/number/number.php
create mode 100644 framework/fields/palette/palette.php
create mode 100644 framework/fields/radio/radio.php
create mode 100644 framework/fields/repeater/repeater.php
create mode 100644 framework/fields/select/select.php
create mode 100644 framework/fields/slider/slider.php
create mode 100644 framework/fields/sortable/sortable.php
create mode 100644 framework/fields/sorter/sorter.php
create mode 100644 framework/fields/spacing/spacing.php
create mode 100644 framework/fields/spinner/spinner.php
create mode 100644 framework/fields/subheading/subheading.php
create mode 100644 framework/fields/submessage/submessage.php
create mode 100644 framework/fields/switcher/switcher.php
create mode 100644 framework/fields/tabbed/tabbed.php
create mode 100644 framework/fields/text/text.php
create mode 100644 framework/fields/textarea/textarea.php
create mode 100644 framework/fields/typography/google-fonts.php
create mode 100644 framework/fields/typography/typography.php
create mode 100644 framework/fields/upload/upload.php
create mode 100644 framework/fields/wp_editor/wp_editor.php
create mode 100644 framework/functions/actions.php
create mode 100644 framework/functions/customize.php
create mode 100644 framework/functions/helpers.php
create mode 100644 framework/functions/sanitize.php
create mode 100644 framework/functions/validate.php
create mode 100644 framework/functions/walker.php
create mode 100644 framework/index.php
create mode 100644 framework/languages/zh_CN.mo
create mode 100644 framework/languages/zh_CN.po
diff --git a/Service/Monitor.php b/Service/Monitor.php
index 1f867f7..bcdecb4 100644
--- a/Service/Monitor.php
+++ b/Service/Monitor.php
@@ -37,7 +37,7 @@ class Monitor {
* 初始化
*/
public function init() {
- if ( $this->settings['monitor'] != 'on' ) {
+ if ( $this->settings['monitor'] ) {
return;
}
// 检查应用市场可用性
@@ -104,51 +104,51 @@ class Monitor {
*/
public function maybe_check_admincdn() {
// 后台加速
- if ( ! empty( $this->settings['admincdn']['admin'] ) ) {
+ if ( in_array( 'admin', $this->settings['admincdn'] ) ) {
$response = wp_remote_get( 'https://wpstatic.admincdn.com/6.4.3/wp-includes/js/wp-sanitize.min.js' );
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- unset( $this->settings['admincdn']['admin'] );
+ $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'admin' ] ) );
$this->update_settings();
}
}
// 前台加速
- if ( ! empty( $this->settings['admincdn']['frontend'] ) ) {
+ if ( in_array( 'frontend', $this->settings['admincdn'] ) ) {
$url = network_site_url( '/wp-includes/js/wp-sanitize.min.js' );
$response = wp_remote_get( 'https://public.admincdn.com/' . $url );
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- unset( $this->settings['admincdn']['frontend'] );
+ $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'frontend' ] ) );
$this->update_settings();
}
}
// Google 字体
- if ( ! empty( $this->settings['admincdn']['googlefonts'] ) ) {
+ if ( in_array( 'googlefonts', $this->settings['admincdn'] ) ) {
$response = wp_remote_get( 'https://googlefonts.admincdn.com/css?family=Roboto:400,700' );
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- unset( $this->settings['admincdn']['googlefonts'] );
+ $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'googlefonts' ] ) );
$this->update_settings();
}
}
// Google 前端公共库
- if ( ! empty( $this->settings['admincdn']['googleajax'] ) ) {
+ if ( in_array( 'googleajax', $this->settings['admincdn'] ) ) {
$response = wp_remote_get( 'https://googleajax.admincdn.com/ajax/libs/jquery/3.7.1/jquery.slim.min.js' );
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- unset( $this->settings['admincdn']['googleajax'] );
+ $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'googleajax' ] ) );
$this->update_settings();
}
}
// CDNJS 前端公共库
- if ( ! empty( $this->settings['admincdn']['cdnjs'] ) ) {
+ if ( in_array( 'cdnjs', $this->settings['admincdn'] ) ) {
$response = wp_remote_get( 'https://cdnjs.admincdn.com/jquery/3.7.1/jquery.slim.min.js' );
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- unset( $this->settings['admincdn']['cdnjs'] );
+ $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'cdnjs' ] ) );
$this->update_settings();
}
}
// jsDelivr 公共库
- if ( ! empty( $this->settings['admincdn']['jsdelivr'] ) ) {
+ if ( in_array( 'jsdelivr', $this->settings['admincdn'] ) ) {
$response = wp_remote_get( 'https://jsd.admincdn.com/npm/jquery@3.7.1/dist/jquery.slim.min.js' );
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- unset( $this->settings['admincdn']['jsdelivr'] );
+ $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'jsdelivr' ] ) );
$this->update_settings();
}
}
diff --git a/Service/Setting.php b/Service/Setting.php
index c64c782..f85ecbf 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -4,7 +4,8 @@ namespace WenPai\ChinaYes\Service;
defined( 'ABSPATH' ) || exit;
-use TheTNB\Setting\API;
+use WP_CHINA_YES;
+use function WenPai\ChinaYes\get_settings;
/**
* Class Setting
@@ -12,115 +13,375 @@ use TheTNB\Setting\API;
* @package WenPai\ChinaYes\Service
*/
class Setting {
- private $setting_api;
+ private $prefix = 'wp_china_yes';
+ private $settings;
public function __construct() {
- $this->setting_api = new API();
- add_action( 'admin_init', [ $this, 'admin_init' ] );
+ $this->settings = get_settings();
+ add_filter( 'wp_china_yes_enqueue_assets', '__return_true' );
+ add_filter( 'wp_china_yes_fa4', '__return_true' );
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_admin_assets' ] );
add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', [ $this, 'admin_menu' ] );
+ self::admin_init();
}
/**
* 挂载设置项
*/
public function admin_init() {
+ WP_CHINA_YES::createOptions( $this->prefix, [
+ 'framework_title' => sprintf( '%s v%s', $this->settings['custom_name'], CHINA_YES_VERSION ),
+ 'menu_hidden' => $this->settings['hide'],
+ 'menu_title' => $this->settings['custom_name'],
+ 'menu_slug' => 'wp-china-yes',
+ 'menu_type' => 'submenu',
+ 'menu_parent' => is_multisite() ? 'settings.php' : 'options-general.php',
+ 'show_bar_menu' => false,
+ 'show_sub_menu' => false,
+ 'show_search' => false,
+ 'show_reset_section' => false,
+ 'footer_text' => sprintf( '%s 设置', $this->settings['custom_name'] ),
+ 'theme' => 'light',
+ 'enqueue_webfont' => false,
+ 'async_webfont' => true,
+ 'database' => is_multisite() ? 'network' : '',
+ ] );
- $sections = [
- [
- 'id' => 'wp_china_yes',
- 'title' => __( '设置', 'wp-china-yes' )
- ]
- ];
-
- $fields = [
- 'wp_china_yes' => [
+ WP_CHINA_YES::createSection( $this->prefix, [
+ 'title' => '加速设置',
+ 'icon' => 'fa fa-rocket',
+ 'fields' => [
[
- 'name' => 'store',
- 'label' => __( '应用市场', 'wp-china-yes' ),
- 'desc' => __( '官方加速源(WPMirror)直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文派翻译平台。',
- 'wp-china-yes' ),
- 'type' => 'radio',
- 'default' => 'wenpai',
- 'options' => [
+ 'id' => 'store',
+ 'type' => 'radio',
+ 'title' => __( '应用市场', 'wp-china-yes' ),
+ 'inline' => true,
+ 'options' => [
'proxy' => '官方镜像',
'wenpai' => '文派开源',
'off' => '不启用'
- ]
+ ],
+ 'default' => 'wenpai',
+ 'subtitle' => '是否启用市场加速',
+ 'desc' => __( '官方加速源(WPMirror)直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文派翻译平台',
+ 'wp-china-yes' ),
],
[
- 'name' => 'admincdn',
- 'label' => __( '萌芽加速', 'wp-china-yes' ),
- 'desc' => __( '萌芽加速(adminCDN)将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需要加速的项目,更多细节控制和功能,请关注 adminCDN 项目。',
- 'wp-china-yes' ),
- 'type' => 'multicheck',
- 'default' => [
- 'admin' => 'admin',
- ],
- 'options' => [
+ 'id' => 'admincdn',
+ 'type' => 'checkbox',
+ 'title' => __( '萌芽加速', 'wp-china-yes' ),
+ 'inline' => true,
+ 'options' => [
'admin' => '后台加速',
'frontend' => '前台加速',
'googlefonts' => 'Google 字体',
'googleajax' => 'Google 前端公共库',
'cdnjs' => 'CDNJS 前端公共库',
- 'jsdelivr' => 'jsDelivr 公共库',
- ]
+ 'jsdelivr' => 'jsDelivr 公共库'
+ ],
+ 'default' => [
+ 'admin' => 'admin',
+ ],
+ 'subtitle' => '是否启用萌芽加速',
+ 'desc' => __( '萌芽加速(adminCDN)将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需要加速的项目,更多细节控制和功能,请关注 adminCDN 项目',
+ 'wp-china-yes' ),
],
[
- 'name' => 'cravatar',
- 'label' => __( '初认头像', 'wp-china-yes' ),
- 'desc' => __( '初认头像(Cravatar)Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 WordPress)',
- 'wp-china-yes' ),
- 'type' => 'radio',
- 'default' => 'cn',
- 'options' => [
+ 'id' => 'cravatar',
+ 'type' => 'radio',
+ 'title' => __( '初认头像', 'wp-china-yes' ),
+ 'inline' => true,
+ 'options' => [
'cn' => '默认线路',
'global' => '国际线路',
- 'weavatar' => '备用源(WeAvatar)',
+ 'weavatar' => '备用源(WeAvatar.com)',
'off' => '不启用'
- ]
+ ],
+ 'default' => 'cn',
+ 'subtitle' => '是否启用头像加速',
+ 'desc' => __( '初认头像(Cravatar)Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 WordPress)',
+ 'wp-china-yes' ),
+ ],
+ ],
+ ] );
+
+ WP_CHINA_YES::createSection( $this->prefix, [
+ 'title' => '文风字体',
+ 'icon' => 'fa fa-font',
+ 'fields' => [
+ [
+ 'id' => 'windfonts',
+ 'type' => 'radio',
+ 'title' => __( '文风字体', 'wp-china-yes' ),
+ 'inline' => true,
+ 'options' => [
+ 'on' => '全局启用',
+ 'frontend' => '前台启用',
+ 'optimize' => '本机字体',
+ 'off' => '不启用',
+ ],
+ 'default' => 'off',
+ 'subtitle' => '是否启用文风字体定制',
+ 'desc' => __( '文风字体(Windfonts)为您的网站增添无限活力。专为中文网页设计,旨在提升用户阅读体验和视觉享受',
+ 'wp-china-yes' ),
],
[
- 'name' => 'windfonts',
- 'label' => __( '文风字体', 'wp-china-yes' ),
- 'desc' => __( '文风字体(Windfonts)为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器字体调用。',
- 'wp-china-yes' ),
- 'type' => 'radio',
- 'default' => 'off',
- 'options' => [
- 'optimize' => '优化模式',
- 'off' => '不启用',
- ]
+ 'id' => 'windfonts_list',
+ 'type' => 'group',
+ 'title' => '字体列表',
+ 'subtitle' => '使用的文风字体列表',
+ 'desc' => '支持添加多个文风字体,并配置应用元素、字体权重大小',
+ 'button_title' => '添加字体',
+ 'accordion_title_number' => true,
+ 'dependency' => [
+ 'windfonts',
+ 'any',
+ 'on,frontend',
+ ],
+ 'fields' => [
+ [
+ 'id' => 'family',
+ 'type' => 'text',
+ 'title' => __( '字体家族', 'wp-china-yes' ),
+ 'subtitle' => '字体家族名称',
+ 'desc' => __( '填入从文风字体获取的字体家族名称',
+ 'wp-china-yes' ),
+ 'default' => 'wenfeng-syhtcjk',
+ ],
+ [
+ 'id' => 'css',
+ 'type' => 'text',
+ 'title' => __( '字体链接', 'wp-china-yes' ),
+ 'subtitle' => '字体 CSS 链接',
+ 'desc' => __( '填入从文风字体获取的字体 CSS 链接',
+ 'wp-china-yes' ),
+ 'default' => 'https://cn.windfonts.com/wenfeng/fonts/syhtcjk/regular/web/index.css',
+ 'validate' => 'csf_validate_url',
+ ],
+ [
+ 'id' => 'weight',
+ 'type' => 'number',
+ 'title' => __( '字体字重', 'wp-china-yes' ),
+ 'subtitle' => '字体字重大小',
+ 'desc' => __( '设置字体权重大小(字体粗细)',
+ 'wp-china-yes' ),
+ 'default' => 400,
+ 'attributes' => [
+ 'min' => 100,
+ 'max' => 1000,
+ 'step' => 10,
+ ],
+ 'validate' => 'csf_validate_numeric',
+ ],
+ [
+ 'id' => 'style',
+ 'type' => 'select',
+ 'title' => __( '字体样式', 'wp-china-yes' ),
+ 'subtitle' => '字体样式选择',
+ 'options' => [
+ 'normal' => '正常',
+ 'italic' => '斜体',
+ 'oblique' => '倾斜',
+ ],
+ 'desc' => __( '设置字体样式(正常、斜体、倾斜)',
+ 'wp-china-yes' ),
+ ],
+ [
+ 'id' => 'selector',
+ 'type' => 'textarea',
+ 'title' => __( '字体应用', 'wp-china-yes' ),
+ 'subtitle' => '字体应用元素',
+ 'desc' => __( '设置字体应用的元素(CSS 选择器)',
+ 'wp-china-yes' ),
+ 'default' => 'a,p,h1,h2,h3,h4,h5,h6,ul,ol,li,button,blockquote,pre,code,table,th,td,div:not([class*="star"]),label,b,i:not([class]),em,small,strong,sub,sup,ins,del,mark,abbr,dfn,span:not([class*="icon"])',
+ 'sanitize' => false,
+ ],
+ [
+ 'id' => 'enable',
+ 'type' => 'switcher',
+ 'title' => __( '启用字体', 'wp-china-yes' ),
+ 'subtitle' => '是否启用该字体',
+ 'default' => true,
+ ],
+ ],
],
[
- 'name' => 'adblock',
- 'label' => __( '广告拦截', 'wp-china-yes' ),
- 'desc' => __( '文派叶子🍃(WP-China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,查看可优化插件列表。',
- 'wp-china-yes' ),
- 'type' => 'radio',
- 'default' => 'off',
- 'options' => [
- 'off' => '即将上线',
- ]
+ 'type' => 'content',
+ 'content' => '默认适配规则跟随插件更新,插件更新后可删除字体重新添加以获取最新适配规则',
],
+ ],
+ ] );
+
+ WP_CHINA_YES::createSection( $this->prefix, [
+ 'title' => '广告屏蔽',
+ 'icon' => 'fa fa-ban',
+ 'fields' => [
[
- 'name' => 'monitor',
- 'label' => __( '自动监控', 'wp-china-yes' ),
- 'desc' => __( '文派叶子🍃(WP-China-Yes)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节点或关闭加速,以保证您的网站正常访问。',
- 'wp-china-yes' ),
- 'type' => 'radio',
- 'default' => 'on',
- 'options' => [
+ 'id' => 'adblock',
+ 'type' => 'radio',
+ 'title' => __( '广告屏蔽', 'wp-china-yes' ),
+ 'inline' => true,
+ 'options' => [
'on' => '启用',
'off' => '不启用',
- ]
+ ],
+ 'default' => 'off',
+ 'subtitle' => '是否启用后台广告屏蔽',
+ 'desc' => __( '文派叶子🍃(WP-China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用插件侵入式后台广告、通知及无用信息',
+ 'wp-china-yes' ),
],
- ]
- ];
+ [
+ 'id' => 'adblock_rule',
+ 'type' => 'group',
+ 'title' => '规则列表',
+ 'subtitle' => '使用的广告屏蔽规则列表',
+ 'desc' => '支持添加多条广告屏蔽规则',
+ 'button_title' => '添加规则',
+ 'accordion_title_number' => true,
+ 'dependency' => [
+ 'adblock',
+ 'any',
+ 'on',
+ ],
+ 'fields' => [
+ [
+ 'id' => 'name',
+ 'type' => 'text',
+ 'title' => __( '规则名称', 'wp-china-yes' ),
+ 'subtitle' => '自定义规则名称',
+ 'desc' => __( '自定义规则名称,方便识别',
+ 'wp-china-yes' ),
+ 'default' => '默认规则',
+ ],
+ [
+ 'id' => 'selector',
+ 'type' => 'textarea',
+ 'title' => __( '应用元素', 'wp-china-yes' ),
+ 'subtitle' => '规则应用元素',
+ 'desc' => __( '设置规则应用的广告元素(CSS 选择器)',
+ 'wp-china-yes' ),
+ 'default' => '.wpseo_content_wrapper #sidebar-container, .yoast_premium_upsell, #wpseo-local-seo-upsell, .yoast-settings-section-upsell, #rank_math_review_plugin_notice, #bwp-get-social, .bwp-button-paypal, #bwp-sidebar-right, .tjcc-custom-css #postbox-container-1, .settings_page_wpcustomtaxfilterinadmin #postbox-container-1, #duplicate-post-notice #newsletter-subscribe-form, div[id^="dnh-wrm"], .notice-info.dst-notice, #googleanalytics_terms_notice, .fw-brz-dismiss, div.elementor-message[data-notice_id="elementor_dev_promote"], .notice-success.wpcf7r-notice, .dc-text__block.disable__comment__alert, #ws_sidebar_pro_ad, .pa-new-feature-notice, #redux-connect-message, .frash-notice-email, .frash-notice-rate, #smush-box-pro-features, #wp-smush-bulk-smush-upsell-row, #easy-updates-manager-dashnotice, #metaslider-optin-notice, #extendifysdk_announcement, .ml-discount-ad, .mo-admin-notice, .post-smtp-donation, div[data-dismissible="notice-owa-sale-forever"], .neve-notice-upsell, #pagelayer_promo, #simple-custom-post-order-epsilon-review-notice, .sfsi_new_prmium_follw, div.fs-slug-the-events-calendar[data-id="connect_account"], .tribe-notice-event-tickets-install, div.notice[data-notice="webp-converter-for-media"], .webpLoader__popup.webpPopup, .put-dismiss-notice, .wp-mail-smtp-review-notice, #wp-mail-smtp-pro-banner, body div.promotion.fs-notice, .analytify-review-thumbnail, .analytify-review-notice, .jitm-banner.is-upgrade-premium, div[data-name*="wbcr_factory_notice_adverts"], .sui-subscription-notice, #sui-cross-sell-footer, .sui-cross-sell-modules, .forminator-rating-notice, .sui-dashboard-upsell-upsell, .anwp-post-grid__rate, .cff-settings-cta, .cff-header-upgrade-notice, .cff_notice.cff_review_notice_step_1, .cff_get_pro_highlight, .aal-install-elementor, #ws_sidebar_pro_ad, .bold-timeline-lite-feedback-notice-wrapper, #elementskit-lite-go-pro-noti2ce, #elementskit-lite-_plugin_rating_msg_used_in_day, .yarpp-review-notice, #prli_review_notice, #webdados_invoicexpress_nag, #vc_license-activation-notice, .villatheme-dashboard.updated, #njt-FileBird-review, .notice[data-dismissible="pro_release_notice"], #thwvsf_review_request_notice, .wpdeveloper-review-notice, div[data-notice_type="tinvwl-user-review"], div[data-notice_type="tinvwl-user-premium"], #sg-backup-review-wrapper, .notice-wpmet-jhanda-getgenie-cross-promo, .notice-getgenie-go-pro-noti2ce, .notice-wpmet-jhanda-Summer2023, .thwcfd-review-wrapper, .woo-permalink-manager-banner, div.notice.bundle-notice, div.notice[data-dismissible="notice-owa-upgrade-forever"], .wpsm-acc-r-review-notice, .wpsm_ac_h_i, .edac-review-notice, .notice-iworks-rate, #monterinsights-admin-menu-tooltip, .monsterinsights-floating-bar, #monterinsights-admin-menu-tooltip, .exactmetrics-floating-bar, #metform-unsupported-metform-pro-version, .lwptocRate, .wpsm-tabs-b-review-notice, .quadlayers_woocommerce-direct-checkout_notice_delay, .iworks-rate-notice, #metform-_plugin_rating_msg_used_in_day, [id^="wpmet-jhanda-"], #wpmet-stories, #ti-optml-notice-helper, .menu-icon-dashboard-notice, .catch-bells-admin-notice, .wpdt-bundles-notice, .td-admin-web-services, .cf-plugin-popup, .wpzinc-review-media-library-organizer, .oxi-image-notice',
+ 'sanitize' => false,
+ ],
+ [
+ 'id' => 'enable',
+ 'type' => 'switcher',
+ 'title' => __( '启用规则', 'wp-china-yes' ),
+ 'subtitle' => '是否启用该规则',
+ 'default' => true,
+ ],
+ ],
+ ],
+ [
+ 'type' => 'content',
+ 'content' => '默认屏蔽规则跟随插件更新,插件更新后可删除规则重新添加以获取最新屏蔽规则',
+ ],
+ ],
+ ] );
- $this->setting_api->set_sections( $sections );
- $this->setting_api->set_fields( $fields );
- $this->setting_api->admin_init();
+ WP_CHINA_YES::createSection( $this->prefix, [
+ 'title' => '其他设置',
+ 'icon' => 'fa fa-cogs',
+ 'fields' => [
+ [
+ 'id' => 'monitor',
+ 'type' => 'switcher',
+ 'default' => true,
+ 'title' => '节点监控',
+ 'subtitle' => '自动监控加速节点可用性',
+ 'desc' => __( '文派叶子🍃(WP-China-Yes)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节点或关闭加速,以保证您的网站正常访问',
+ 'wp-china-yes' ),
+ ],
+ [
+ 'id' => 'hide',
+ 'type' => 'switcher',
+ 'default' => false,
+ 'title' => '隐藏设置',
+ 'subtitle' => '隐藏插件设置入口',
+ 'desc' => __( '如果您不希望让客户知道本站启用了文派叶子🍃(WP-China-Yes)插件及服务,可开启此选项',
+ 'wp-china-yes' ),
+ ],
+ [
+ 'id' => 'custom_name',
+ 'type' => 'text',
+ 'title' => '品牌白标',
+ 'subtitle' => '自定义插件显示品牌名',
+ 'desc' => __( '专为 WordPress 建站服务商和代理机构提供的自定义品牌功能,输入您的品牌词启用后生效',
+ 'wp-china-yes' ),
+ 'default' => "WP-China-Yes",
+ ],
+ [
+ 'type' => 'content',
+ 'content' => '启用隐藏设置前请务必保存当前设置页面 URL,否则您将无法再次进入插件设置页面',
+ ],
+ ],
+ ] );
+
+ WP_CHINA_YES::createSection( $this->prefix, [
+ 'title' => '关于插件',
+ 'icon' => 'fa fa-info-circle',
+ 'fields' => [
+ [
+ 'type' => 'heading',
+ 'content' => '将您的 WordPress 接入本土生态体系,这将为您提供一个更贴近中国人使用习惯的 WordPress',
+ ],
+ [
+ 'type' => 'submessage',
+ 'content' => '100% 开源代码,一起参与文派(WordPress)软件国产化进程,打造属于您自己的开源自助建站程序',
+ ],
+ [
+ 'type' => 'subheading',
+ 'content' => '项目简介',
+ ],
+ [
+ 'type' => 'content',
+ 'content' => '文派叶子 🍃(WP-China-Yes)是一款不可多得的 WordPress 系统底层优化和生态基础设施软件。项目起源于 2019 年,专为解决困扰了中国互联网数十年的特色问题而存在。此为文派开源(WenPai.org)的一部分',
+ ],
+ [
+ 'type' => 'subheading',
+ 'content' => '赞助商',
+ ],
+ [
+ 'type' => 'content',
+ 'content' =>
+ <<
+
+
+
+
+
+
+
+
+
+
+
+HTML,
+ ],
+ [
+ 'type' => 'subheading',
+ 'content' => '开发者 & 贡献者',
+ ],
+ [
+ 'type' => 'content',
+ 'content' =>
+ <<孙锡源 |
+耗子 |
+Yulinn |
+赵丰 |
+jialong Dong |
+TigerKK |
+xianyu125 |
+ElliotHughes |
+诗语 |
+莫蒂奇 |
+薇晓朵
+HTML,
+ ]
+ ],
+ ] );
}
/**
@@ -137,15 +398,6 @@ class Setting {
* 挂载设置页面
*/
public function admin_menu() {
- // 后台设置
- add_submenu_page(
- is_multisite() ? 'settings.php' : 'options-general.php',
- esc_html__( 'WP-China-Yes', 'wp-china-yes' ),
- esc_html__( 'WP-China-Yes', 'wp-china-yes' ),
- is_multisite() ? 'manage_network_options' : 'manage_options',
- 'wp-china-yes',
- [ $this, 'setting_page' ]
- );
// 插件页设置
add_filter( 'plugin_action_links', function ( $links, $file ) {
if ( 'wp-china-yes/wp-china-yes.php' !== $file ) {
@@ -159,76 +411,4 @@ class Setting {
return $links;
}, 10, 2 );
}
-
- /**
- * 设置页面模版
- */
- public function setting_page() {
- echo <<
-
-
文派叶子🍃(WP-China-Yes)
-
- 将您的 WordPress 接入本土生态体系,这将为您提供一个更贴近中国人使用习惯的 WordPress。
- 100% 开源代码,一起参与文派(WordPress)软件国产化进程,打造属于您自己的开源自助建站程序。
-
-
-
-HTML;
- $this->setting_api->show_navigation();
- $this->setting_api->show_forms();
-
- echo <<
-
提示:插件会定期检查节点可用性,并在节点不可用时自动切换至可用节点,以保证您的网站正常访问。如您发现设置项被自动切换,可重新设置或关闭自动监控功能。
-
帮助:您可以随时在此处调整个性化设置以便适应不同的业务场景,萌新请保持默认即可。此项目的发展离不开您的支持和建议,查看联系方式。
-
-
-
-
-
项目简介
-
- 文派叶子 🍃(WP-China-Yes)是一款不可多得的 WordPress 系统底层优化和生态基础设施软件。项目起源于 2019 年,专为解决困扰了中国互联网数十年的特色问题而存在。此为文派开源(WenPai.org)的一部分。
-
-
-
-
-
-
-
-HTML;
-
- }
}
diff --git a/Service/Super.php b/Service/Super.php
index 5506a35..45e96b4 100644
--- a/Service/Super.php
+++ b/Service/Super.php
@@ -39,7 +39,7 @@ class Super {
echo <<
+ |
+ 翻译平台
+ |
+ 文章投稿
+ |
+ 自选新闻源
+
HTML;
} );
From 9c678616f2d9d634b092b1eb166737bd7ce1cf98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=96=87=E6=B4=BE=E5=A4=87=E6=A1=88?=
<130886204+modiqi@users.noreply.github.com>
Date: Tue, 24 Sep 2024 00:33:27 +0800
Subject: [PATCH 088/120] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8E=BB=E5=B9=BF?=
=?UTF-8?q?=E5=91=8A=E6=8F=92=E4=BB=B6=E5=88=97=E8=A1=A8=E9=93=BE=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Service/Base.php | 1 +
Service/Setting.php | 12 +++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/Service/Base.php b/Service/Base.php
index d1dd9e5..238172e 100644
--- a/Service/Base.php
+++ b/Service/Base.php
@@ -17,6 +17,7 @@ class Base {
*/
add_filter( sprintf( '%splugin_action_links', is_multisite() ? 'network_admin_' : '' ), function ( $links, $plugin = '' ) {
$links[] = '参与翻译';
+ $links[] = '去广告';
return $links;
}, 10, 2 );
diff --git a/Service/Setting.php b/Service/Setting.php
index 857f171..7f685fe 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -83,7 +83,7 @@ class Setting {
'admin' => 'admin',
],
'subtitle' => '是否启用萌芽加速',
- 'desc' => __( '萌芽加速(adminCDN)将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需要加速的项目,更多细节控制和功能,查看推荐设置。',
+ 'desc' => __( '萌芽加速(adminCDN)将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需要加速的项目,更多细节控制和功能,请查看推荐设置。',
'wp-china-yes' ),
],
[
@@ -235,7 +235,9 @@ class Setting {
'type' => 'group',
'title' => '规则列表',
'subtitle' => '使用的广告屏蔽规则列表',
- 'desc' => '支持添加多条广告屏蔽规则',
+ 'desc' => __( '支持添加多条广告屏蔽规则',
+ 'wp-china-yes' ),
+
'button_title' => '添加规则',
'accordion_title_number' => true,
'dependency' => [
@@ -274,7 +276,7 @@ class Setting {
],
[
'type' => 'content',
- 'content' => '默认广告屏蔽规则跟随插件更新,插件更新后可删除规则重新添加以获取更多最新屏蔽规则,出现异常,请尝试先停用规则排查原因。',
+ 'content' => '默认规则跟随插件更新,插件更新后可删除规则重新添加以获取更多最新屏蔽规则,出现异常,请尝试先停用规则排查原因。',
],
],
] );
@@ -343,7 +345,7 @@ class Setting {
],
[
'type' => 'submessage',
- 'content' => '特别感谢以下企业品牌对文派项目提供的资金资源,期待社会各界参与。',
+ 'content' => '特别感谢以下企业品牌对文派项目提供的资金资源,同时期待社会各界参与。',
],
[
'type' => 'content',
@@ -369,7 +371,7 @@ HTML,
],
[
'type' => 'submessage',
- 'content' => '以下为对此项目做出过贡献和帮助的朋友,贡献您自己的力量。',
+ 'content' => '以下为对此项目提供过帮助的朋友,欢迎贡献您自己的力量。',
],
[
'type' => 'content',
From cb98197084a3cc133a1eec680ad21d0fc32389d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=96=87=E6=B4=BE=E5=A4=87=E6=A1=88?=
<130886204+modiqi@users.noreply.github.com>
Date: Tue, 24 Sep 2024 00:43:16 +0800
Subject: [PATCH 089/120] Update Setting.php
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
修改Logo至CDN外链
---
Service/Setting.php | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/Service/Setting.php b/Service/Setting.php
index 7f685fe..f85de8c 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -352,16 +352,16 @@ class Setting {
'content' =>
<<
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
HTML,
],
From cb06d1bef4bcd3b1396036f1c758ec45aea4fa9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=96=87=E6=B4=BE=E5=A4=87=E6=A1=88?=
<130886204+modiqi@users.noreply.github.com>
Date: Tue, 24 Sep 2024 01:18:23 +0800
Subject: [PATCH 090/120] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=93=BE=E6=8E=A5?=
=?UTF-8?q?=E8=89=B2=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
assets/css/setting.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/assets/css/setting.css b/assets/css/setting.css
index 162a105..45e2a80 100644
--- a/assets/css/setting.css
+++ b/assets/css/setting.css
@@ -12,7 +12,7 @@
}
.wp_china_yes-content a {
- color: #0073aa;
+ color: #3858e9;
text-decoration: none;
}
From 219631bc7e55b3f76792d5023abb328922234c2d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=96=87=E6=B4=BE=E5=A4=87=E6=A1=88?=
<130886204+modiqi@users.noreply.github.com>
Date: Tue, 24 Sep 2024 02:01:11 +0800
Subject: [PATCH 091/120] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=B7=E5=BC=8Fcss?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
assets/css/fonts.css | 6 +++++-
assets/css/setting.css | 4 ++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/assets/css/fonts.css b/assets/css/fonts.css
index 5b0941e..86bde42 100644
--- a/assets/css/fonts.css
+++ b/assets/css/fonts.css
@@ -1,3 +1,7 @@
+html {
+ -webkit-font-smoothing: antialiased;
+}
+
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-family: -apple-system, "Noto Sans", "Helvetica Neue", Helvetica, "Nimbus Sans L", Arial, "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, "WenQuanYi Zen Hei Sharp", sans-serif;
-}
\ No newline at end of file
+}
diff --git a/assets/css/setting.css b/assets/css/setting.css
index 45e2a80..96cb79c 100644
--- a/assets/css/setting.css
+++ b/assets/css/setting.css
@@ -16,6 +16,10 @@
text-decoration: none;
}
+.wp_china_yes-content a:active, a:focus, a:hover {
+ color: #2c3338;
+}
+
.wp_china_yes-options {
background-color: #fff;
padding: 1%;
From b0a4bc3d420d788b6bfdf0d7bedb7e7ffdcf0da4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=96=87=E6=B4=BE=E5=A4=87=E6=A1=88?=
<130886204+modiqi@users.noreply.github.com>
Date: Tue, 24 Sep 2024 02:25:17 +0800
Subject: [PATCH 092/120] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E6=95=88=E6=9E=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Service/Setting.php | 4 +++-
assets/css/setting.css | 13 ++++++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Service/Setting.php b/Service/Setting.php
index f85de8c..7984f60 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -308,7 +308,7 @@ class Setting {
'type' => 'text',
'title' => '品牌白标',
'subtitle' => '自定义插件显示品牌名',
- 'desc' => __( '专为 WordPress 建站服务商和代理机构提供的自定义品牌 OEM 功能,输入您的品牌词启用后生效',
+ 'desc' => __( '专为 WordPress 建站服务商和代理机构提供的自定义品牌 OEM 功能,输入您的品牌词启用后生效',
'wp-china-yes' ),
'default' => "WP-China-Yes",
],
@@ -377,6 +377,7 @@ HTML,
'type' => 'content',
'content' =>
<<
孙锡源 |
耗子 |
Yulinn |
@@ -388,6 +389,7 @@ HTML,
诗语 |
莫蒂奇 |
薇晓朵
+
HTML,
]
],
diff --git a/assets/css/setting.css b/assets/css/setting.css
index 96cb79c..a9ebcba 100644
--- a/assets/css/setting.css
+++ b/assets/css/setting.css
@@ -7,10 +7,21 @@
.sponsor-logos img {
flex-basis: calc(20% - 10px);
max-width: 85px;
- margin: 5px;
+ margin: 14px;
height: auto;
}
+.contributors-name {
+ margin-top: 0;
+ margin-bottom: 0;
+ padding: 12px;
+ color: #dcdcde;
+}
+
+.contributors-name a{
+ line-height: 2;
+ padding: 0.5em;
+}
.wp_china_yes-content a {
color: #3858e9;
text-decoration: none;
From a87985970d67acb112ceef9e7c24d8171c0f8a36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Wed, 25 Sep 2024 16:45:48 +0800
Subject: [PATCH 093/120] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=8E=92?=
=?UTF-8?q?=E5=8D=B0=E4=BC=98=E5=8C=96=E5=92=8C=E9=A3=9E=E8=A1=8C=E6=A8=A1?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 1 +
Service/Monitor.php | 6 +-
Service/Setting.php | 98 ++++++++++-
Service/Super.php | 291 +++++++++++++++++++++++++-------
assets/css/setting.css | 3 +-
helpers.php | 23 +--
languages/wp-china-yes-en_US.mo | Bin 5870 -> 0 bytes
languages/wp-china-yes-en_US.po | 171 -------------------
languages/wp-china-yes-zh_CN.mo | Bin 5468 -> 0 bytes
languages/wp-china-yes-zh_CN.po | 160 ------------------
languages/wp-china-yes-zh_TW.mo | Bin 5492 -> 0 bytes
languages/wp-china-yes-zh_TW.po | 160 ------------------
12 files changed, 340 insertions(+), 573 deletions(-)
delete mode 100644 languages/wp-china-yes-en_US.mo
delete mode 100644 languages/wp-china-yes-en_US.po
delete mode 100644 languages/wp-china-yes-zh_CN.mo
delete mode 100644 languages/wp-china-yes-zh_CN.po
delete mode 100644 languages/wp-china-yes-zh_TW.mo
delete mode 100644 languages/wp-china-yes-zh_TW.po
diff --git a/.gitignore b/.gitignore
index 5657f6e..331c58f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
+.idea
vendor
\ No newline at end of file
diff --git a/Service/Monitor.php b/Service/Monitor.php
index bcdecb4..e59aab6 100644
--- a/Service/Monitor.php
+++ b/Service/Monitor.php
@@ -17,6 +17,9 @@ class Monitor {
public function __construct() {
$this->settings = get_settings();
+ if ( $this->settings['monitor'] ) {
+ return;
+ }
add_action( 'init', [ $this, 'init' ] );
add_action( 'wp_china_yes_maybe_check_store', [
@@ -37,9 +40,6 @@ class Monitor {
* 初始化
*/
public function init() {
- if ( $this->settings['monitor'] ) {
- return;
- }
// 检查应用市场可用性
if ( ! wp_next_scheduled( 'wp_china_yes_maybe_check_store' ) && $this->settings['store'] != 'off' ) {
wp_schedule_event( time(), 'hourly', 'wp_china_yes_maybe_check_store' );
diff --git a/Service/Setting.php b/Service/Setting.php
index 7984f60..9d4e8cb 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -125,6 +125,26 @@ class Setting {
'desc' => __( '文风字体(Windfonts)为您的网站增添无限活力。专为中文网页设计,旨在提升用户阅读体验和视觉享受。新手使用请先查看字体使用说明。',
'wp-china-yes' ),
],
+ [
+ 'id' => 'windfonts_typography',
+ 'type' => 'checkbox',
+ 'title' => __( '排印优化', 'wp-china-yes' ),
+ 'inline' => true,
+ 'options' => [
+ 'corner' => '直角括号',
+ 'space' => '文本空格',
+ 'punctuation' => '标点显示',
+ ],
+ 'default' => '',
+ 'subtitle' => '是否启用排印优化',
+ 'desc' => __( '排印优化可提升中文网页的视觉美感,适用于中文字体的网站。',
+ 'wp-china-yes' ),
+ 'dependency' => [
+ 'windfonts',
+ 'any',
+ 'on,frontend,optimize',
+ ],
+ ],
[
'id' => 'windfonts_list',
'type' => 'group',
@@ -193,7 +213,7 @@ class Setting {
'subtitle' => '字体应用元素',
'desc' => __( '设置字体应用的元素(CSS 选择器)',
'wp-china-yes' ),
- 'default' => 'a,p,h1,h2,h3,h4,h5,h6,ul,ol,li,button,blockquote,pre,code,table,th,td,div:not([class*="star"]),label,b,i:not([class]),em,small,strong,sub,sup,ins,del,mark,abbr,dfn,span:not([class*="icon"])',
+ 'default' => 'a:not([class]),p,h1,h2,h3,h4,h5,h6,ul,ol,li,button,blockquote,pre,code,table,th,td,label,b,i:not([class]),em,small,strong,sub,sup,ins,del,mark,abbr,dfn,span:not([class])',
'sanitize' => false,
],
[
@@ -231,11 +251,11 @@ class Setting {
'wp-china-yes' ),
],
[
- 'id' => 'adblock_rule',
- 'type' => 'group',
- 'title' => '规则列表',
- 'subtitle' => '使用的广告屏蔽规则列表',
- 'desc' => __( '支持添加多条广告屏蔽规则',
+ 'id' => 'adblock_rule',
+ 'type' => 'group',
+ 'title' => '规则列表',
+ 'subtitle' => '使用的广告屏蔽规则列表',
+ 'desc' => __( '支持添加多条广告屏蔽规则',
'wp-china-yes' ),
'button_title' => '添加规则',
@@ -281,6 +301,72 @@ class Setting {
],
] );
+ WP_CHINA_YES::createSection( $this->prefix, [
+ 'title' => '飞行模式',
+ 'icon' => 'fa fa-plane',
+ 'fields' => [
+ [
+ 'id' => 'plane',
+ 'type' => 'radio',
+ 'title' => __( '飞行模式', 'wp-china-yes' ),
+ 'inline' => true,
+ 'options' => [
+ 'on' => '启用',
+ 'off' => '不启用',
+ ],
+ 'default' => 'off',
+ 'subtitle' => '是否启用飞行模式',
+ 'desc' => __( '文派叶子🍃(WP-China-Yes)独家特色功能,飞行模式可以屏蔽 WordPress 主题插件中国不能访问的服务 API 请求,加速网站前后台访问。注意:部分外部请求为产品更新检测,若屏蔽请定期手动检测。',
+ 'wp-china-yes' ),
+ ],
+ [
+ 'id' => 'plane_rule',
+ 'type' => 'group',
+ 'title' => '规则列表',
+ 'subtitle' => '飞行模式使用的 URL 屏蔽规则列表',
+ 'desc' => __( '支持添加多条 URL 屏蔽规则',
+ 'wp-china-yes' ),
+
+ 'button_title' => '添加规则',
+ 'accordion_title_number' => true,
+ 'dependency' => [
+ 'plane',
+ 'any',
+ 'on',
+ ],
+ 'fields' => [
+ [
+ 'id' => 'name',
+ 'type' => 'text',
+ 'title' => __( '规则名称', 'wp-china-yes' ),
+ 'subtitle' => '自定义规则名称',
+ 'desc' => __( '自定义规则名称,方便识别',
+ 'wp-china-yes' ),
+ 'default' => '默认规则',
+ ],
+ [
+ 'id' => 'url',
+ 'type' => 'textarea',
+ 'title' => __( 'URL', 'wp-china-yes' ),
+ 'subtitle' => 'URL',
+ 'desc' => __( '设置需要屏蔽的 URL 关键词',
+ 'wp-china-yes' ),
+ 'default' => '',
+ 'placeholder' => 'example.com',
+ 'sanitize' => false,
+ ],
+ [
+ 'id' => 'enable',
+ 'type' => 'switcher',
+ 'title' => __( '启用规则', 'wp-china-yes' ),
+ 'subtitle' => '是否启用该规则',
+ 'default' => true,
+ ],
+ ],
+ ]
+ ],
+ ] );
+
WP_CHINA_YES::createSection( $this->prefix, [
'title' => '其他设置',
'icon' => 'fa fa-cogs',
diff --git a/Service/Super.php b/Service/Super.php
index 5395ace..73c5832 100644
--- a/Service/Super.php
+++ b/Service/Super.php
@@ -4,6 +4,7 @@ namespace WenPai\ChinaYes\Service;
defined( 'ABSPATH' ) || exit;
+use WP_Error;
use function WenPai\ChinaYes\get_settings;
/**
@@ -170,56 +171,11 @@ HTML;
}
}
+ /**
+ * adminCDN
+ */
if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
- /**
- * 前台静态加速
- */
- if ( in_array( 'frontend', (array) $this->settings['admincdn'] ) ) {
- $this->page_str_replace( 'template_redirect', 'preg_replace', [
- '#(?<=[(\"\'])(?:' . quotemeta( home_url() ) . ')?/(?:((?:wp-content|wp-includes)[^\"\')]+\.(css|js)[^\"\')]+))(?=[\"\')])#',
- 'https://public.admincdn.com/$0'
- ] );
- }
-
- /**
- * Google 字体替换
- */
- if ( in_array( 'googlefonts', (array) $this->settings['admincdn'] ) ) {
- $this->page_str_replace( 'init', 'str_replace', [
- 'fonts.googleapis.com',
- 'googlefonts.admincdn.com'
- ] );
- }
-
- /**
- * Google 前端公共库替换
- */
- if ( in_array( 'googleajax', (array) $this->settings['admincdn'] ) ) {
- $this->page_str_replace( 'init', 'str_replace', [
- 'ajax.googleapis.com',
- 'googleajax.admincdn.com'
- ] );
- }
-
- /**
- * CDNJS 前端公共库替换
- */
- if ( in_array( 'cdnjs', (array) $this->settings['admincdn'] ) ) {
- $this->page_str_replace( 'init', 'str_replace', [
- 'cdnjs.cloudflare.com/ajax/libs',
- 'cdnjs.admincdn.com'
- ] );
- }
-
- /**
- * jsDelivr 前端公共库替换
- */
- if ( in_array( 'jsdelivr', (array) $this->settings['admincdn'] ) ) {
- $this->page_str_replace( 'init', 'str_replace', [
- 'jsd.admincdn.com',
- 'jsd.admincdn.com'
- ] );
- }
+ $this->load_admincdn();
}
/**
@@ -236,24 +192,93 @@ HTML;
/**
* 文风字体
*/
- if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] == 'optimize' ) {
- add_action( 'init', function () {
- wp_enqueue_style( 'windfonts-optimize', CHINA_YES_PLUGIN_URL . 'assets/css/fonts.css', [], CHINA_YES_VERSION );
- } );
- }
- if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] == 'on' ) {
- add_action( 'wp_head', [ $this, 'load_windfonts' ] );
- add_action( 'admin_head', [ $this, 'load_windfonts' ] );
- }
- if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] == 'frontend' ) {
- add_action( 'wp_head', [ $this, 'load_windfonts' ] );
+ if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
+ if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] != 'off' ) {
+ $this->load_typography();
+ }
+ if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] == 'optimize' ) {
+ add_action( 'init', function () {
+ wp_enqueue_style( 'windfonts-optimize', CHINA_YES_PLUGIN_URL . 'assets/css/fonts.css', [], CHINA_YES_VERSION );
+ } );
+ }
+ if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] == 'on' ) {
+ add_action( 'wp_head', [ $this, 'load_windfonts' ] );
+ add_action( 'admin_head', [ $this, 'load_windfonts' ] );
+ }
+ if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] == 'frontend' ) {
+ add_action( 'wp_head', [ $this, 'load_windfonts' ] );
+ }
}
/**
* 广告拦截
*/
- if ( ! empty( $this->settings['adblock'] ) && $this->settings['adblock'] == 'on' ) {
- add_action( 'admin_head', [ $this, 'load_adblock' ] );
+ if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
+ if ( ! empty( $this->settings['adblock'] ) && $this->settings['adblock'] == 'on' ) {
+ add_action( 'admin_head', [ $this, 'load_adblock' ] );
+ }
+ }
+
+ /**
+ * 飞行模式
+ */
+ if ( ! empty( $this->settings['plane'] ) && $this->settings['plane'] == 'on' ) {
+ $this->load_plane();
+ }
+ }
+
+ /**
+ * 加载 adminCDN
+ */
+ public function load_admincdn() {
+ /**
+ * 前台静态加速
+ */
+ if ( in_array( 'frontend', (array) $this->settings['admincdn'] ) ) {
+ $this->page_str_replace( 'template_redirect', 'preg_replace', [
+ '#(?<=[(\"\'])(?:' . quotemeta( home_url() ) . ')?/(?:((?:wp-content|wp-includes)[^\"\')]+\.(css|js)[^\"\')]+))(?=[\"\')])#',
+ 'https://public.admincdn.com/$0'
+ ] );
+ }
+
+ /**
+ * Google 字体替换
+ */
+ if ( in_array( 'googlefonts', (array) $this->settings['admincdn'] ) ) {
+ $this->page_str_replace( 'init', 'str_replace', [
+ 'fonts.googleapis.com',
+ 'googlefonts.admincdn.com'
+ ] );
+ }
+
+ /**
+ * Google 前端公共库替换
+ */
+ if ( in_array( 'googleajax', (array) $this->settings['admincdn'] ) ) {
+ $this->page_str_replace( 'init', 'str_replace', [
+ 'ajax.googleapis.com',
+ 'googleajax.admincdn.com'
+ ] );
+ }
+
+ /**
+ * CDNJS 前端公共库替换
+ */
+ if ( in_array( 'cdnjs', (array) $this->settings['admincdn'] ) ) {
+ $this->page_str_replace( 'init', 'str_replace', [
+ 'cdnjs.cloudflare.com/ajax/libs',
+ 'cdnjs.admincdn.com'
+ ] );
+ }
+
+ /**
+ * jsDelivr 前端公共库替换
+ */
+ if ( in_array( 'jsdelivr', (array) $this->settings['admincdn'] ) ) {
+ $this->page_str_replace( 'init', 'str_replace', [
+ 'jsd.admincdn.com',
+ 'jsd.admincdn.com'
+ ] );
}
}
@@ -298,6 +323,127 @@ HTML
}
}
+ /**
+ * 加载排印优化
+ */
+ public function load_typography() {
+ // code from corner-bracket-lover plugin
+ if ( in_array( 'corner', (array) $this->settings['windfonts_typography'] ) ) {
+ $this->page_str_replace( 'init', 'str_replace', [
+ 'n’t',
+ 'n’t'
+ ] );
+ $this->page_str_replace( 'init', 'str_replace', [
+ '’s',
+ '’s'
+ ] );
+ $this->page_str_replace( 'init', 'str_replace', [
+ '’m',
+ '’m'
+ ] );
+ $this->page_str_replace( 'init', 'str_replace', [
+ '’re',
+ '’re'
+ ] );
+ $this->page_str_replace( 'init', 'str_replace', [
+ '’ve',
+ '’ve'
+ ] );
+ $this->page_str_replace( 'init', 'str_replace', [
+ '’d',
+ '’d'
+ ] );
+ $this->page_str_replace( 'init', 'str_replace', [
+ '’ll',
+ '’ll'
+ ] );
+ $this->page_str_replace( 'init', 'str_replace', [
+ '“',
+ '「'
+ ] );
+ $this->page_str_replace( 'init', 'str_replace', [
+ '”',
+ '」'
+ ] );
+ $this->page_str_replace( 'init', 'str_replace', [
+ '‘',
+ '『'
+ ] );
+ $this->page_str_replace( 'init', 'str_replace', [
+ '’',
+ '』'
+ ] );
+ }
+ // code from space-lover plugin
+ if ( in_array( 'space', (array) $this->settings['windfonts_typography'] ) ) {
+ $this->page_str_replace( 'template_redirect', 'preg_replace', [
+ '~(\p{Han})([a-zA-Z0-9\p{Ps}\p{Pi}])(?![^<]*>)~u',
+ '\1 \2'
+ ] );
+ $this->page_str_replace( 'template_redirect', 'preg_replace', [
+ '~([a-zA-Z0-9\p{Pe}\p{Pf}])(\p{Han})(?![^<]*>)~u',
+ '\1 \2'
+ ] );
+ $this->page_str_replace( 'template_redirect', 'preg_replace', [
+ '~([!?‽:;,.%])(\p{Han})~u',
+ '\1 \2'
+ ] );
+ $this->page_str_replace( 'template_redirect', 'preg_replace', [
+ '~(\p{Han})([@$#])~u',
+ '\1 \2'
+ ] );
+ $this->page_str_replace( 'template_redirect', 'preg_replace', [
+ '~(&?(?:amp)?;) (\p{Han})(?![^<]*>)~u',
+ '\1\2'
+ ] );
+ $this->page_str_replace( 'template_redirect', 'preg_replace', [
+ '~(\p{Han})(<(?!ruby)[a-zA-Z]+?[^>]*?>)([a-zA-Z0-9\p{Ps}\p{Pi}@$#])~u',
+ '\1 \2\3'
+ ] );
+ $this->page_str_replace( 'template_redirect', 'preg_replace', [
+ '~(\p{Han})(<\/(?!ruby)[a-zA-Z]+>)([a-zA-Z0-9])~u',
+ '\1\2 \3'
+ ] );
+ $this->page_str_replace( 'template_redirect', 'preg_replace', [
+ '~([a-zA-Z0-9\p{Pe}\p{Pf}!?‽:;,.%])(<(?!ruby)[a-zA-Z]+?[^>]*?>)(\p{Han})~u',
+ '\1 \2\3'
+ ] );
+ $this->page_str_replace( 'template_redirect', 'preg_replace', [
+ '~([a-zA-Z0-9\p{Ps}\p{Pi}!?‽:;,.%])(<\/(?!ruby)[a-zA-Z]+>)(\p{Han})~u',
+ '\1\2 \3'
+ ] );
+ $this->page_str_replace( 'template_redirect', 'preg_replace', [
+ '~[ ]*([「」『』()〈〉《》【】〔〕〖〗〘〙〚〛])[ ]*~u',
+ '\1'
+ ] );
+ }
+ // code from quotmarks-replacer plugin
+ if ( in_array( 'punctuation', (array) $this->settings['windfonts_typography'] ) ) {
+ $qmr_work_tags = array(
+ 'the_title', // http://codex.wordpress.org/Function_Reference/the_title
+ 'the_content', // http://codex.wordpress.org/Function_Reference/the_content
+ 'the_excerpt', // http://codex.wordpress.org/Function_Reference/the_excerpt
+ // 'list_cats', Deprecated. http://codex.wordpress.org/Function_Reference/list_cats
+ 'single_post_title', // http://codex.wordpress.org/Function_Reference/single_post_title
+ 'comment_author', // http://codex.wordpress.org/Function_Reference/comment_author
+ 'comment_text', // http://codex.wordpress.org/Function_Reference/comment_text
+ // 'link_name', Deprecated.
+ // 'link_notes', Deprecated.
+ 'link_description', // Deprecated, but still widely used.
+ 'bloginfo', // http://codex.wordpress.org/Function_Reference/bloginfo
+ 'wp_title', // http://codex.wordpress.org/Function_Reference/wp_title
+ 'term_description', // http://codex.wordpress.org/Function_Reference/term_description
+ 'category_description', // http://codex.wordpress.org/Function_Reference/category_description
+ 'widget_title', // Used by all widgets in themes
+ 'widget_text' // Used by all widgets in themes
+ );
+
+ foreach ( $qmr_work_tags as $qmr_work_tag ) {
+ remove_filter( $qmr_work_tag, 'wptexturize' );
+ }
+ }
+ }
+
/**
* 加载广告拦截
*/
@@ -322,6 +468,27 @@ HTML
}
}
+ /**
+ * 加载飞行模式
+ */
+ public function load_plane() {
+ add_filter( 'pre_http_request', function ( $preempt, $parsed_args, $url ) {
+ foreach ( (array) $this->settings['plane_rule'] as $rule ) {
+ if ( empty( $rule['enable'] ) ) {
+ continue;
+ }
+ if ( empty( $rule['url'] ) ) {
+ continue;
+ }
+ if ( strpos( $url, $rule['url'] ) !== false ) {
+ return new WP_Error( 'http_request_not_executed', '无用 URL 已屏蔽访问' );
+ }
+ }
+
+ return $preempt;
+ }, PHP_INT_MAX, 3 );
+ }
+
/**
* WordPress.Org 替换
*/
diff --git a/assets/css/setting.css b/assets/css/setting.css
index a9ebcba..f72e77b 100644
--- a/assets/css/setting.css
+++ b/assets/css/setting.css
@@ -18,10 +18,11 @@
color: #dcdcde;
}
-.contributors-name a{
+.contributors-name a {
line-height: 2;
padding: 0.5em;
}
+
.wp_china_yes-content a {
color: #3858e9;
text-decoration: none;
diff --git a/helpers.php b/helpers.php
index bf78610..c5fa9c0 100644
--- a/helpers.php
+++ b/helpers.php
@@ -9,15 +9,18 @@ function get_settings() {
$settings = is_multisite() ? get_site_option( 'wp_china_yes' ) : get_option( 'wp_china_yes' );
return wp_parse_args( $settings, [
- 'store' => 'wenpai',
- 'admincdn' => [ 'admin' ],
- 'cravatar' => 'cn',
- 'windfonts' => 'off',
- 'windfonts_list' => [],
- 'adblock' => 'off',
- 'adblock_rule' => [],
- 'monitor' => true,
- 'hide' => false,
- 'custom_name' => 'WP-China-Yes',
+ 'store' => 'wenpai',
+ 'admincdn' => [ 'admin' ],
+ 'cravatar' => 'cn',
+ 'windfonts' => 'off',
+ 'windfonts_list' => [],
+ 'windfonts_typography' => [],
+ 'adblock' => 'off',
+ 'adblock_rule' => [],
+ 'plane' => 'off',
+ 'plane_rule' => [],
+ 'monitor' => true,
+ 'hide' => false,
+ 'custom_name' => 'WP-China-Yes',
] );
}
diff --git a/languages/wp-china-yes-en_US.mo b/languages/wp-china-yes-en_US.mo
deleted file mode 100644
index 4c31d5666c01ab038964f60bf85fbd4b6741aa24..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 5870
zcmcIoTWl298J@PJP26kJ>qFI^AVneyyBLQcVnQTBE{z%zH;~XgMdR7CyA#jOY-VQd
zIIUFM#CIE;0={5V$AGb$fX&4iUv{z7*H(S%Th;a_-C**@7=E{$~Q3n{)395!FI#`2=pTIU_{E6`S
zVrUm&pT>9=_F33}!J4p7)hNn-*vqiA-(N%P!+sUdpTYhbe*6daY1mdwdII*=Hx=bi
zc>j-YVLhI&ep^xg0Q<>z6y+DNR~`xW`}cPh;6Dd9)|rREbaR@SU{$Duy8|x8!`@<@&`+0
ztaLuD#Z>u0N)*7Zz-9SCND9)UAT5uS=J7*2
zldhX~>i6tXV=3L#VrEpcQhRnXSG5z|J+$-fMng55c0TJ55BPmK(f47oZR%dON6tR-
z{Hyn}z0d4XpB2};*a^#yHQ3y7SpM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|2|X5hE|YK~$E|u+)9_m4b>6Jgg2?l#%j;QPZQZ^|
z?SV+$lWcEYecj$CY7f-b*1V!RZsfSFnvS8mmW`FKsAeLgCV1pHS5x)u1v6pjPLl0<
z!_-|KW5-l>e+!t-K{~6ZPkdpXxS;Jo|$R+=p3p$$bw%F
zne5R+Z12IEUq)WyCbxq)8Y~{uUG`*jUvwYdykcoq#l1Qd>)yQw8Om&bbU$7{Z>8W_
zJq?s^)tb#c#OL&zrB01>lsPTBt0lR^+$3iXP}4OQ*9|$Kx>bC%xuIj!GMQ_!bf(e3
zM6{$<#@1-E#hf$;@R>Ag;f)TGz*G%yoG5$C$}mkekpZ>Q;PRk!z!y3dhnTbwJ2VDs
z3<3uusw3a;mRpDCcjdAHFQUp1oa4Kyo2$s;zDBE?|Yz0Ei+_2!6#9Rlt69gxg
zz+s2m&AP@Jh9xGt&8!xa0EuNZ7xYAL})=kc0I0Zk~jhJG7fl$KeKfc%%t2Q5pf%TIHD|(L|}{=F;a9C9O$RZYyvnE
zgT@d&syT?FEM2C?@eoKK+$sxHAiES=N;NZpT=JG8gBWW~k|Ue@%qrR6=FdZ1f-Xf|
zstL+|=q-_R%M{+XX+9360bz7a4|yT$l5h#6pY19&(E7$dvwd?4Act1^#zp}V=ovYY56-0wy!
vPBocj#LAorFPD%k$_D9~c+XYh^XGepZODXkE$}#RzE|mWP2{^lB
diff --git a/languages/wp-china-yes-en_US.po b/languages/wp-china-yes-en_US.po
deleted file mode 100644
index 9e7e54b..0000000
--- a/languages/wp-china-yes-en_US.po
+++ /dev/null
@@ -1,171 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: WP-China-Yes\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-08-23 03:41+0000\n"
-"PO-Revision-Date: 2024-08-23 12:21+0800\n"
-"Last-Translator: \n"
-"Language-Team: English (United States)\n"
-"Language: en_US\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Poedit 3.4.4\n"
-"X-Loco-Version: 2.6.11; wp-6.6\n"
-"X-Domain: wp-china-yes\n"
-
-#: Service/Setting.php:54
-msgid ""
-"萌芽加速(adminCDN)"
-"将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需要"
-"加速的项目,更多细节控制和功能,请关注 adminCDN 项目。"
-msgstr ""
-"adminCDN switches "
-"the static files that WordPress relies on to public resources to speed up "
-"website access. You can enable the projects that need to be accelerated as "
-"needed. For more detailed control and functions, please pay attention to the "
-"adminCDN project."
-
-#: Service/Setting.php:72
-msgid ""
-"初认头像(Cravatar)"
-"a>Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请安"
-"装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 "
-"WordPress)"
-msgstr ""
-"Cravatar is a "
-"perfect alternative to Gravatar in China. You can upload your avatar on "
-"Cravatar.com. For more options, please install the WPAavatar plugin. (Any "
-"developer can integrate this service into their own products, not limited to "
-"WordPress)"
-
-#: Service/Setting.php:86
-msgid ""
-"文风字体(Windfonts)"
-"a>为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器"
-"字体调用。"
-msgstr ""
-"Windfonts renders "
-"Chinese fonts for your web pages and accelerates fonts in themes and plug-"
-"ins; the optimization mode can optimize browser font calls."
-
-#: Service/Setting.php:109
-msgid ""
-"文派叶子🍃(WP-"
-"China-Yes)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节点"
-"或关闭加速,以保证您的网站正常访问。"
-msgstr ""
-"WP-China-Yes 🍃 "
-"(文派叶子) supports automatic monitoring of the availability of each "
-"acceleration node. When a node is unavailable, it automatically switches to "
-"an available node or turns off acceleration to ensure normal access to your "
-"website."
-
-#: Service/Setting.php:98
-msgid ""
-"文派叶子🍃(WP-"
-"China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用"
-"插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,"
-"查看可优化插件列表"
-"a>。"
-msgstr ""
-"WP-China-Yes 🍃 "
-"(文派叶子) unique features allow you to have a clean and tidy WordPress "
-"backend, removing all kinds of intrusive backend ads, notifications and "
-"useless information from commonly used plugins; if there is abnormal "
-"interception after enabling, please switch to manual mode and check the list of optimizable "
-"plugins."
-
-#: Service/Setting.php:41
-msgid ""
-"官方加速源(WPMirror)"
-"a>直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文"
-"派翻译平台。"
-msgstr ""
-"The official "
-"acceleration source (WPMirror) is directly reverse-generated from .org "
-"to the mainland for distribution; WenPai.org Open Source has its own hosting warehouse "
-"in China and is integrated with the WenPai translation platform."
-
-#. Author URI of the plugin
-msgid "https://wp-china-yes.com"
-msgstr "https://wp-china-yes.com"
-
-#. Name of the plugin
-#: Service/Setting.php:143 Service/Setting.php:144
-msgid "WP-China-Yes"
-msgstr "WP-China-Yes"
-
-#: Plugin.php:52
-#, php-format
-msgid ""
-"WP-China-Yes 插件需要 PHP 5.6.0 或更高版本,当前版本为 %s,插件已自动禁用。"
-msgstr ""
-"The WP-China-Yes plugin requires PHP 5.6.0 or higher. The current version is "
-"%s and the plugin has been automatically disabled."
-
-#: Service/Setting.php:71
-msgid "初认头像"
-msgstr "Cravatar"
-
-#: Service/Setting.php:97
-msgid "广告拦截"
-msgstr "Ad Blocker"
-
-#: Service/Setting.php:40
-msgid "应用市场"
-msgstr "App Market"
-
-#. Description of the plugin
-msgid ""
-"文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,"
-"生生不息。"
-msgstr ""
-"WP-China-Yes 🍃 (文派叶子) is the infrastructure software for the Chinese "
-"WordPress ecosystem, just like fallen leaves sprouting new leaves, it is "
-"everlasting."
-
-#. Author of the plugin
-msgid "文派开源"
-msgstr "WenPai.org"
-
-#: Service/Setting.php:85
-msgid "文风字体"
-msgstr "Windfonts"
-
-#: Plugin.php:71
-msgid "检测到不兼容的插件 Kill 429,已自动禁用!"
-msgstr "Incompatible plugin Kill 429 detected, automatically disabled!"
-
-#: Plugin.php:65
-msgid "检测到不兼容的插件 WP-China-Plus,已自动禁用!"
-msgstr "Incompatible plugin WP-China-Plus detected and automatically disabled!"
-
-#: Plugin.php:78
-msgid ""
-"检测到已在 WordPress 配置文件中设置代理服务器,这可能会导致插件无法正常工作!"
-msgstr ""
-"A proxy server has been detected in the WordPress configuration file. This "
-"may cause the plugin to not work properly!"
-
-#: Plugin.php:59
-msgid "检测到旧版插件 WP-China-No,已自动禁用!"
-msgstr ""
-"An old version of the plugin WP-China-No has been detected and automatically "
-"disabled!"
-
-#: Service/Setting.php:108
-msgid "自动监控"
-msgstr "Automatic Monitor"
-
-#: Service/Setting.php:53
-msgid "萌芽加速"
-msgstr "adminCDN"
-
-#: Service/Setting.php:32 Service/Setting.php:155
-msgid "设置"
-msgstr "Setting"
diff --git a/languages/wp-china-yes-zh_CN.mo b/languages/wp-china-yes-zh_CN.mo
deleted file mode 100644
index b2774338414318a58e6eaa183a91dd709e52971f..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 5468
zcmeHKOK%(36`rPQo3M{G?sE~e0|8wHBhiX&I8%v
z@aW^cb06P1=R4seWc@AAaD2|eUjVP8{{^Rg+ra|x
zCG=N;XMtY#
z@Nu0Ez7Ax(F9ShSz_xZ9u>atbZ7WO?KvVds^93Oh;C2BN><1s`Lw?FRxu>&-Ad?8
z>pSoE%IbTqXRUP7O4LZ=RwJCnMCiB=sj!e1}|t4SUYfAxOr#J%GVn+dF(*S
zE1!i2=)f9D6=*Wvm=BY5!JJ&f4{IgDS+MnUB{P%9A~dr}mTsDrAuBOJ$5u&fn|zFw
zv({h@U#-GJ5`91)tciQHMLrXI2!|Zu)8*?j%zuI-NNmB%FOj89GMIuRx}4FDBVKcw
zBAH(^it8j(15J`onmc1OQ#UG$bh<=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=zjVCdcXWPOdu@z
diff --git a/languages/wp-china-yes-zh_CN.po b/languages/wp-china-yes-zh_CN.po
deleted file mode 100644
index 08cf984..0000000
--- a/languages/wp-china-yes-zh_CN.po
+++ /dev/null
@@ -1,160 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: WP-China-Yes\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-08-23 03:41+0000\n"
-"PO-Revision-Date: 2024-08-23 12:20+0800\n"
-"Last-Translator: \n"
-"Language-Team: 简体中文\n"
-"Language: zh_CN\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Poedit 3.4.4\n"
-"X-Loco-Version: 2.6.10; wp-6.6\n"
-"X-Domain: wp-china-yes\n"
-
-#: Service/Setting.php:54
-msgid ""
-"萌芽加速(adminCDN)"
-"将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需"
-"要加速的项目,更多细节控制和功能,请关注 adminCDN 项目。"
-msgstr ""
-"萌芽加速(adminCDN)"
-"将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需"
-"要加速的项目,更多细节控制和功能,请关注 adminCDN 项目。"
-
-#: Service/Setting.php:72
-msgid ""
-"初认头像(Cravatar)"
-"a>Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请"
-"安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 "
-"WordPress)"
-msgstr ""
-"初认头像(Cravatar)"
-"a>Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请"
-"安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 "
-"WordPress)"
-
-#: Service/Setting.php:86
-msgid ""
-"文风字体(Windfonts)"
-"a>为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器"
-"字体调用。"
-msgstr ""
-"文风字体(Windfonts)"
-"a>为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器"
-"字体调用。"
-
-#: Service/Setting.php:109
-msgid ""
-"文派叶子🍃(WP-"
-"China-Yes)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节"
-"点或关闭加速,以保证您的网站正常访问。"
-msgstr ""
-"文派叶子🍃(WP-"
-"China-Yes)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节"
-"点或关闭加速,以保证您的网站正常访问。"
-
-#: Service/Setting.php:98
-msgid ""
-"文派叶子🍃(WP-"
-"China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用"
-"插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,"
-"查看可优化插件列表"
-"a>。"
-msgstr ""
-"文派叶子🍃(WP-"
-"China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用"
-"插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,"
-"查看可优化插件列表"
-"a>。"
-
-#: Service/Setting.php:41
-msgid ""
-"官方加速源(WPMirror)"
-"a>直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文"
-"派翻译平台。"
-msgstr ""
-"官方加速源(WPMirror)"
-"a>直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文"
-"派翻译平台。"
-
-#. Author URI of the plugin
-msgid "https://wp-china-yes.com"
-msgstr "https://wp-china-yes.com"
-
-#. Name of the plugin
-#: Service/Setting.php:143 Service/Setting.php:144
-msgid "WP-China-Yes"
-msgstr "WP-China-Yes"
-
-#: Plugin.php:52
-#, php-format
-msgid ""
-"WP-China-Yes 插件需要 PHP 5.6.0 或更高版本,当前版本为 %s,插件已自动禁用。"
-msgstr ""
-"WP-China-Yes 插件需要 PHP 5.6.0 或更高版本,当前版本为 %s,插件已自动禁用。"
-
-#: Service/Setting.php:71
-msgid "初认头像"
-msgstr "初认头像"
-
-#: Service/Setting.php:97
-msgid "广告拦截"
-msgstr "广告拦截"
-
-#: Service/Setting.php:40
-msgid "应用市场"
-msgstr "应用市场"
-
-#. Description of the plugin
-msgid ""
-"文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,"
-"生生不息。"
-msgstr ""
-"文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,"
-"生生不息。"
-
-#. Author of the plugin
-msgid "文派开源"
-msgstr "文派开源"
-
-#: Service/Setting.php:85
-msgid "文风字体"
-msgstr "文风字体"
-
-#: Plugin.php:71
-msgid "检测到不兼容的插件 Kill 429,已自动禁用!"
-msgstr "检测到不兼容的插件 Kill 429,已自动禁用!"
-
-#: Plugin.php:65
-msgid "检测到不兼容的插件 WP-China-Plus,已自动禁用!"
-msgstr "检测到不兼容的插件 WP-China-Plus,已自动禁用!"
-
-#: Plugin.php:78
-msgid ""
-"检测到已在 WordPress 配置文件中设置代理服务器,这可能会导致插件无法正常工"
-"作!"
-msgstr ""
-"检测到已在 WordPress 配置文件中设置代理服务器,这可能会导致插件无法正常工"
-"作!"
-
-#: Plugin.php:59
-msgid "检测到旧版插件 WP-China-No,已自动禁用!"
-msgstr "检测到旧版插件 WP-China-No,已自动禁用!"
-
-#: Service/Setting.php:108
-msgid "自动监控"
-msgstr "自动监控"
-
-#: Service/Setting.php:53
-msgid "萌芽加速"
-msgstr "萌芽加速"
-
-#: Service/Setting.php:32 Service/Setting.php:155
-msgid "设置"
-msgstr "设置"
diff --git a/languages/wp-china-yes-zh_TW.mo b/languages/wp-china-yes-zh_TW.mo
deleted file mode 100644
index 69ac10ceb5e68effc045a644c6af17621786528e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 5492
zcmchb+jARN9mf|4(3)!lr93dO;~AbhvK=?cBu!oc-O;NBR576Hx)zOZa>bpTFSq1AIcC!yjDFeI6fte;%?G^5ho;;m;U9b3zcF
zK%V%bA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7rcAYx^a>u!jj+VEKc8B4b&1kU?7#&s{R=#Dl^xZP{
znGDxV#=$O8-gBwzQ~aQ-KI;-c?0@gt^_Ht|UVW{m*QvISmdiL{O%`nV!4Tf*F#W;N
zJ~Uu7TP}z_{YIM|boTRWuN%(Q=CN1bFxd>RS$eF!W=mg}cM7dN$PE7@UwZ4Zj`8KzHj-bRO;S&gu1x`{SYHn(WOs!xx4eh=
za(9#QWqOT7!_E0JiZVRPmn7%YVU6?Uc23SZoABj&P@PU5;!D1==>hNze7QEJ&Tl*u
zUnYZ$iT-20B<`)s8!CM1%B%ApWj(0znAH*48CF)xoHDU9nJAI)degYq
z*N4W<$55s+;r~?13~#fJ7mUh@#d^v_hN{JTI!$VnDMxqtV2v{4ZoZZmO_ehFG#tE0
zXEo+ON|_t}s#|N6sg=}cZm>L-Zbq4tj4~%(hbXf=g)r6YSQTm`~Lt+IkMXvW>VyKq!upt+F+Xd=oi5BVsspu?ca-6p4l_(j2S^EleX|14B#6CFi^
z&H5d5PzpwgEBP$QS!wD5PcWV>0`>ZJ萌芽加速(adminCDN)"
-"将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需"
-"要加速的项目,更多细节控制和功能,请关注 adminCDN 项目。"
-msgstr ""
-"萌芽加速(adminCDN)"
-"將 WordPress 依賴的靜態檔案切換為公共資源,加快網站訪問速度。您可按需啟用需"
-"要加速的專案,更多細節控制和功能,請關注 adminCDN 專案。"
-
-#: Service/Setting.php:72
-msgid ""
-"初认头像(Cravatar)"
-"a>Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请"
-"安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 "
-"WordPress)"
-msgstr ""
-"初認頭像(Cravatar)"
-"a>Gravatar 在中國的完美替代方案,您可以在 Cravatar.com 上傳頭像,更多選項請"
-"安裝 WPAavatar 外掛。(任何開發者均可在自己的產品中整合該服務,不侷限於 "
-"WordPress)"
-
-#: Service/Setting.php:86
-msgid ""
-"文风字体(Windfonts)"
-"a>为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器"
-"字体调用。"
-msgstr ""
-"文風字型(Windfonts)"
-"a>為您的網頁渲染中文字型並對主題、外掛內的字型進行加速;最佳化模式可最佳化瀏"
-"覽器字型呼叫。"
-
-#: Service/Setting.php:109
-msgid ""
-"文派叶子🍃(WP-"
-"China-Yes)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节"
-"点或关闭加速,以保证您的网站正常访问。"
-msgstr ""
-"文派葉子🍃(WP-"
-"China-Yes)支援自動監控各加速節點可用性,當節點不可用時自動切換至可用節"
-"點或關閉加速,以保證您的網站正常訪問。"
-
-#: Service/Setting.php:98
-msgid ""
-"文派叶子🍃(WP-"
-"China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用"
-"插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,"
-"查看可优化插件列表"
-"a>。"
-msgstr ""
-"文派葉子🍃(WP-"
-"China-Yes)獨家特色功能,讓您擁有清爽整潔的 WordPress 後臺,清除各類常用"
-"外掛侵入式後臺廣告、通知及無用資訊;啟用後若存在異常攔截,請切換為手動模式,"
-"檢視可最佳化外掛列表"
-"。"
-
-#: Service/Setting.php:41
-msgid ""
-"官方加速源(WPMirror)"
-"a>直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文"
-"派翻译平台。"
-msgstr ""
-"官方加速源(WPMirror)"
-"a>直接從 .org 反代至大陸分發;文派開源(WenPai.org)中國境內自建託管倉庫,同時整合文"
-"派翻譯平臺。"
-
-#. Author URI of the plugin
-msgid "https://wp-china-yes.com"
-msgstr "https://wp-china-yes.com"
-
-#. Name of the plugin
-#: Service/Setting.php:143 Service/Setting.php:144
-msgid "WP-China-Yes"
-msgstr "文派葉子"
-
-#: Plugin.php:52
-#, php-format
-msgid ""
-"WP-China-Yes 插件需要 PHP 5.6.0 或更高版本,当前版本为 %s,插件已自动禁用。"
-msgstr ""
-"WP-China-Yes 外掛程式需要PHP 5.6.0 或更高版本,目前版本為%s,外掛程式已自動"
-"停用。"
-
-#: Service/Setting.php:71
-msgid "初认头像"
-msgstr "初認頭像"
-
-#: Service/Setting.php:97
-msgid "广告拦截"
-msgstr "廣告攔截"
-
-#: Service/Setting.php:40
-msgid "应用市场"
-msgstr "應用市場"
-
-#. Description of the plugin
-msgid ""
-"文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,"
-"生生不息。"
-msgstr ""
-"文派葉子 🍃(WP-China-Yes)是中國 WordPress 生態基礎設施軟體,猶如落葉新芽,"
-"生生不息。"
-
-#. Author of the plugin
-msgid "文派开源"
-msgstr "文派開源"
-
-#: Service/Setting.php:85
-msgid "文风字体"
-msgstr "文風字體"
-
-#: Plugin.php:71
-msgid "检测到不兼容的插件 Kill 429,已自动禁用!"
-msgstr "偵測到不相容的插件Kill 429,已自動停用!"
-
-#: Plugin.php:65
-msgid "检测到不兼容的插件 WP-China-Plus,已自动禁用!"
-msgstr "偵測到不相容的外掛程式WP-China-Plus,已自動停用!"
-
-#: Plugin.php:78
-msgid ""
-"检测到已在 WordPress 配置文件中设置代理服务器,这可能会导致插件无法正常工"
-"作!"
-msgstr ""
-"偵測到已在WordPress 設定檔中設定代理伺服器,這可能會導致外掛無法正常運作!"
-
-#: Plugin.php:59
-msgid "检测到旧版插件 WP-China-No,已自动禁用!"
-msgstr "偵測到舊版外掛程式WP-China-No,已自動停用!"
-
-#: Service/Setting.php:108
-msgid "自动监控"
-msgstr "自動監控"
-
-#: Service/Setting.php:53
-msgid "萌芽加速"
-msgstr "萌芽加速"
-
-#: Service/Setting.php:32 Service/Setting.php:155
-msgid "设置"
-msgstr "設定"
From 82ca5e5dc4e96e6bfc47bbee4e8cb1a0cfd8f476 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Wed, 25 Sep 2024 16:47:55 +0800
Subject: [PATCH 094/120] =?UTF-8?q?fix:=20=E7=BB=9F=E4=B8=80=E9=A1=B9?=
=?UTF-8?q?=E7=9B=AE=E4=B8=AD=E7=9A=84=E8=AE=B8=E5=8F=AF=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
composer.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/composer.json b/composer.json
index b4944af..dc15555 100644
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,7 @@
"require": {
"yahnis-elsts/plugin-update-checker": "^5.2"
},
- "license": "MIT",
+ "license": "GPL-3.0-or-later",
"autoload": {
"psr-4": {
"WenPai\\ChinaYes\\": "./"
From 2b7c57a4275447948d1139b27b629157656055db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Wed, 25 Sep 2024 17:05:46 +0800
Subject: [PATCH 095/120] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E6=9B=BF?=
=?UTF-8?q?=E6=8D=A2=E6=8F=92=E4=BB=B6=E5=88=97=E8=A1=A8=E7=9A=84=E6=8F=92?=
=?UTF-8?q?=E4=BB=B6=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Service/Setting.php | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/Service/Setting.php b/Service/Setting.php
index 9d4e8cb..504b598 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -342,11 +342,11 @@ class Setting {
'subtitle' => '自定义规则名称',
'desc' => __( '自定义规则名称,方便识别',
'wp-china-yes' ),
- 'default' => '默认规则',
+ 'default' => '未命名规则',
],
[
'id' => 'url',
- 'type' => 'textarea',
+ 'type' => 'text',
'title' => __( 'URL', 'wp-china-yes' ),
'subtitle' => 'URL',
'desc' => __( '设置需要屏蔽的 URL 关键词',
@@ -496,6 +496,13 @@ HTML,
* 挂载设置页面
*/
public function admin_menu() {
+ // 自定义名称
+ add_filter( 'all_plugins', function ( $plugins ) {
+ $plugins['wp-china-yes/wp-china-yes.php']['Name'] = $this->settings['custom_name'];
+
+ return $plugins;
+ } );
+
// 插件页设置
add_filter( 'plugin_action_links', function ( $links, $file ) {
if ( 'wp-china-yes/wp-china-yes.php' !== $file ) {
From 789c9200322bc3d1d6dbd6efb6aa36c2fde291b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Wed, 25 Sep 2024 17:15:09 +0800
Subject: [PATCH 096/120] =?UTF-8?q?feat:=20=E6=8F=90=E5=8D=87PHP=E5=88=B07?=
=?UTF-8?q?.0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Service/Setting.php | 4 +++-
wp-china-yes.php | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Service/Setting.php b/Service/Setting.php
index 504b598..80d7fc7 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -498,7 +498,9 @@ HTML,
public function admin_menu() {
// 自定义名称
add_filter( 'all_plugins', function ( $plugins ) {
- $plugins['wp-china-yes/wp-china-yes.php']['Name'] = $this->settings['custom_name'];
+ if ( isset( $plugins['wp-china-yes/wp-china-yes.php'] ) ) {
+ $plugins['wp-china-yes/wp-china-yes.php']['Name'] = $this->settings['custom_name'];
+ }
return $plugins;
} );
diff --git a/wp-china-yes.php b/wp-china-yes.php
index 0d93e57..278cb81 100644
--- a/wp-china-yes.php
+++ b/wp-china-yes.php
@@ -11,7 +11,7 @@
* Network: True
* Requires at least: 4.9
* Tested up to: 9.9.9
- * Requires PHP: 5.6.0
+ * Requires PHP: 7.0.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
From 7121b4b7ef91b645ac5046427596a2ea5855c60e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Tue, 19 Nov 2024 17:47:44 +0800
Subject: [PATCH 097/120] =?UTF-8?q?feat:=20=E6=80=A7=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Plugin.php | 20 +++++---
Service/Base.php | 14 ++----
Service/Monitor.php | 56 ++++++++++++-----------
Service/Super.php | 10 ++--
composer.lock | 14 +++---
framework/classes/admin-options.class.php | 2 +-
framework/functions/actions.php | 2 +-
wp-china-yes.php | 2 +-
8 files changed, 63 insertions(+), 57 deletions(-)
diff --git a/Plugin.php b/Plugin.php
index 3d74313..4723162 100644
--- a/Plugin.php
+++ b/Plugin.php
@@ -5,7 +5,6 @@ namespace WenPai\ChinaYes;
defined( 'ABSPATH' ) || exit;
use WenPai\ChinaYes\Service\Base;
-use WenPai\ChinaYes\Service\Setting;
class Plugin {
@@ -14,8 +13,9 @@ class Plugin {
*/
public function __construct() {
new Base();
- new Setting();
- add_action( 'plugins_loaded', [ $this, 'plugins_loaded' ] );
+ if ( is_admin() ) {
+ add_action( 'plugins_loaded', [ $this, 'plugins_loaded' ] );
+ }
}
/**
@@ -40,6 +40,15 @@ class Plugin {
public function plugins_loaded() {
load_plugin_textdomain( 'wp-china-yes', false, CHINA_YES_PLUGIN_PATH . 'languages' );
add_action( 'admin_notices', [ $this, 'admin_notices' ] );
+ /**
+ * 插件列表页中所有插件增加「参与翻译」链接
+ */
+ add_filter( sprintf( '%splugin_action_links', is_multisite() ? 'network_admin_' : '' ), function ( $links, $plugin = '' ) {
+ $links[] = '参与翻译';
+ $links[] = '去广告';
+
+ return $links;
+ }, 10, 2 );
}
/**
@@ -47,9 +56,9 @@ class Plugin {
*/
public static function check() {
$notices = [];
- if ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
+ if ( version_compare( PHP_VERSION, '7.0.0', '<' ) ) {
deactivate_plugins( 'wp-china-yes/wp-china-yes.php' );
- $notices[] = '' . sprintf( __( 'WP-China-Yes 插件需要 PHP 5.6.0 或更高版本,当前版本为 %s,插件已自动禁用。',
+ $notices[] = '
' . sprintf( __( 'WP-China-Yes 插件需要 PHP 7.0.0 或更高版本,当前版本为 %s,插件已自动禁用。',
'wp-china-yes' ),
PHP_VERSION ) . '
';
}
@@ -70,7 +79,6 @@ class Plugin {
$notices[] = '
' . __( '检测到不兼容的插件 Kill 429,已自动禁用!', 'wp-china-yes' ) . '
';
-
}
// 代理服务器检测
if ( defined( 'WP_PROXY_HOST' ) || defined( 'WP_PROXY_PORT' ) ) {
diff --git a/Service/Base.php b/Service/Base.php
index 238172e..5938a15 100644
--- a/Service/Base.php
+++ b/Service/Base.php
@@ -12,21 +12,15 @@ defined( 'ABSPATH' ) || exit;
class Base {
public function __construct() {
- /**
- * 插件列表页中所有插件增加「参与翻译」链接
- */
- add_filter( sprintf( '%splugin_action_links', is_multisite() ? 'network_admin_' : '' ), function ( $links, $plugin = '' ) {
- $links[] = '
参与翻译';
- $links[] = '
去广告';
-
- return $links;
- }, 10, 2 );
-
// 加速服务
new Super();
// 监控服务
new Monitor();
// 更新服务
new Update();
+ if ( is_admin() ) {
+ // 设置服务
+ new Setting();
+ }
}
}
diff --git a/Service/Monitor.php b/Service/Monitor.php
index e59aab6..73fb085 100644
--- a/Service/Monitor.php
+++ b/Service/Monitor.php
@@ -17,40 +17,44 @@ class Monitor {
public function __construct() {
$this->settings = get_settings();
+ wp_clear_scheduled_hook( 'wp_china_yes_maybe_check_store' ); // TODO 下个版本移除
+ wp_clear_scheduled_hook( 'wp_china_yes_maybe_check_cravatar' ); // TODO 下个版本移除
+ wp_clear_scheduled_hook( 'wp_china_yes_maybe_check_admincdn' ); // TODO 下个版本移除
if ( $this->settings['monitor'] ) {
- return;
+ // 站点网络下只在主站运行
+ if ( is_main_site() ) {
+ add_action( 'init', [ $this, 'init' ] );
+ add_action( 'wp_china_yes_monitor_hook', [
+ $this,
+ 'run_monitor'
+ ] );
+ }
+ } else {
+ wp_clear_scheduled_hook( 'wp_china_yes_monitor' );
}
-
- add_action( 'init', [ $this, 'init' ] );
- add_action( 'wp_china_yes_maybe_check_store', [
- $this,
- 'maybe_check_store'
- ] );
- add_action( 'wp_china_yes_maybe_check_cravatar', [
- $this,
- 'maybe_check_cravatar'
- ] );
- add_action( 'wp_china_yes_maybe_check_admincdn', [
- $this,
- 'maybe_check_admincdn'
- ] );
}
/**
* 初始化
*/
public function init() {
- // 检查应用市场可用性
- if ( ! wp_next_scheduled( 'wp_china_yes_maybe_check_store' ) && $this->settings['store'] != 'off' ) {
- wp_schedule_event( time(), 'hourly', 'wp_china_yes_maybe_check_store' );
+ if ( ! wp_next_scheduled( 'wp_china_yes_monitor' ) ) {
+ wp_schedule_event( time(), 'hourly', 'wp_china_yes_monitor_hook' );
}
- // 检查初认头像可用性
- if ( ! wp_next_scheduled( 'wp_china_yes_maybe_check_cravatar' ) && $this->settings['cravatar'] != 'off' ) {
- wp_schedule_event( time(), 'hourly', 'wp_china_yes_maybe_check_cravatar' );
+ }
+
+ /**
+ * 运行监控
+ */
+ public function run_monitor() {
+ if ( $this->settings['store'] != 'off' ) {
+ $this->maybe_check_store();
}
- // 检查萌芽加速可用性
- if ( ! wp_next_scheduled( 'wp_china_yes_maybe_check_admincdn' ) && ! empty( $this->settings['admincdn'] ) ) {
- wp_schedule_event( time(), 'hourly', 'wp_china_yes_maybe_check_admincdn' );
+ if ( $this->settings['cravatar'] != 'off' ) {
+ $this->maybe_check_cravatar();
+ }
+ if ( ! empty( $this->settings['admincdn'] ) ) {
+ $this->maybe_check_admincdn();
}
}
@@ -105,7 +109,7 @@ class Monitor {
public function maybe_check_admincdn() {
// 后台加速
if ( in_array( 'admin', $this->settings['admincdn'] ) ) {
- $response = wp_remote_get( 'https://wpstatic.admincdn.com/6.4.3/wp-includes/js/wp-sanitize.min.js' );
+ $response = wp_remote_get( 'https://wpstatic.admincdn.com/6.7/wp-includes/js/wp-sanitize.min.js' );
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
$this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'admin' ] ) );
$this->update_settings();
@@ -161,7 +165,7 @@ class Monitor {
if ( is_multisite() ) {
update_site_option( 'wp_china_yes', $this->settings );
} else {
- update_option( 'wp_china_yes', $this->settings );
+ update_option( 'wp_china_yes', $this->settings, true );
}
}
}
diff --git a/Service/Super.php b/Service/Super.php
index 73c5832..c0e10d0 100644
--- a/Service/Super.php
+++ b/Service/Super.php
@@ -54,10 +54,10 @@ HTML;
支持论坛
|
翻译平台
- |
-
文章投稿
|
-
自选新闻源
+
文章投稿
+ |
+
自选新闻源
HTML;
diff --git a/composer.lock b/composer.lock
index 6066563..55fa2ae 100644
--- a/composer.lock
+++ b/composer.lock
@@ -8,16 +8,16 @@
"packages": [
{
"name": "yahnis-elsts/plugin-update-checker",
- "version": "v5.4",
+ "version": "v5.5",
"source": {
"type": "git",
"url": "https://github.com/YahnisElsts/plugin-update-checker.git",
- "reference": "e8e53e6d98e37fa7c895c93417f52e3775494715"
+ "reference": "845d65da93bcff31649ede00d9d73b1beadbb7f0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/e8e53e6d98e37fa7c895c93417f52e3775494715",
- "reference": "e8e53e6d98e37fa7c895c93417f52e3775494715",
+ "url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/845d65da93bcff31649ede00d9d73b1beadbb7f0",
+ "reference": "845d65da93bcff31649ede00d9d73b1beadbb7f0",
"shasum": ""
},
"require": {
@@ -27,7 +27,7 @@
"type": "library",
"autoload": {
"files": [
- "load-v5p4.php"
+ "load-v5p5.php"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -52,9 +52,9 @@
],
"support": {
"issues": "https://github.com/YahnisElsts/plugin-update-checker/issues",
- "source": "https://github.com/YahnisElsts/plugin-update-checker/tree/v5.4"
+ "source": "https://github.com/YahnisElsts/plugin-update-checker/tree/v5.5"
},
- "time": "2024-02-24T09:56:49+00:00"
+ "time": "2024-10-16T14:25:00+00:00"
}
],
"packages-dev": [],
diff --git a/framework/classes/admin-options.class.php b/framework/classes/admin-options.class.php
index 9c250aa..3a9cb9d 100644
--- a/framework/classes/admin-options.class.php
+++ b/framework/classes/admin-options.class.php
@@ -346,7 +346,7 @@ if ( ! class_exists( 'WP_CHINA_YES_Options' ) ) {
} else if ( $this->args['database'] === 'network' ) {
update_site_option( $this->unique, $data );
} else {
- update_option( $this->unique, $data );
+ update_option( $this->unique, $data, true );
}
do_action( "wp_china_yes_{$this->unique}_saved", $data, $this );
diff --git a/framework/functions/actions.php b/framework/functions/actions.php
index b18ed96..f22a70e 100644
--- a/framework/functions/actions.php
+++ b/framework/functions/actions.php
@@ -115,7 +115,7 @@ if ( ! function_exists( 'wp_china_yes_import_ajax' ) ) {
}
// Success
- update_option( $unique, $data );
+ update_option( $unique, $data, true );
wp_send_json_success();
diff --git a/wp-china-yes.php b/wp-china-yes.php
index 278cb81..7db8452 100644
--- a/wp-china-yes.php
+++ b/wp-china-yes.php
@@ -4,7 +4,7 @@
* Description: 文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,生生不息。
* Author: 文派开源
* Author URI: https://wp-china-yes.com
- * Version: 3.7.0
+ * Version: 3.7.1
* License: GPLv3 or later
* Text Domain: wp-china-yes
* Domain Path: /languages
From adb8efd3207ddbac5366f35a51f93d548e591322 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Tue, 19 Nov 2024 18:12:56 +0800
Subject: [PATCH 098/120] =?UTF-8?q?feat:=20=E6=8F=90=E5=8D=87=E7=89=88?=
=?UTF-8?q?=E6=9C=AC=E5=8F=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Service/Monitor.php | 4 ++--
wp-china-yes.php | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Service/Monitor.php b/Service/Monitor.php
index 73fb085..efb8c63 100644
--- a/Service/Monitor.php
+++ b/Service/Monitor.php
@@ -24,7 +24,7 @@ class Monitor {
// 站点网络下只在主站运行
if ( is_main_site() ) {
add_action( 'init', [ $this, 'init' ] );
- add_action( 'wp_china_yes_monitor_hook', [
+ add_action( 'wp_china_yes_monitor', [
$this,
'run_monitor'
] );
@@ -39,7 +39,7 @@ class Monitor {
*/
public function init() {
if ( ! wp_next_scheduled( 'wp_china_yes_monitor' ) ) {
- wp_schedule_event( time(), 'hourly', 'wp_china_yes_monitor_hook' );
+ wp_schedule_event( time(), 'hourly', 'wp_china_yes_monitor' );
}
}
diff --git a/wp-china-yes.php b/wp-china-yes.php
index 7db8452..1cdd69e 100644
--- a/wp-china-yes.php
+++ b/wp-china-yes.php
@@ -19,7 +19,7 @@ namespace WenPai\ChinaYes;
defined( 'ABSPATH' ) || exit;
-define( 'CHINA_YES_VERSION', '3.7.0' );
+define( 'CHINA_YES_VERSION', '3.7.1' );
define( 'CHINA_YES_PLUGIN_FILE', __FILE__ );
define( 'CHINA_YES_PLUGIN_URL', plugin_dir_url( CHINA_YES_PLUGIN_FILE ) );
define( 'CHINA_YES_PLUGIN_PATH', plugin_dir_path( CHINA_YES_PLUGIN_FILE ) );
From 435ffd698025356ead759a2aee4fc16c4efab0b2 Mon Sep 17 00:00:00 2001
From: devhaozi
Date: Tue, 19 Nov 2024 10:19:27 +0000
Subject: [PATCH 099/120] docs: Update CHANGELOG
---
CHANGELOG.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1d10811..d8c5dfa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,13 @@
All notable changes to `WP-China-Yes` will be documented in this file.
+## v3.7.1 - 2024-11-19
+
+1. 性能优化
+2. 修复监控无法关闭的问题
+
+**Full Changelog**: https://github.com/WenPai-org/wp-china-yes/compare/v3.6.5...v3.7.1
+
## v3.6.5 - 2024-08-23
1. 优化 CLI 判断
From 25fdf04fcc342851622f8065ed46ce1a3da09a5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Sun, 8 Dec 2024 02:50:27 +0800
Subject: [PATCH 100/120] feat: check hook before clear
---
Service/Monitor.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Service/Monitor.php b/Service/Monitor.php
index efb8c63..b2be08e 100644
--- a/Service/Monitor.php
+++ b/Service/Monitor.php
@@ -30,7 +30,9 @@ class Monitor {
] );
}
} else {
- wp_clear_scheduled_hook( 'wp_china_yes_monitor' );
+ if ( wp_get_scheduled_event( 'wp_china_yes_monitor' ) ) {
+ wp_clear_scheduled_hook( 'wp_china_yes_monitor' );
+ }
}
}
From a500ff9b6de5953c6d48171bfcf2cc7262af91b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=80=97=E5=AD=90?=
Date: Thu, 12 Dec 2024 23:58:22 +0800
Subject: [PATCH 101/120] =?UTF-8?q?feat:=20=E4=BD=BF=E7=94=A8fa5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Service/Setting.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/Service/Setting.php b/Service/Setting.php
index 80d7fc7..39903d9 100644
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -19,7 +19,6 @@ class Setting {
public function __construct() {
$this->settings = get_settings();
add_filter( 'wp_china_yes_enqueue_assets', '__return_true' );
- add_filter( 'wp_china_yes_fa4', '__return_true' );
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_admin_assets' ] );
add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', [ $this, 'admin_menu' ] );
self::admin_init();
From f2a89c42daa9dd41265486e2d0c16ce3bebc734d Mon Sep 17 00:00:00 2001
From: feng
Date: Sat, 21 Dec 2024 12:06:40 +0800
Subject: [PATCH 102/120] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=96=B0=20UI=20?=
=?UTF-8?q?=E5=8F=8A=E5=9F=9F=E5=90=8D=E6=9B=BF=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
更新域名wp-china-yes.com 到 wpcy.com
---
Service/Setting.php | 182 +++++++++--------
assets/css/fonts.css | 0
assets/css/setting.css | 336 ++++++++++++++++++++++++++++---
assets/images/website-banner.jpg | Bin 0 -> 29467 bytes
wp-china-yes.php | 6 +-
5 files changed, 407 insertions(+), 117 deletions(-)
mode change 100644 => 100755 Service/Setting.php
mode change 100644 => 100755 assets/css/fonts.css
mode change 100644 => 100755 assets/css/setting.css
create mode 100755 assets/images/website-banner.jpg
mode change 100644 => 100755 wp-china-yes.php
diff --git a/Service/Setting.php b/Service/Setting.php
old mode 100644
new mode 100755
index 39903d9..376bbc6
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -19,6 +19,7 @@ class Setting {
public function __construct() {
$this->settings = get_settings();
add_filter( 'wp_china_yes_enqueue_assets', '__return_true' );
+ add_filter( 'wp_china_yes_fa4', '__return_true' );
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_admin_assets' ] );
add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', [ $this, 'admin_menu' ] );
self::admin_init();
@@ -46,9 +47,23 @@ class Setting {
'database' => is_multisite() ? 'network' : '',
] );
+ WP_CHINA_YES::createSection( $this->prefix, [
+ 'title' => '欢迎使用',
+ 'icon' => 'icon icon-home-1',
+ 'fields' => [
+ [
+ 'type' => 'content',
+ 'content' =>
+ << 原生体验
文派叶子🍃(WP-China-Yes)是一款不可多得的 WordPress 系统底层优化和生态基础设施软件。

特色功能
* 100% 兼容 WP 程序及发行分支版本,更多优秀插件待您体验。
网站加速
优化加速插件多如牛毛,为何文派叶子如此与众不同?
进一步了解 ↗ 翻译推送
高质量翻译中文本地化翻译由文派开源官方提供,欢迎参与改进。
本地化改进 ↗ 加入我们
关注文派茶馆 WPTEA.com 公众号以及订阅我们的时事通讯即可接收独家内容、提示和更新。
+HTML,
+ ]
+ ],
+ ] );
+
WP_CHINA_YES::createSection( $this->prefix, [
'title' => '加速设置',
- 'icon' => 'fa fa-rocket',
+ 'icon' => 'icon icon-flash-1',
'fields' => [
[
'id' => 'store',
@@ -62,7 +77,7 @@ class Setting {
],
'default' => 'wenpai',
'subtitle' => '是否启用市场加速',
- 'desc' => __( '官方加速源(WPMirror)直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文派翻译平台。可参考源站说明。',
+ 'desc' => __( '官方加速源(WPMirror)直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文派翻译平台。可参考源站说明。',
'wp-china-yes' ),
],
[
@@ -74,15 +89,15 @@ class Setting {
'admin' => '后台加速',
'frontend' => '前台加速',
'googlefonts' => 'Google 字体',
- 'googleajax' => 'Google 前端公共库',
- 'cdnjs' => 'CDNJS 前端公共库',
- 'jsdelivr' => 'jsDelivr 公共库'
+ 'googleajax' => 'Google 前端库',
+ 'cdnjs' => 'CDNJS 前端库',
+ 'jsdelivr' => 'jsDelivr 前端库'
],
'default' => [
'admin' => 'admin',
],
'subtitle' => '是否启用萌芽加速',
- 'desc' => __( '萌芽加速(adminCDN)将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需要加速的项目,更多细节控制和功能,请查看推荐设置。',
+ 'desc' => __( '萌芽加速(adminCDN)将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需要加速的项目,更多细节控制和功能,请查看推荐设置。',
'wp-china-yes' ),
],
[
@@ -98,7 +113,7 @@ class Setting {
],
'default' => 'cn',
'subtitle' => '是否启用头像加速',
- 'desc' => __( '初认头像(Cravatar)Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请安装 WPAavatar 插件。可自选加速线路。',
+ 'desc' => __( '初认头像(Cravatar)Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请安装 WPAavatar 插件。可自选加速线路。',
'wp-china-yes' ),
],
],
@@ -106,7 +121,7 @@ class Setting {
WP_CHINA_YES::createSection( $this->prefix, [
'title' => '文风字体',
- 'icon' => 'fa fa-font',
+ 'icon' => 'icon icon-text',
'fields' => [
[
'id' => 'windfonts',
@@ -121,7 +136,7 @@ class Setting {
],
'default' => 'off',
'subtitle' => '是否启用文风字体定制',
- 'desc' => __( '文风字体(Windfonts)为您的网站增添无限活力。专为中文网页设计,旨在提升用户阅读体验和视觉享受。新手使用请先查看字体使用说明。',
+ 'desc' => __( '文风字体(Windfonts)为您的网站增添无限活力。专为中文网页设计,旨在提升用户阅读体验和视觉享受。新手使用请先查看字体使用说明。',
'wp-china-yes' ),
],
[
@@ -226,14 +241,14 @@ class Setting {
],
[
'type' => 'content',
- 'content' => '默认字体适配规则跟随插件更新,插件更新后可删除字体重新添加以获取最新适配规则',
+ 'content' => '默认字体适配规则跟随插件更新,插件更新后可删除字体重新添加以获取最新适配规则',
],
],
] );
WP_CHINA_YES::createSection( $this->prefix, [
'title' => '广告屏蔽',
- 'icon' => 'fa fa-ban',
+ 'icon' => 'icon icon-eye-slash',
'fields' => [
[
'id' => 'adblock',
@@ -246,7 +261,7 @@ class Setting {
],
'default' => 'off',
'subtitle' => '是否启用后台广告屏蔽',
- 'desc' => __( '文派叶子🍃(WP-China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用插件侵入式后台广告、通知及无用信息,拿回您的后台控制权。',
+ 'desc' => __( '文派叶子🍃(WP-China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用插件侵入式后台广告、通知及无用信息,拿回您的后台控制权。',
'wp-china-yes' ),
],
[
@@ -254,7 +269,7 @@ class Setting {
'type' => 'group',
'title' => '规则列表',
'subtitle' => '使用的广告屏蔽规则列表',
- 'desc' => __( '支持添加多条广告屏蔽规则',
+ 'desc' => __( '支持添加多条广告屏蔽规则',
'wp-china-yes' ),
'button_title' => '添加规则',
@@ -295,14 +310,14 @@ class Setting {
],
[
'type' => 'content',
- 'content' => '默认规则跟随插件更新,插件更新后可删除规则重新添加以获取更多最新屏蔽规则,出现异常,请尝试先停用规则排查原因。',
+ 'content' => '默认规则跟随插件更新,插件更新后可删除规则重新添加以获取更多最新屏蔽规则,出现异常,请尝试先停用规则排查原因。',
],
],
] );
WP_CHINA_YES::createSection( $this->prefix, [
'title' => '飞行模式',
- 'icon' => 'fa fa-plane',
+ 'icon' => 'icon icon-airplane',
'fields' => [
[
'id' => 'plane',
@@ -315,7 +330,7 @@ class Setting {
],
'default' => 'off',
'subtitle' => '是否启用飞行模式',
- 'desc' => __( '文派叶子🍃(WP-China-Yes)独家特色功能,飞行模式可以屏蔽 WordPress 主题插件中国不能访问的服务 API 请求,加速网站前后台访问。注意:部分外部请求为产品更新检测,若屏蔽请定期手动检测。',
+ 'desc' => __( '飞行模式可屏蔽 WordPress 插件主题在中国无法访问的 API 请求,加速网站前后台访问。注:部分外部请求为产品更新检测,若已屏蔽请定期检测。',
'wp-china-yes' ),
],
[
@@ -323,7 +338,7 @@ class Setting {
'type' => 'group',
'title' => '规则列表',
'subtitle' => '飞行模式使用的 URL 屏蔽规则列表',
- 'desc' => __( '支持添加多条 URL 屏蔽规则',
+ 'desc' => __( '支持添加多条 URL 屏蔽规则',
'wp-china-yes' ),
'button_title' => '添加规则',
@@ -366,9 +381,10 @@ class Setting {
],
] );
+
WP_CHINA_YES::createSection( $this->prefix, [
- 'title' => '其他设置',
- 'icon' => 'fa fa-cogs',
+ 'title' => '节点监控',
+ 'icon' => 'icon icon-story',
'fields' => [
[
'id' => 'monitor',
@@ -379,64 +395,82 @@ class Setting {
'desc' => __( '脉云维护(MainCloud)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节点或关闭加速,以保证您的网站正常访问',
'wp-china-yes' ),
],
- [
- 'id' => 'hide',
- 'type' => 'switcher',
- 'default' => false,
- 'title' => '隐藏设置',
- 'subtitle' => '隐藏插件设置入口',
- 'desc' => __( '如果您不希望让客户知道本站启用了文派叶子🍃(WP-China-Yes)插件及服务,可开启此选项',
- 'wp-china-yes' ),
- ],
- [
- 'id' => 'custom_name',
- 'type' => 'text',
- 'title' => '品牌白标',
- 'subtitle' => '自定义插件显示品牌名',
- 'desc' => __( '专为 WordPress 建站服务商和代理机构提供的自定义品牌 OEM 功能,输入您的品牌词启用后生效',
- 'wp-china-yes' ),
- 'default' => "WP-China-Yes",
- ],
[
'type' => 'content',
- 'content' => '启用隐藏设置前请务必的保存或收藏当前设置页面 URL,否则您将无法再次进入插件设置页面',
+ 'content' => '启用隐藏设置前请务必的保存或收藏当前设置页面 URL,否则您将无法再次进入插件设置页面',
],
],
] );
WP_CHINA_YES::createSection( $this->prefix, [
- 'title' => '关于插件',
- 'icon' => 'fa fa-info-circle',
+ 'title' => '品牌白标',
+ 'icon' => 'icon icon-password-check',
'fields' => [
[
- 'type' => 'heading',
- 'content' => '文派叶子🍃 —— 开源 WordPress 中国网站加速器。',
- ],
- [
- 'type' => 'submessage',
- 'content' => '100% 开源代码,一起参与文派(WordPress)软件国产化进程,打造属于您自己的开源自助建站程序。',
- ],
- [
- 'type' => 'subheading',
- 'content' => '项目简介',
+ 'id' => 'custom_name',
+ 'type' => 'text',
+ 'title' => '品牌白标',
+ 'subtitle' => '自定义插件显示品牌名',
+ 'desc' => __( '专为 WordPress 建站服务商和代理机构提供的自定义品牌 OEM 功能,输入您的品牌词启用后生效',
+ 'wp-china-yes' ),
+ 'default' => "WP-China-Yes",
],
[
'type' => 'content',
- 'content' => '文派叶子 🍃(WP-China-Yes)是一款不可多得的 WordPress 系统底层优化和生态基础设施软件。项目起源于 2019 年,专为解决困扰了中国互联网数十年的特色问题而存在。此为文派开源(WenPai.org)的一部分。
将您的 WordPress 接入本土生态体系,这将为您提供一个更贴近中国人使用习惯的 WordPress。',
+ 'content' => '启用隐藏设置前请务必的保存或收藏当前设置页面 URL,否则您将无法再次进入插件设置页面',
],
+ ],
+ ] );
+
+
+ WP_CHINA_YES::createSection( $this->prefix, [
+ 'title' => '其他设置',
+ 'icon' => 'icon icon-setting',
+ 'fields' => [
[
- 'type' => 'subheading',
- 'content' => '赞助商',
- ],
- [
- 'type' => 'submessage',
- 'content' => '特别感谢以下企业品牌对文派项目提供的资金资源,同时期待社会各界参与。',
+ 'id' => 'hide',
+ 'type' => 'switcher',
+ 'default' => false,
+ 'title' => '隐藏设置',
+ 'subtitle' => '隐藏插件设置入口',
+ 'desc' => __( '如果您不希望让客户知道本站启用了文派叶子🍃(WP-China-Yes)插件及服务,可开启此选项',
+ 'wp-china-yes' ),
],
+ ],
+ ] );
+
+
+ WP_CHINA_YES::createSection( $this->prefix, [
+ 'title' => '建站套件',
+ 'icon' => 'icon icon-mouse',
+ 'fields' => [
[
'type' => 'content',
'content' =>
<<
+ 开源建站
文派寻鹿🦌(WP Deer)建站套件是由文派科技官方提供的企业建站产品集合,代码均为 100% GPL 开源,无任何加密隐藏。
+HTML,
+ ]
+ ],
+ ] );
+
+
+
+ WP_CHINA_YES::createSection( $this->prefix, [
+ 'title' => '关于插件',
+ 'icon' => 'icon icon-info-circle',
+ 'fields' => [
+ [
+ 'type' => 'content',
+ 'content' =>
+ <<
+
项目简介
文派(WordPress)中国本土化项目始于 2019 年,由 文派叶子🍃(WPCY) 插件开启,其前身为 WP-China-Yes。
+
+
2023 年 5 月,文派科技完成对该项目的收购,并对其进行了全面的品牌重塑。
+
赞助支持
特别感谢以下企业品牌对文派项目提供的资金资源支持。早期伙伴未来有机会共享文派生态资源,期待社会各界参与。
-HTML,
- ],
- [
- 'type' => 'subheading',
- 'content' => '开发者 & 贡献者',
- ],
- [
- 'type' => 'submessage',
- 'content' => '以下为对此项目提供过帮助的朋友,欢迎
贡献您自己的力量。',
- ],
- [
- 'type' => 'content',
- 'content' =>
- <<
-
孙锡源 |
-
耗子 |
-
Yulinn |
-
赵丰 |
-
jialong Dong |
-
TigerKK |
-
xianyu125 |
-
ElliotHughes |
-
诗语 |
-
莫蒂奇 |
-
薇晓朵
-
+
开发 & 贡献者
100% 开源代码,诚邀您一起参与文派 (WordPress) 软件国产化进程,打造属于自己的开源自助建站程序。
HTML,
]
],
] );
+
}
/**
diff --git a/assets/css/fonts.css b/assets/css/fonts.css
old mode 100644
new mode 100755
diff --git a/assets/css/setting.css b/assets/css/setting.css
old mode 100644
new mode 100755
index f72e77b..1ad5486
--- a/assets/css/setting.css
+++ b/assets/css/setting.css
@@ -1,26 +1,64 @@
+#wpcontent {
+ padding-left: 0px;
+}
+#wpbody-content {
+ padding-bottom: 0px;
+}
+#wpfooter {
+ display: none;
+}
+
+
+@media only screen and (max-width: 782px) {
+ .wp_china_yes-nav-normal+.wp_china_yes-content {
+ margin-left: 0!important;
+ }
+ .wp_china_yes-header-inner h1 {
+ margin-bottom: 20px;
+ }
+ .auto-fold #wpcontent {
+ padding-left: 0px;
+ }
+ .wp_china_yes-field-text input {
+ width: 100%;
+ }
+}
+
+.wp-core-ui .button, .wp-core-ui .button-primary, .wp-core-ui .button-secondary {
+ border-radius: 1px;
+}
+
.sponsor-logos {
display: block;
flex-wrap: wrap;
justify-content: center;
+ margin: 24px 0;
+ grid-gap: 24px;
+ grid-template-columns: repeat(7, minmax(0, 1fr));
+ align-items: center;
}
.sponsor-logos img {
flex-basis: calc(20% - 10px);
- max-width: 85px;
- margin: 14px;
+ max-width: 80px;
+ margin: 13px;
height: auto;
}
.contributors-name {
margin-top: 0;
margin-bottom: 0;
- padding: 12px;
+ padding: 20px 0;
color: #dcdcde;
+ display: block;
+ flex-wrap: wrap;
+ display: flex;
+ grid-gap: 22px;
}
-.contributors-name a {
- line-height: 2;
- padding: 0.5em;
+.wp_china_yes-content {
+ position: relative;
+ background-color: #f1f1f1;
}
.wp_china_yes-content a {
@@ -33,21 +71,67 @@
}
.wp_china_yes-options {
- background-color: #fff;
- padding: 1%;
+ background-color: #ffffff;
border-radius: 10px;
text-transform: none;
line-height: 2;
- box-shadow: 0 0.375rem 1.5rem 0 rgba(141, 153, 165, 0.13);
- max-width: 1100px;
- margin: 2rem auto;
+}
+
+.wp_china_yes-options {
+ margin-top: 0px;
+ margin-right: 0px;
+}
+
+.wp_china_yes-field.wp_china_yes-field-radio, .wp_china_yes-field-checkbox, .wp_china_yes-field-group, .wp_china_yes-field-switcher, .wp_china_yes-field-text {
+ padding: 8%;
+ background-color: #ffffff;
+ margin: 5% 0;
+ border-radius: 1px;
+ box-shadow: 0 0 0 1px #ccd0d4, 0 1px 1px 1px rgba(0, 0, 0, .04);
+}
+
+
+.wp_china_yes-section {
+ margin: 50px auto;
+ max-width: 1000px;
+ background-color: #f1f1f1;
+}
+
+.wp_china_yes-field {
+ position: relative;
+ border: 0px solid #ccd0d4;
+}
+
+.wp_china_yes-field+.wp_china_yes-field {
+ border-top: 0px solid #eee;
+}
+
+.wp_china_yes-field.wp_china_yes-field-content {
+ padding: 0px;
}
.wp_china_yes-section-title {
padding: 20px 30px;
background-color: #fff;
border-top: 0 solid #f5f5f5;
- border-bottom: 1px solid #f5f5f5;
+ border-bottom: 0px solid #eee;
+ box-shadow: 0 0 0 1px #ccd0d4, 0 1px 1px 1px rgba(0, 0, 0, .04);
+}
+
+.wp_china_yes-section-title h3 {
+ font-size: 14px;
+ font-weight: 400;
+}
+
+.wp_china_yes-section-title .wp_china_yes-section-icon {
+ margin-right: 10px;
+ width: 20px;
+ height: 24px;
+ line-height: 20px;
+ font-size: 20px;
+ text-align: center;
+ display: inline-block;
+ vertical-align: middle;
}
.wp_china_yes-field-subheading {
@@ -63,14 +147,18 @@
background: #ffffff;
}
+
.wp_china_yes-theme-light .wp_china_yes-nav-background {
background-color: #ffffff;
- border-right: 1px solid #f5f5f5;
+ border-right: 1px solid #dddddd;
+ flex-direction: column;
+ min-height: 100vh;
}
.wp_china_yes-theme-light .wp_china_yes-footer {
border-top: 1px solid #fff;
background: #ffffff;
+ display: none;
}
.wp_china_yes-field-heading {
@@ -78,24 +166,71 @@
background-color: #ffffff;
}
+.wp_china_yes-nav-normal {
+ width: 205px;
+ padding-left: 20px;
+}
+
+.wp_china_yes-nav {
+ padding: 20px;
+}
+.wp_china_yes-nav-background {
+ width: 250px;
+}
+.wp_china_yes-nav ul li a {
+ font-size: 13px;
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+ margin: 5px;
+ text-decoration: none;
+ transition-property: color, background;
+ transition-duration: .2s;
+ transition-timing-function: ease;
+}
+
+.wp_china_yes-nav .wp_china_yes-tab-icon {
+ margin-right: 10px;
+ width: 20px;
+ height: 24px;
+ line-height: 20px;
+ font-size: 20px;
+ text-align: center;
+ display: inline-block;
+ vertical-align: middle;
+}
+
.wp_china_yes-theme-light .wp_china_yes-nav ul li a {
background-color: #ffffff;
}
+.wp_china_yes-theme-light .wp_china_yes-nav ul li a:hover {
+ color: #3858e9;
+ background-color: #f1f1f1;
+}
.wp_china_yes-submessage-normal {
border-color: #ffffff;
background-color: #ffffff;
}
-.wp_china_yes-field + .wp_china_yes-field {
- border-top: 1px solid #ffffff;
+
+.wp_china_yes-nav-normal+.wp_china_yes-content {
+ margin-left: 248px;
+}
+
+.wp_china_yes-search-all .wp_china_yes-content, .wp_china_yes-show-all .wp_china_yes-content {
+ margin-left: 0;
}
.wp_china_yes-theme-light .wp_china_yes-nav-normal > ul li a {
- border-bottom: 1px solid #f5f5f5;
- border-right: 1px solid #f5f5f5;
+ border-bottom: 0px solid #f5f5f5;
+ border-right: 0px solid #f5f5f5;
+}
+.wp_china_yes-theme-light .wp_china_yes-nav ul li .wp_china_yes-active {
+ color: #111;
+ background-color: #f5f5f7;
+ background: #f5f5f7;
}
-
.wp_china_yes-field-group .wp_china_yes-cloneable-header-icon {
font-size: 10px;
}
@@ -116,28 +251,37 @@
.wp_china_yes-field-group .wp_china_yes-cloneable-title {
border: 1px solid #ccd0d4;
background-color: #ffffff;
- border-radius: 8px;
+ border-radius: 1px;
}
.wp_china_yes-field-group .wp_china_yes-cloneable-content {
- border: 0 solid #ffffff;
- background-color: #ffffff;
+ padding: 0;
+ border-top: 1px solid #ffffff;
+}
+
+.wp_china_yes-field-group .wp_china_yes-cloneable-content>.wp_china_yes-field {
+ padding: 15px;
+ margin: 20px;
}
.wp_china_yes-sticky .wp_china_yes-header-inner {
- border-radius: 10px;
- box-shadow: 0 0 10px rgba(0, 0, 0, .1);
+ border-bottom: 1px solid #dddddd;
+ background: #ffffff;
+}
+.wp_china_yes-sticky .wp_china_yes-header-inner {
+ position: fixed;
+ box-shadow: unset;
}
.wp_china_yes-warning-primary {
- color: #fff !important;
- border-color: #2c3338 !important;
- background: #2c3338 !important;
+ color: #5e77ec !important;
+ border-color: #5e77ec !important;
+ background: #ffffff !important;
}
.wp_china_yes-warning-primary:focus, .wp_china_yes-warning-primary:hover {
- border-color: #1d2327 !important;
- background: #1d2327 !important;
+ border-color: #3858e9 !important;
+ background: #ffffff !important;
}
.wp_china_yes-field-switcher .wp_china_yes--switcher:not(.wp_china_yes--active) {
@@ -148,3 +292,139 @@
margin-right: -2px;
margin-bottom: -1px;
}
+
+
+@media screen and (max-width: 600px) {
+.wpcy-about__grid {
+ grid-template-columns: 1fr!important;
+ }
+}
+
+
+span.wpcy-icon-inner {
+ line-height: 1px;
+ font-size: 28px;
+ color: #000000;
+}
+
+span.wpcy-icon-inner-list {
+ line-height: 0px;
+ font-size: 24px;
+ color: #000000;
+}
+
+.wpcy-about__grid {
+ margin: 24px auto;
+ display: grid;
+ grid-gap: 24px;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+}
+
+.wpcy-kit__grid {
+ margin: 24px auto;
+ display: grid;
+ grid-gap: 24px;
+ grid-template-columns: repeat(1, minmax(0, 1fr));
+}
+
+.column.wpcy-kit-banner {
+ padding: 6% 6% 3%!important;
+}
+
+.wpcy-about__grid .column {
+ padding: 10%;
+ background-color: #ffffff;
+ border-radius: 1px;
+ box-shadow: 0 0 0 1px #ccd0d4, 0 1px 1px 1px rgba(0, 0, 0, .04);
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+}
+.wpcy-about__grid.columns-1 {
+ grid-template-columns: repeat(1, minmax(0, 1fr));
+}
+.wpcy-about__grid.columns-3 {
+ grid-template-columns: repeat(3, minmax(0, 1fr));
+}
+.wpcy-about__grid .column > svg {
+ width: 30px;
+ height: 30px;
+ margin-left: -3px;
+}
+
+.wpcy-buttons {
+ margin-top: 4px;
+ margin-bottom: 32px;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 12px;
+}
+.wpcy-banner img {
+ max-width: 100%;
+ width: 100%;
+ height: auto;
+ margin-top: auto;
+ vertical-align: middle;
+}
+.components-button.has-icon {
+ justify-content: center;
+ min-width: 36px;
+ padding: 6px;
+}
+.components-button.has-icon.has-text {
+ gap: 4px;
+ justify-content: start;
+ padding-left: 8px;
+ padding-right: 12px;
+}
+
+.wpcy-about__list li a:not(:hover) {
+ text-decoration: none;
+}
+.components-button {
+ align-items: center;
+ -webkit-appearance: none;
+ background: none;
+ border: 0;
+ border-radius: 2px;
+ box-sizing: border-box;
+ color: var(--wp-components-color-foreground, #1e1e1e);
+ cursor: pointer;
+ display: inline-flex
+;
+ font-family: inherit;
+ font-size: 13px;
+ font-weight: 400;
+ height: 36px;
+ margin: 0;
+ padding: 6px 12px;
+ text-decoration: none;
+ transition: box-shadow .1s linear;
+}
+.components-button.button-link {
+ background: none;
+ border: 0;
+ border-radius: 0;
+ box-shadow: none;
+ color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
+ height: auto;
+ margin: 0;
+ outline: none;
+ padding: 0;
+ text-align: left;
+ text-decoration: underline;
+ transition-duration: .05s;
+ transition-property: border, background, color;
+ transition-timing-function: ease-in-out;
+}
+.components-button.button-primary {
+ display: inline-flex;
+ padding: 6px 12px;
+}
+
+.components-button.button-secondary {
+ background: #0000;
+ display: inline-flex;
+ padding: 6px 12px;
+}
+
diff --git a/assets/images/website-banner.jpg b/assets/images/website-banner.jpg
new file mode 100755
index 0000000000000000000000000000000000000000..475afd7c3cfa94a9b262deecb33615eb9419067f
GIT binary patch
literal 29467
zcmeFYby(Eh)-VhbqJ)%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Gt7%(V9eYJtt
zVTY5z>)=M>n0@m{Xig|arn3cwbs`5G3(K1>Qexwdd2cxzcH&~pRd7>*J9Su<h32CFZGXI&AzV0hOZqv
z2{ESB#>^c@WCuTI6zvRR)rpzB7Qs-P?KGiK6uDZcFvjx%6m?`N0t3zEnacRNvij9I$N2H4%6
zaJQCc?s$ijDzrO?GXc6akVC$wNS}R=A=Q&HLJtD
zv^iq_rcmO@K$U75c}To=i}c;$;)Dt;Md%SALV5gQlP%1=%J%sgVGO)wJ6Y8McfRK?
zN#7C=OR$L|=}{rUy~#E_1HBGf($jO#f^EJCPZTqq?>RN|ohXqFa&rgMBo8BColf0!
T9S5<@vmHI@;eVa*yPf$TYTP0d
literal 0
HcmV?d00001
diff --git a/wp-china-yes.php b/wp-china-yes.php
old mode 100644
new mode 100755
index 1cdd69e..597557f
--- a/wp-china-yes.php
+++ b/wp-china-yes.php
@@ -3,8 +3,8 @@
* Plugin Name: WP-China-Yes
* Description: 文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,生生不息。
* Author: 文派开源
- * Author URI: https://wp-china-yes.com
- * Version: 3.7.1
+ * Author URI: https://wpcy.com
+ * Version: 3.8
* License: GPLv3 or later
* Text Domain: wp-china-yes
* Domain Path: /languages
@@ -19,7 +19,7 @@ namespace WenPai\ChinaYes;
defined( 'ABSPATH' ) || exit;
-define( 'CHINA_YES_VERSION', '3.7.1' );
+define( 'CHINA_YES_VERSION', '3.8' );
define( 'CHINA_YES_PLUGIN_FILE', __FILE__ );
define( 'CHINA_YES_PLUGIN_URL', plugin_dir_url( CHINA_YES_PLUGIN_FILE ) );
define( 'CHINA_YES_PLUGIN_PATH', plugin_dir_path( CHINA_YES_PLUGIN_FILE ) );
From 8c29188c1bfbcda0fc6ebd9feb9ad10c30c7f391 Mon Sep 17 00:00:00 2001
From: feng
Date: Sat, 21 Dec 2024 12:25:04 +0800
Subject: [PATCH 103/120] Create iconsax-icons.php
---
framework/fields/icon/iconsax-icons.php | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100755 framework/fields/icon/iconsax-icons.php
diff --git a/framework/fields/icon/iconsax-icons.php b/framework/fields/icon/iconsax-icons.php
new file mode 100755
index 0000000..1ab2438
--- /dev/null
+++ b/framework/fields/icon/iconsax-icons.php
@@ -0,0 +1,12 @@
+ 'Iconsax font icon',
+ 'icons' => array( 'icon icon-24-support','icon icon-3d-cube-scan','icon icon-3d-rotate','icon icon-3d-square','icon icon-3dcube','icon icon-3square','icon icon-aave-aave','icon icon-activity','icon icon-add-circle','icon icon-add-square','icon icon-add','icon icon-additem','icon icon-airdrop','icon icon-airplane-square','icon icon-airplane','icon icon-airpod','icon icon-airpods','icon icon-alarm','icon icon-align-bottom','icon icon-align-horizontally','icon icon-align-left','icon icon-align-right','icon icon-align-vertically','icon icon-android','icon icon-ankr-ankr','icon icon-apple','icon icon-aquarius','icon icon-archive-1','icon icon-archive-2','icon icon-archive-add','icon icon-archive-book','icon icon-archive-minus','icon icon-archive-slash','icon icon-archive-tick','icon icon-archive','icon icon-arrange-circle-2','icon icon-arrange-circle','icon icon-arrange-square-2','icon icon-arrange-square','icon icon-arrow-2','icon icon-arrow-3','icon icon-arrow-bottom','icon icon-arrow-circle-down','icon icon-arrow-circle-left','icon icon-arrow-circle-right','icon icon-arrow-circle-up','icon icon-arrow-down-1','icon icon-arrow-down-2','icon icon-arrow-down','icon icon-arrow-left-1','icon icon-arrow-left-2','icon icon-arrow-left-3','icon icon-arrow-left','icon icon-arrow-right-1','icon icon-arrow-right-2','icon icon-arrow-right-3','icon icon-arrow-right-4','icon icon-arrow-right','icon icon-arrow-square-down','icon icon-arrow-square-left','icon icon-arrow-square-up','icon icon-arrow-square','icon icon-arrow-swap-horizontal','icon icon-arrow-swap','icon icon-arrow-up-1','icon icon-arrow-up-2','icon icon-arrow-up-3','icon icon-arrow-up','icon icon-arrow','icon icon-attach-circle','icon icon-attach-square','icon icon-audio-square','icon icon-augur-rep','icon icon-autobrightness','icon icon-autonio-niox','icon icon-avalanche-avax','icon icon-award','icon icon-back-square','icon icon-backward-10-seconds','icon icon-backward-15-seconds','icon icon-backward-5-seconds','icon icon-backward-item','icon icon-backward','icon icon-bag-2','icon icon-bag-cross-1','icon icon-bag-cross','icon icon-bag-happy','icon icon-bag-tick-2','icon icon-bag-tick','icon icon-bag-timer','icon icon-bag','icon icon-bank','icon icon-barcode','icon icon-battery-charging','icon icon-battery-disable','icon icon-battery-empty-1','icon icon-battery-empty','icon icon-battery-full','icon icon-battery-half','icon icon-be','icon icon-bezier','icon icon-bill','icon icon-binance-coin-bnb','icon icon-binance-usd-busd','icon icon-bitcoin-btc','icon icon-bitcoin-card','icon icon-bitcoin-convert','icon icon-bitcoin-refresh','icon icon-blend-2','icon icon-blend','icon icon-blogger','icon icon-bluetooth-2','icon icon-bluetooth-circle','icon icon-bluetooth-rectangle','icon icon-bluetooth','icon icon-blur','icon icon-book-1','icon icon-book-saved','icon icon-book-square','icon icon-book','icon icon-bookmark-2','icon icon-bookmark','icon icon-bootstrap','icon icon-box-1','icon icon-box-2','icon icon-box-add','icon icon-box-remove','icon icon-box-search','icon icon-box-tick','icon icon-box-time','icon icon-box','icon icon-briefcase','icon icon-brifecase-cross','icon icon-brifecase-tick','icon icon-brifecase-timer','icon icon-broom','icon icon-brush-1','icon icon-brush-2','icon icon-brush-3','icon icon-brush-4','icon icon-brush','icon icon-bubble','icon icon-bucket-circle','icon icon-bucket-square','icon icon-bucket','icon icon-building-3','icon icon-building-4','icon icon-building','icon icon-buildings-2','icon icon-buildings','icon icon-buliding','icon icon-bus','icon icon-buy-crypto','icon icon-cake','icon icon-calculator','icon icon-calendar-1','icon icon-calendar-2','icon icon-calendar-add','icon icon-calendar-circle','icon icon-calendar-edit','icon icon-calendar-remove','icon icon-calendar-search','icon icon-calendar-tick','icon icon-calendar','icon icon-call-add','icon icon-call-calling','icon icon-call-incoming','icon icon-call-minus','icon icon-call-outgoing','icon icon-call-received','icon icon-call-remove','icon icon-call-slash','icon icon-call','icon icon-camera-slash','icon icon-camera','icon icon-candle-2','icon icon-candle','icon icon-car','icon icon-card-add','icon icon-card-coin','icon icon-card-edit','icon icon-card-pos','icon icon-card-receive','icon icon-card-remove-1','icon icon-card-remove','icon icon-card-send','icon icon-card-slash','icon icon-card-tick-1','icon icon-card-tick','icon icon-card','icon icon-cardano-ada','icon icon-cards','icon icon-category-2','icon icon-category','icon icon-cd','icon icon-celo-celo','icon icon-celsius-cel','icon icon-chainlink-link','icon icon-chart-1','icon icon-chart-2','icon icon-chart-21','icon icon-chart-3','icon icon-chart-fail','icon icon-chart-square','icon icon-chart-success','icon icon-chart','icon icon-check','icon icon-chrome','icon icon-civic-cvc','icon icon-clipboard-close','icon icon-clipboard-export','icon icon-clipboard-import','icon icon-clipboard-text','icon icon-clipboard-tick','icon icon-clipboard','icon icon-clock-1','icon icon-clock','icon icon-close-circle','icon icon-close-square','icon icon-cloud-add','icon icon-cloud-change','icon icon-cloud-connection','icon icon-cloud-cross','icon icon-cloud-drizzle','icon icon-cloud-fog','icon icon-cloud-lightning','icon icon-cloud-minus','icon icon-cloud-notif','icon icon-cloud-plus','icon icon-cloud-remove','icon icon-cloud-snow','icon icon-cloud-sunny','icon icon-cloud','icon icon-code-1','icon icon-code-circle','icon icon-code','icon icon-coffee','icon icon-coin-1','icon icon-coin','icon icon-color-swatch','icon icon-colorfilter','icon icon-colors-square','icon icon-command-square','icon icon-command','icon icon-component','icon icon-computing','icon icon-convert-3d-cube','icon icon-convert-card','icon icon-convert','icon icon-convertshape-2','icon icon-convertshape','icon icon-copy-success','icon icon-copy','icon icon-copyright','icon icon-courthouse','icon icon-cpu-charge','icon icon-cpu-setting','icon icon-cpu','icon icon-creative-commons','icon icon-crop','icon icon-crown-1','icon icon-crown','icon icon-cup','icon icon-dai-dai','icon icon-danger','icon icon-dash-dash','icon icon-data-2','icon icon-data','icon icon-decred-dcr','icon icon-dent-dent','icon icon-designtools','icon icon-device-message','icon icon-devices-1','icon icon-devices','icon icon-diagram','icon icon-diamonds','icon icon-direct-down','icon icon-direct-inbox','icon icon-direct-left','icon icon-direct-normal','icon icon-direct-notification','icon icon-direct-right','icon icon-direct-send','icon icon-direct-up','icon icon-direct','icon icon-directbox-default','icon icon-directbox-notif','icon icon-directbox-receive','icon icon-directbox-send','icon icon-discount-circle','icon icon-discount-shape','icon icon-discover-1','icon icon-discover','icon icon-dislike','icon icon-document-1','icon icon-document-cloud','icon icon-document-code-2','icon icon-document-code','icon icon-document-copy','icon icon-document-download','icon icon-document-favorite','icon icon-document-filter','icon icon-document-forward','icon icon-document-like','icon icon-document-normal','icon icon-document-previous','icon icon-document-sketch','icon icon-document-text-1','icon icon-document-text','icon icon-document-upload','icon icon-document','icon icon-dollar-circle','icon icon-dollar-square','icon icon-dribbble','icon icon-driver-2','icon icon-driver-refresh','icon icon-driver','icon icon-driving','icon icon-dropbox','icon icon-edit-2','icon icon-edit','icon icon-educare-ekt','icon icon-electricity','icon icon-element-2','icon icon-element-3','icon icon-element-4','icon icon-element-equal','icon icon-element-plus','icon icon-emercoin-emc','icon icon-emoji-happy','icon icon-emoji-normal','icon icon-emoji-sad','icon icon-empty-wallet-add','icon icon-empty-wallet-change','icon icon-empty-wallet-remove','icon icon-empty-wallet-tick','icon icon-empty-wallet-time','icon icon-empty-wallet','icon icon-enjin-coin-enj','icon icon-eos-eos','icon icon-eraser-1','icon icon-eraser','icon icon-ethereum-classic-etc','icon icon-ethereum-eth','icon icon-export-1','icon icon-export-2','icon icon-export-3','icon icon-export','icon icon-external-drive','icon icon-eye-slash','icon icon-eye','icon icon-facebook','icon icon-fatrows','icon icon-favorite-chart','icon icon-figma-1','icon icon-figma','icon icon-filter-add','icon icon-filter-edit','icon icon-filter-remove','icon icon-filter-search','icon icon-filter-square','icon icon-filter-tick','icon icon-filter','icon icon-finger-cricle','icon icon-finger-scan','icon icon-firstline','icon icon-flag-2','icon icon-flag','icon icon-flash-1','icon icon-flash-circle-1','icon icon-flash-circle','icon icon-flash-slash','icon icon-flash','icon icon-folder-2','icon icon-folder-add','icon icon-folder-cloud','icon icon-folder-connection','icon icon-folder-cross','icon icon-folder-favorite','icon icon-folder-minus','icon icon-folder-open','icon icon-folder','icon icon-forbidden-2','icon icon-forbidden','icon icon-format-circle','icon icon-format-square','icon icon-forward-10-seconds','icon icon-forward-15-seconds','icon icon-forward-5-seconds','icon icon-forward-item','icon icon-forward-square','icon icon-forward','icon icon-frame-1','icon icon-frame-2','icon icon-frame-3','icon icon-frame-4','icon icon-frame','icon icon-framer','icon icon-ftx-token-ftt','icon icon-gallery-add','icon icon-gallery-edit','icon icon-gallery-export','icon icon-gallery-favorite','icon icon-gallery-import','icon icon-gallery-remove','icon icon-gallery-slash','icon icon-gallery-tick','icon icon-gallery','icon icon-game','icon icon-gameboy','icon icon-gas-station','icon icon-gemini-2','icon icon-gemini','icon icon-ghost','icon icon-gift','icon icon-glass-1','icon icon-glass','icon icon-global-edit','icon icon-global-refresh','icon icon-global-search','icon icon-global','icon icon-google-drive','icon icon-google-paly','icon icon-google','icon icon-gps-slash','icon icon-gps','icon icon-grammerly','icon icon-graph','icon icon-grid-1','icon icon-grid-2','icon icon-grid-3','icon icon-grid-4','icon icon-grid-5','icon icon-grid-6','icon icon-grid-7','icon icon-grid-8','icon icon-grid-9','icon icon-grid-edit','icon icon-grid-eraser','icon icon-grid-lock','icon icon-happyemoji','icon icon-harmony-one','icon icon-hashtag-1','icon icon-hashtag-down','icon icon-hashtag-up','icon icon-hashtag','icon icon-headphone','icon icon-headphones','icon icon-health','icon icon-heart-add','icon icon-heart-circle','icon icon-heart-edit','icon icon-heart-remove','icon icon-heart-search','icon icon-heart-slash','icon icon-heart-tick','icon icon-heart','icon icon-hedera-hashgraph-hbar','icon icon-hex-hex','icon icon-hierarchy-2','icon icon-hierarchy-3','icon icon-hierarchy-square-2','icon icon-hierarchy-square-3','icon icon-hierarchy-square','icon icon-hierarchy','icon icon-home-1','icon icon-home-2','icon icon-home-hashtag','icon icon-home-trend-down','icon icon-home-trend-up','icon icon-home-wifi','icon icon-home','icon icon-hospital','icon icon-house-2','icon icon-house','icon icon-html-3','icon icon-html-5','icon icon-huobi-token-ht','icon icon-icon-1','icon icon-icon-2','icon icon-icon-icx','icon icon-icon','icon icon-illustrator','icon icon-image','icon icon-import-1','icon icon-import-2','icon icon-import','icon icon-info-circle','icon icon-information','icon icon-instagram','icon icon-iost-iost','icon icon-java-script','icon icon-js','icon icon-judge','icon icon-kanban','icon icon-key-square','icon icon-key','icon icon-keyboard-open','icon icon-keyboard','icon icon-kyber-network-knc','icon icon-lamp-1','icon icon-lamp-charge','icon icon-lamp-on','icon icon-lamp-slash','icon icon-lamp','icon icon-language-circle','icon icon-language-square','icon icon-layer','icon icon-level','icon icon-lifebuoy','icon icon-like-1','icon icon-like-dislike','icon icon-like-shapes','icon icon-like-tag','icon icon-like','icon icon-Line','icon icon-link-1','icon icon-link-2','icon icon-link-21','icon icon-link-circle','icon icon-link-square','icon icon-link','icon icon-litecoinltc','icon icon-location-add','icon icon-location-cross','icon icon-location-minus','icon icon-location-slash','icon icon-location-tick','icon icon-location','icon icon-lock-1','icon icon-lock-circle','icon icon-lock-slash','icon icon-lock','icon icon-login-1','icon icon-login','icon icon-logout-1','icon icon-logout','icon icon-lovely','icon icon-magic-star','icon icon-magicpen','icon icon-main-component','icon icon-maker-mkr','icon icon-man','icon icon-map-1','icon icon-map','icon icon-mask-1','icon icon-mask-2','icon icon-mask','icon icon-math','icon icon-maximize-1','icon icon-maximize-2','icon icon-maximize-21','icon icon-maximize-3','icon icon-maximize-4','icon icon-maximize-circle','icon icon-maximize','icon icon-medal-star','icon icon-medal','icon icon-menu-1','icon icon-menu-board','icon icon-menu','icon icon-message-2','icon icon-message-add-1','icon icon-message-add','icon icon-message-circle','icon icon-message-edit','icon icon-message-favorite','icon icon-message-minus','icon icon-message-notif','icon icon-message-programming','icon icon-message-question','icon icon-message-remove','icon icon-message-search','icon icon-message-square','icon icon-message-text-1','icon icon-message-text','icon icon-message-tick','icon icon-message-time','icon icon-message','icon icon-messages-1','icon icon-messages-2','icon icon-messages-3','icon icon-messages','icon icon-messenger','icon icon-microphone-2','icon icon-microphone-slash-1','icon icon-microphone-slash','icon icon-microphone','icon icon-microscope','icon icon-milk','icon icon-mini-music-sqaure','icon icon-minus-cirlce','icon icon-minus-square','icon icon-minus','icon icon-mirror','icon icon-mirroring-screen','icon icon-mobile-programming','icon icon-mobile','icon icon-monero-xmr','icon icon-money-2','icon icon-money-3','icon icon-money-4','icon icon-money-add','icon icon-money-change','icon icon-money-forbidden','icon icon-money-recive','icon icon-money-remove','icon icon-money-send','icon icon-money-tick','icon icon-money-time','icon icon-money','icon icon-moneys','icon icon-monitor-mobbile','icon icon-monitor-recorder','icon icon-monitor','icon icon-moon','icon icon-more-2','icon icon-more-circle','icon icon-more-square','icon icon-more','icon icon-mouse-1','icon icon-mouse-circle','icon icon-mouse-square','icon icon-mouse','icon icon-music-circle','icon icon-music-dashboard','icon icon-music-filter','icon icon-music-library-2','icon icon-music-play','icon icon-music-playlist','icon icon-music-square-add','icon icon-music-square-remove','icon icon-music-square-search','icon icon-music-square','icon icon-music','icon icon-musicnote','icon icon-nebulas-nas','icon icon-nem-xem','icon icon-nexo-nexo','icon icon-next','icon icon-note-1','icon icon-note-2','icon icon-note-21','icon icon-note-add','icon icon-note-favorite','icon icon-note-remove','icon icon-note-square','icon icon-note-text','icon icon-note','icon icon-notification-1','icon icon-notification-bing','icon icon-notification-circle','icon icon-notification-favorite','icon icon-notification-status','icon icon-notification','icon icon-ocean-protocol-ocean','icon icon-okb-okb','icon icon-omega-circle','icon icon-omega-square','icon icon-ontology-ont','icon icon-paintbucket','icon icon-paperclip-2','icon icon-paperclip','icon icon-password-check','icon icon-path-2','icon icon-path-square','icon icon-path','icon icon-pause-circle','icon icon-pause','icon icon-paypal','icon icon-pen-add','icon icon-pen-close','icon icon-pen-remove','icon icon-pen-tool-2','icon icon-pen-tool','icon icon-people','icon icon-percentage-circle','icon icon-percentage-square','icon icon-personalcard','icon icon-pet','icon icon-pharagraphspacing','icon icon-photoshop','icon icon-picture-frame','icon icon-play-add','icon icon-play-circle','icon icon-play-cricle','icon icon-play-remove','icon icon-play','icon icon-polkadot-dot','icon icon-polygon-matic','icon icon-polyswarm-nct','icon icon-presention-chart','icon icon-previous','icon icon-printer-slash','icon icon-printer','icon icon-profile-2user','icon icon-profile-add','icon icon-profile-circle','icon icon-profile-delete','icon icon-profile-remove','icon icon-profile-tick','icon icon-programming-arrow','icon icon-programming-arrows','icon icon-python','icon icon-quant-qnt','icon icon-quote-down-circle','icon icon-quote-down-square','icon icon-quote-down','icon icon-quote-up-circle','icon icon-quote-up-square','icon icon-quote-up','icon icon-radar-1','icon icon-radar-2','icon icon-radar','icon icon-radio','icon icon-ram-2','icon icon-ram','icon icon-ranking-1','icon icon-ranking','icon icon-receipt-1','icon icon-receipt-2-1','icon icon-receipt-2','icon icon-receipt-add','icon icon-receipt-discount','icon icon-receipt-disscount','icon icon-receipt-edit','icon icon-receipt-item','icon icon-receipt-minus','icon icon-receipt-search','icon icon-receipt-square','icon icon-receipt-text','icon icon-receipt','icon icon-receive-square-2','icon icon-receive-square','icon icon-received','icon icon-record-circle','icon icon-record','icon icon-recovery-convert','icon icon-redo','icon icon-refresh-2','icon icon-refresh-circle','icon icon-refresh-left-square','icon icon-refresh-right-square','icon icon-refresh-square-2','icon icon-refresh','icon icon-repeat-circle','icon icon-repeat','icon icon-repeate-music','icon icon-repeate-one','icon icon-reserve','icon icon-rotate-left-1','icon icon-rotate-left','icon icon-rotate-right-1','icon icon-rotate-right','icon icon-route-square','icon icon-routing-2','icon icon-routing','icon icon-row-horizontal','icon icon-row-vertical','icon icon-ruler','icon icon-rulerandpen','icon icon-safe-home','icon icon-sagittarius','icon icon-save-2','icon icon-save-add','icon icon-save-minus','icon icon-save-remove','icon icon-scan-barcode','icon icon-scan','icon icon-scanner','icon icon-scanning','icon icon-scissor-1','icon icon-scissor','icon icon-screenmirroring','icon icon-scroll','icon icon-search-favorite-1','icon icon-search-favorite','icon icon-search-normal-1','icon icon-search-normal','icon icon-search-status-1','icon icon-search-status','icon icon-search-zoom-in-1','icon icon-search-zoom-in','icon icon-search-zoom-out-1','icon icon-search-zoom-out','icon icon-security-card','icon icon-security-safe','icon icon-security-time','icon icon-security-user','icon icon-security','icon icon-send-1','icon icon-send-2','icon icon-send-sqaure-2','icon icon-send-square','icon icon-send','icon icon-setting-2','icon icon-setting-3','icon icon-setting-4','icon icon-setting-5','icon icon-setting','icon icon-settings','icon icon-shapes-1','icon icon-shapes','icon icon-share','icon icon-shield-cross','icon icon-shield-search','icon icon-shield-slash','icon icon-shield-tick','icon icon-shield','icon icon-ship','icon icon-shop-add','icon icon-shop-remove','icon icon-shop','icon icon-shopping-bag','icon icon-shopping-cart','icon icon-shuffle','icon icon-siacoin-sc','icon icon-sidebar-bottom','icon icon-sidebar-left','icon icon-sidebar-right','icon icon-sidebar-top','icon icon-signpost','icon icon-simcard-1','icon icon-simcard-2','icon icon-simcard','icon icon-size','icon icon-slack','icon icon-slash','icon icon-slider-horizontal-1','icon icon-slider-horizontal','icon icon-slider-vertical-1','icon icon-slider-vertical','icon icon-slider','icon icon-smallcaps','icon icon-smart-car','icon icon-smart-home','icon icon-smileys','icon icon-sms-edit','icon icon-sms-notification','icon icon-sms-search','icon icon-sms-star','icon icon-sms-tracking','icon icon-sms','icon icon-snapchat','icon icon-solana-sol','icon icon-sort','icon icon-sound','icon icon-speaker','icon icon-speedometer','icon icon-spotify','icon icon-stacks-stx','icon icon-star-1','icon icon-star-slash','icon icon-star','icon icon-status-up','icon icon-status','icon icon-stellar-xlm','icon icon-sticker','icon icon-stickynote','icon icon-stop-circle','icon icon-stop','icon icon-story','icon icon-strongbox-2','icon icon-strongbox','icon icon-subtitle','icon icon-sun-1','icon icon-sun-fog','icon icon-sun','icon icon-tag-2','icon icon-tag-cross','icon icon-tag-right','icon icon-tag-user','icon icon-tag','icon icon-task-square','icon icon-task','icon icon-teacher','icon icon-tenx-pay','icon icon-tether-usdt','icon icon-text-block','icon icon-text-bold','icon icon-text-italic','icon icon-text-underline','icon icon-text','icon icon-textalign-center','icon icon-textalign-justifycenter','icon icon-textalign-justifyleft','icon icon-textalign-justifyright','icon icon-textalign-left','icon icon-textalign-right','icon icon-the-graph-grt','icon icon-theta-theta','icon icon-thorchain-rune','icon icon-tick-circle','icon icon-tick-square','icon icon-ticket-2','icon icon-ticket-discount','icon icon-ticket-expired','icon icon-ticket-star','icon icon-ticket','icon icon-timer-1','icon icon-timer-pause','icon icon-timer-start','icon icon-timer','icon icon-toggle-off-circle','icon icon-toggle-off','icon icon-toggle-on-circle','icon icon-toggle-on','icon icon-trade','icon icon-transaction-minus','icon icon-translate','icon icon-trash','icon icon-tree','icon icon-trello','icon icon-trend-down','icon icon-trend-up','icon icon-triangle-1','icon icon-triangle','icon icon-trontron-trx','icon icon-truck-fast','icon icon-truck-remove','icon icon-truck-tick','icon icon-truck-time','icon icon-truck','icon icon-trush-square','icon icon-twitch','icon icon-ui8','icon icon-undo','icon icon-unlimited','icon icon-unlock','icon icon-usd-coin-usdc','icon icon-user-add','icon icon-user-cirlce-add','icon icon-user-edit','icon icon-user-minus','icon icon-user-octagon','icon icon-user-remove','icon icon-user-search','icon icon-user-square','icon icon-user-tag','icon icon-user-tick','icon icon-user','icon icon-velas-vlx','icon icon-verify','icon icon-vibe-vibe','icon icon-video-add','icon icon-video-circle','icon icon-video-horizontal','icon icon-video-octagon','icon icon-video-play','icon icon-video-remove','icon icon-video-slash','icon icon-video-square','icon icon-video-tick','icon icon-video-time','icon icon-video-vertical','icon icon-video','icon icon-voice-cricle','icon icon-voice-square','icon icon-volume-cross','icon icon-volume-high','icon icon-volume-low-1','icon icon-volume-low','icon icon-volume-mute','icon icon-volume-slash','icon icon-volume-up','icon icon-vuesax','icon icon-wallet-1','icon icon-wallet-2','icon icon-wallet-3','icon icon-wallet-add-1','icon icon-wallet-add','icon icon-wallet-check','icon icon-wallet-minus','icon icon-wallet-money','icon icon-wallet-remove','icon icon-wallet-search','icon icon-wallet','icon icon-wanchain-wan-1','icon icon-wanchain-wan','icon icon-warning-2','icon icon-watch-status','icon icon-watch','icon icon-weight-1','icon icon-weight','icon icon-whatsapp','icon icon-wifi-square','icon icon-wifi','icon icon-wind-2','icon icon-wind','icon icon-windows','icon icon-wing-wing','icon icon-woman','icon icon-xd','icon icon-xiaomi','icon icon-xrp-xrp','icon icon-youtube','icon icon-zel-zel','icon icon-zoom' )
+ ) );
+ }
+}
From 071d022ccfc4235cfc8c350a8889d99bd4b6eba2 Mon Sep 17 00:00:00 2001
From: feng
Date: Sat, 21 Dec 2024 12:33:36 +0800
Subject: [PATCH 104/120] Update readme.md
---
readme.md | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/readme.md b/readme.md
index 0cd9af6..dca2c28 100644
--- a/readme.md
+++ b/readme.md
@@ -33,12 +33,5 @@
## 赞助商
-
-
-
-
-
-
-
-
-
+
+
From 33e05459654bb2ae731d1b2f8a086f24ec503255 Mon Sep 17 00:00:00 2001
From: feng
Date: Sat, 21 Dec 2024 12:34:21 +0800
Subject: [PATCH 105/120] Update readme.md
---
readme.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/readme.md b/readme.md
index dca2c28..871eb5f 100644
--- a/readme.md
+++ b/readme.md
@@ -33,5 +33,5 @@
## 赞助商
-
+
From 9ea04f6ac47c7692871035abd8929d22dcb01cb7 Mon Sep 17 00:00:00 2001
From: feng
Date: Sat, 21 Dec 2024 12:50:20 +0800
Subject: [PATCH 106/120] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20iconsax=20?=
=?UTF-8?q?=E5=9B=BE=E6=A0=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
framework/classes/setup.class.php | 4 ++++
1 file changed, 4 insertions(+)
mode change 100644 => 100755 framework/classes/setup.class.php
diff --git a/framework/classes/setup.class.php b/framework/classes/setup.class.php
old mode 100644
new mode 100755
index 4742edb..dbd55d2
--- a/framework/classes/setup.class.php
+++ b/framework/classes/setup.class.php
@@ -577,6 +577,10 @@ if ( ! class_exists( 'WP_CHINA_YES_Setup' ) ) {
wp_enqueue_style( 'wp_china_yes-fa5-v4-shims', 'https://jsd.admincdn.com/npm/@fortawesome/fontawesome-free@5.15.4/css/v4-shims.min.css', array(), '5.15.5', 'all' );
}
+ // Iconsax font icon loader
+ wp_enqueue_style( 'wp_china_yes-iconsax', 'https://jsd.admincdn.com/npm/iconsax-font-icon@1.1.0/dist/icons.min.css', array(), '1.1.0', 'all' );
+
+
// Check for developer mode
$min = ( self::$premium && SCRIPT_DEBUG ) ? '' : '.min';
From fdce4da05e54842dcb90247587adc26ea202961d Mon Sep 17 00:00:00 2001
From: feng
Date: Sat, 21 Dec 2024 13:07:24 +0800
Subject: [PATCH 107/120] Update readme.md
---
readme.md | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/readme.md b/readme.md
index 871eb5f..b7893bb 100644
--- a/readme.md
+++ b/readme.md
@@ -2,9 +2,12 @@
文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,生生不息。
+
+
+
## 简介
-文派叶子 🍃(WP-China-Yes)是一款不可多得的 WordPress 系统底层优化和生态基础设施软件。项目起源于 2019 年,专为解决困扰了中国互联网数十年的特色问题而存在。此为文派开源(WenPai.org)的一部分。
+文派叶子 🍃(WPCY)是一款不可多得的 WordPress 系统底层优化和生态基础设施软件。项目起源于 2019 年,专为解决困扰了中国互联网数十年的特色问题而存在。此为文派开源(WenPai.org)的一部分。
## 功能
@@ -16,6 +19,14 @@
- [x] 优化 谷歌字体 加载速度
- [x] 优化 谷歌前端库 加载速度
- [x] 优化 CDNJS 加载速度
+- [x] 优化 Jsdelivr 加载速度
+- [x] 集成 WPMirror 镜像更新源
+- [x] 集成 Windfonts 中文网页 Webfonts [文风字体](https://windfonts.com)
+- [x] 集成 adminCDN 前端公共库[文风字体](https://windfonts.com)
+- [x] 启用 飞行模式 可屏蔽外部 API 请求
+- [x] 启用 节点监控 可自动切换加速节点
+- [x] 启用 品牌白标 可自定义 OEM 插件品牌
+
## 安装
@@ -33,5 +44,4 @@
## 赞助商
-
-
+
From 7e08f3392336d5cd01c26a3af15627bc040d6657 Mon Sep 17 00:00:00 2001
From: feng
Date: Sat, 21 Dec 2024 13:10:25 +0800
Subject: [PATCH 108/120] Update readme.md
---
readme.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/readme.md b/readme.md
index b7893bb..1fe546b 100644
--- a/readme.md
+++ b/readme.md
@@ -1,12 +1,13 @@
# WP-China-Yes
+开源 WordPress 中国网站加速器。
+
文派叶子 🍃(WP-China-Yes)是中国 WordPress 生态基础设施软件,犹如落叶新芽,生生不息。
## 简介
-
文派叶子 🍃(WPCY)是一款不可多得的 WordPress 系统底层优化和生态基础设施软件。项目起源于 2019 年,专为解决困扰了中国互联网数十年的特色问题而存在。此为文派开源(WenPai.org)的一部分。
## 功能
@@ -22,7 +23,7 @@
- [x] 优化 Jsdelivr 加载速度
- [x] 集成 WPMirror 镜像更新源
- [x] 集成 Windfonts 中文网页 Webfonts [文风字体](https://windfonts.com)
-- [x] 集成 adminCDN 前端公共库[文风字体](https://windfonts.com)
+- [x] 集成 adminCDN 前端公共库[萌芽加速](https://admincdn.com)
- [x] 启用 飞行模式 可屏蔽外部 API 请求
- [x] 启用 节点监控 可自动切换加速节点
- [x] 启用 品牌白标 可自定义 OEM 插件品牌
From 8d3a71414d1fc4a8c5983a8fa29ab66539a4a5c2 Mon Sep 17 00:00:00 2001
From: feng
Date: Sat, 21 Dec 2024 13:11:29 +0800
Subject: [PATCH 109/120] Update readme.md
---
readme.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/readme.md b/readme.md
index 1fe546b..fd4c790 100644
--- a/readme.md
+++ b/readme.md
@@ -16,14 +16,14 @@
- [x] 优化 WordPress 后台加载速度
- [x] 优化 WordPress 前台加载速度
- [x] 移除后台无用请求与组件
-- [x] 替换 Gravatar 头像为[初认头像](https://cravatar.com/)
+- [x] 替换 Gravatar 头像为 Cravatar [初认头像](https://cravatar.com/)
- [x] 优化 谷歌字体 加载速度
- [x] 优化 谷歌前端库 加载速度
- [x] 优化 CDNJS 加载速度
- [x] 优化 Jsdelivr 加载速度
- [x] 集成 WPMirror 镜像更新源
- [x] 集成 Windfonts 中文网页 Webfonts [文风字体](https://windfonts.com)
-- [x] 集成 adminCDN 前端公共库[萌芽加速](https://admincdn.com)
+- [x] 集成 adminCDN 前端公共库 [萌芽加速](https://admincdn.com)
- [x] 启用 飞行模式 可屏蔽外部 API 请求
- [x] 启用 节点监控 可自动切换加速节点
- [x] 启用 品牌白标 可自定义 OEM 插件品牌
From 5370b07c366d813543337907c58c1673495ac286 Mon Sep 17 00:00:00 2001
From: feng
Date: Thu, 2 Jan 2025 10:36:40 +0800
Subject: [PATCH 110/120] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E8=87=B3=203.8=20?=
=?UTF-8?q?=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Plugin.php | 2 +-
Service/Base.php | 6 +-
Service/Memory.php | 254 ++++
Service/Monitor.php | 344 +++--
Service/Setting.php | 138 +-
Service/Super.php | 59 +-
Service/Update.php | 0
assets/css/setting.css | 3 +
assets/images/qr-banner.jpg | Bin 0 -> 48213 bytes
assets/images/website-banner.jpg | Bin 29467 -> 48110 bytes
framework/assets/css/style-rtl.min.css | 0
framework/assets/css/style.min.css | 0
framework/assets/images/checkerboard.png | Bin
framework/assets/images/wp-logo.svg | 0
framework/assets/images/wp-plugin-logo.svg | 0
framework/assets/js/main.min.js | 0
framework/assets/js/plugins.min.js | 0
framework/classes/abstract.class.php | 0
framework/classes/admin-options.class.php | 0
framework/classes/fields.class.php | 0
framework/fields/accordion/accordion.php | 0
framework/fields/background/background.php | 0
framework/fields/backup/backup.php | 0
framework/fields/border/border.php | 0
framework/fields/button_set/button_set.php | 0
framework/fields/callback/callback.php | 0
framework/fields/checkbox/checkbox.php | 0
framework/fields/code_editor/code_editor.php | 0
framework/fields/color/color.php | 0
framework/fields/color_group/color_group.php | 0
framework/fields/content/content.php | 0
framework/fields/date/date.php | 0
framework/fields/datetime/datetime.php | 0
framework/fields/dimensions/dimensions.php | 0
framework/fields/fieldset/fieldset.php | 0
framework/fields/gallery/gallery.php | 0
framework/fields/group/group.php | 0
framework/fields/heading/heading.php | 0
framework/fields/icon/fa4-icons.php | 0
framework/fields/icon/fa5-icons.php | 0
framework/fields/icon/icon.php | 0
.../fields/image_select/image_select.php | 0
framework/fields/index.php | 0
framework/fields/link/link.php | 0
framework/fields/link_color/link_color.php | 0
framework/fields/map/map.php | 0
framework/fields/media/media.php | 0
framework/fields/notice/notice.php | 0
framework/fields/number/number.php | 0
framework/fields/palette/palette.php | 0
framework/fields/radio/radio.php | 0
framework/fields/repeater/repeater.php | 0
framework/fields/select/select.php | 0
framework/fields/slider/slider.php | 0
framework/fields/sortable/sortable.php | 0
framework/fields/sorter/sorter.php | 0
framework/fields/spacing/spacing.php | 0
framework/fields/spinner/spinner.php | 0
framework/fields/subheading/subheading.php | 0
framework/fields/submessage/submessage.php | 0
framework/fields/switcher/switcher.php | 0
framework/fields/tabbed/tabbed.php | 0
framework/fields/text/text.php | 0
framework/fields/textarea/textarea.php | 0
framework/fields/typography/google-fonts.php | 0
framework/fields/typography/typography.php | 0
framework/fields/upload/upload.php | 0
framework/fields/wp_editor/wp_editor.php | 0
framework/functions/actions.php | 0
framework/functions/customize.php | 0
framework/functions/helpers.php | 0
framework/functions/sanitize.php | 0
framework/functions/validate.php | 0
framework/functions/walker.php | 0
framework/index.php | 0
framework/languages/zh_CN.mo | Bin
framework/languages/zh_CN.po | 1344 ++++++++---------
helpers.php | 1 +
78 files changed, 1261 insertions(+), 890 deletions(-)
mode change 100644 => 100755 Plugin.php
mode change 100644 => 100755 Service/Base.php
create mode 100755 Service/Memory.php
mode change 100644 => 100755 Service/Monitor.php
mode change 100644 => 100755 Service/Super.php
mode change 100644 => 100755 Service/Update.php
create mode 100755 assets/images/qr-banner.jpg
mode change 100644 => 100755 framework/assets/css/style-rtl.min.css
mode change 100644 => 100755 framework/assets/css/style.min.css
mode change 100644 => 100755 framework/assets/images/checkerboard.png
mode change 100644 => 100755 framework/assets/images/wp-logo.svg
mode change 100644 => 100755 framework/assets/images/wp-plugin-logo.svg
mode change 100644 => 100755 framework/assets/js/main.min.js
mode change 100644 => 100755 framework/assets/js/plugins.min.js
mode change 100644 => 100755 framework/classes/abstract.class.php
mode change 100644 => 100755 framework/classes/admin-options.class.php
mode change 100644 => 100755 framework/classes/fields.class.php
mode change 100644 => 100755 framework/fields/accordion/accordion.php
mode change 100644 => 100755 framework/fields/background/background.php
mode change 100644 => 100755 framework/fields/backup/backup.php
mode change 100644 => 100755 framework/fields/border/border.php
mode change 100644 => 100755 framework/fields/button_set/button_set.php
mode change 100644 => 100755 framework/fields/callback/callback.php
mode change 100644 => 100755 framework/fields/checkbox/checkbox.php
mode change 100644 => 100755 framework/fields/code_editor/code_editor.php
mode change 100644 => 100755 framework/fields/color/color.php
mode change 100644 => 100755 framework/fields/color_group/color_group.php
mode change 100644 => 100755 framework/fields/content/content.php
mode change 100644 => 100755 framework/fields/date/date.php
mode change 100644 => 100755 framework/fields/datetime/datetime.php
mode change 100644 => 100755 framework/fields/dimensions/dimensions.php
mode change 100644 => 100755 framework/fields/fieldset/fieldset.php
mode change 100644 => 100755 framework/fields/gallery/gallery.php
mode change 100644 => 100755 framework/fields/group/group.php
mode change 100644 => 100755 framework/fields/heading/heading.php
mode change 100644 => 100755 framework/fields/icon/fa4-icons.php
mode change 100644 => 100755 framework/fields/icon/fa5-icons.php
mode change 100644 => 100755 framework/fields/icon/icon.php
mode change 100644 => 100755 framework/fields/image_select/image_select.php
mode change 100644 => 100755 framework/fields/index.php
mode change 100644 => 100755 framework/fields/link/link.php
mode change 100644 => 100755 framework/fields/link_color/link_color.php
mode change 100644 => 100755 framework/fields/map/map.php
mode change 100644 => 100755 framework/fields/media/media.php
mode change 100644 => 100755 framework/fields/notice/notice.php
mode change 100644 => 100755 framework/fields/number/number.php
mode change 100644 => 100755 framework/fields/palette/palette.php
mode change 100644 => 100755 framework/fields/radio/radio.php
mode change 100644 => 100755 framework/fields/repeater/repeater.php
mode change 100644 => 100755 framework/fields/select/select.php
mode change 100644 => 100755 framework/fields/slider/slider.php
mode change 100644 => 100755 framework/fields/sortable/sortable.php
mode change 100644 => 100755 framework/fields/sorter/sorter.php
mode change 100644 => 100755 framework/fields/spacing/spacing.php
mode change 100644 => 100755 framework/fields/spinner/spinner.php
mode change 100644 => 100755 framework/fields/subheading/subheading.php
mode change 100644 => 100755 framework/fields/submessage/submessage.php
mode change 100644 => 100755 framework/fields/switcher/switcher.php
mode change 100644 => 100755 framework/fields/tabbed/tabbed.php
mode change 100644 => 100755 framework/fields/text/text.php
mode change 100644 => 100755 framework/fields/textarea/textarea.php
mode change 100644 => 100755 framework/fields/typography/google-fonts.php
mode change 100644 => 100755 framework/fields/typography/typography.php
mode change 100644 => 100755 framework/fields/upload/upload.php
mode change 100644 => 100755 framework/fields/wp_editor/wp_editor.php
mode change 100644 => 100755 framework/functions/actions.php
mode change 100644 => 100755 framework/functions/customize.php
mode change 100644 => 100755 framework/functions/helpers.php
mode change 100644 => 100755 framework/functions/sanitize.php
mode change 100644 => 100755 framework/functions/validate.php
mode change 100644 => 100755 framework/functions/walker.php
mode change 100644 => 100755 framework/index.php
mode change 100644 => 100755 framework/languages/zh_CN.mo
mode change 100644 => 100755 framework/languages/zh_CN.po
mode change 100644 => 100755 helpers.php
diff --git a/Plugin.php b/Plugin.php
old mode 100644
new mode 100755
index 4723162..c7801a3
--- a/Plugin.php
+++ b/Plugin.php
@@ -45,7 +45,7 @@ class Plugin {
*/
add_filter( sprintf( '%splugin_action_links', is_multisite() ? 'network_admin_' : '' ), function ( $links, $plugin = '' ) {
$links[] = '参与翻译';
- $links[] = '去广告';
+ $links[] = '去广告';
return $links;
}, 10, 2 );
diff --git a/Service/Base.php b/Service/Base.php
old mode 100644
new mode 100755
index 5938a15..4da50cc
--- a/Service/Base.php
+++ b/Service/Base.php
@@ -16,11 +16,13 @@ class Base {
new Super();
// 监控服务
new Monitor();
+ // 内存服务
+ new Memory();
// 更新服务
new Update();
if ( is_admin() ) {
- // 设置服务
- new Setting();
+ // 设置服务
+ new Setting();
}
}
}
diff --git a/Service/Memory.php b/Service/Memory.php
new file mode 100755
index 0000000..23a1115
--- /dev/null
+++ b/Service/Memory.php
@@ -0,0 +1,254 @@
+' . __('WP_DEBUG', 'wp-china-yes') . '';
+ }
+ return '' . __('WP_DEBUG', 'wp-china-yes') . '';
+ }
+
+ /**
+ * 获取 CPU 使用率
+ */
+ private function get_cpu_usage() {
+ if (function_exists('sys_getloadavg') && is_callable('sys_getloadavg')) {
+ $load = sys_getloadavg();
+ return round($load[0] * 100 / 4, 2); // 假设是4核CPU
+ }
+ return false;
+ }
+
+ /**
+ * 获取 MySQL 版本
+ */
+ private function get_mysql_version() {
+ global $wpdb;
+ return $wpdb->get_var("SELECT VERSION()");
+ }
+
+ /**
+ * 检查 PHP 内存限制
+ */
+ public function check_memory_limit() {
+ $this->memory['limit'] = (int) ini_get('memory_limit');
+ }
+
+ /**
+ * 检查内存使用情况
+ */
+ private function check_memory_usage() {
+ $this->memory['usage'] = function_exists('memory_get_peak_usage')
+ ? round(memory_get_peak_usage(true) / 1024 / 1024, 2)
+ : 0;
+
+ if (!empty($this->memory['usage']) && !empty($this->memory['limit'])) {
+ $this->memory['percent'] = round($this->memory['usage'] / $this->memory['limit'] * 100, 0);
+ $this->memory['color'] = $this->get_memory_color($this->memory['percent']);
+ }
+ }
+
+ /**
+ * 获取内存使用率的颜色
+ */
+ private function get_memory_color($percent) {
+ if ($percent > 90) {
+ return 'font-weight:bold;color:red';
+ } elseif ($percent > 75) {
+ return 'font-weight:bold;color:#E66F00';
+ }
+ return 'font-weight:normal;';
+ }
+
+ /**
+ * 格式化 WordPress 内存限制
+ */
+ private function format_wp_limit($size) {
+ $unit = strtoupper(substr($size, -1));
+ $value = (int) substr($size, 0, -1);
+
+ switch ($unit) {
+ case 'P': $value *= 1024;
+ case 'T': $value *= 1024;
+ case 'G': $value *= 1024;
+ case 'M': $value *= 1024;
+ case 'K': $value *= 1024;
+ }
+ return $value;
+ }
+
+ /**
+ * 获取 WordPress 内存限制
+ */
+ private function check_wp_limit() {
+ $memory = $this->format_wp_limit(WP_MEMORY_LIMIT);
+ return $memory ? size_format($memory) : __('N/A', 'wp-china-yes');
+ }
+
+ /**
+ * 添加信息到管理界面页脚
+ */
+public function add_footer($content) {
+ $settings = get_settings();
+ // 确保 memory_display 是数组,如果不是则使用空数组
+ $display_options = is_array($settings['memory_display'] ?? []) ? $settings['memory_display'] : [];
+
+ // 如果 memory 设置未启用,直接返回原始内容
+ if (empty($settings['memory'])) {
+ return $content;
+ }
+
+ $this->check_memory_usage();
+ $this->server_ip_address = $_SERVER['SERVER_ADDR'] ?? ($_SERVER['LOCAL_ADDR'] ?? '');
+ $this->os_info = $this->get_os_info();
+
+ $footer_parts = [];
+
+ // 内存使用量
+ if (in_array('memory_usage', $display_options)) {
+ $footer_parts[] = sprintf('%s: %s %s %s MB (%s%%)',
+ __('Memory', 'wp-china-yes'),
+ $this->memory['usage'],
+ __('of', 'wp-china-yes'),
+ $this->memory['limit'],
+ $this->memory['color'],
+ $this->memory['percent']
+ );
+ }
+
+ // WP内存限制
+ if (in_array('wp_limit', $display_options)) {
+ $footer_parts[] = sprintf('%s: %s',
+ __('WP LIMIT', 'wp-china-yes'),
+ $this->check_wp_limit()
+ );
+ }
+
+ // 服务器IP和主机名
+ if (in_array('server_ip', $display_options)) {
+ $hostname_part = in_array('hostname', $display_options) ? " (" . gethostname() . ")" : "";
+ $footer_parts[] = sprintf('IP: %s%s',
+ $this->server_ip_address,
+ $hostname_part
+ );
+ }
+
+ // 操作系统信息
+ if (in_array('os_info', $display_options)) {
+ $footer_parts[] = sprintf('OS: %s', $this->os_info);
+ }
+
+ // PHP信息
+ if (in_array('php_info', $display_options)) {
+ $footer_parts[] = sprintf('PHP: %s @%sBitOS',
+ PHP_VERSION,
+ PHP_INT_SIZE * 8
+ );
+ }
+
+ // Debug状态
+ if (in_array('debug_status', $display_options)) {
+ $footer_parts[] = $this->get_debug_status();
+ }
+
+ // CPU使用率
+ if (in_array('cpu_usage', $display_options)) {
+ $cpu_usage = $this->get_cpu_usage();
+ if ($cpu_usage !== false) {
+ $footer_parts[] = sprintf('CPU: %s%%', $cpu_usage);
+ }
+ }
+
+ // MySQL版本
+ if (in_array('mysql_version', $display_options)) {
+ $footer_parts[] = sprintf('MySQL: %s', $this->get_mysql_version());
+ }
+
+ if (!empty($footer_parts)) {
+ $content .= ' | WPCY - ' . implode(' | ', $footer_parts);
+ }
+
+ return $content;
+}
+
+
+ /**
+ * 检查 PHP 版本
+ */
+ public function check_php_version() {
+ if (version_compare(PHP_VERSION, '7.0', '<')) {
+ deactivate_plugins(plugin_basename(CHINA_YES_PLUGIN_FILE));
+ wp_die(
+ sprintf(
+ '%s
%s
',
+ __('插件无法激活:PHP 版本过低', 'wp-china-yes'),
+ __('请升级 PHP 至 7.0 或更高版本。', 'wp-china-yes')
+ ),
+ __('PHP 版本错误', 'wp-china-yes'),
+ ['back_link' => true]
+ );
+ }
+ }
+}
diff --git a/Service/Monitor.php b/Service/Monitor.php
old mode 100644
new mode 100755
index b2be08e..c6d3b44
--- a/Service/Monitor.php
+++ b/Service/Monitor.php
@@ -1,173 +1,171 @@
-settings = get_settings();
- wp_clear_scheduled_hook( 'wp_china_yes_maybe_check_store' ); // TODO 下个版本移除
- wp_clear_scheduled_hook( 'wp_china_yes_maybe_check_cravatar' ); // TODO 下个版本移除
- wp_clear_scheduled_hook( 'wp_china_yes_maybe_check_admincdn' ); // TODO 下个版本移除
- if ( $this->settings['monitor'] ) {
- // 站点网络下只在主站运行
- if ( is_main_site() ) {
- add_action( 'init', [ $this, 'init' ] );
- add_action( 'wp_china_yes_monitor', [
- $this,
- 'run_monitor'
- ] );
- }
- } else {
- if ( wp_get_scheduled_event( 'wp_china_yes_monitor' ) ) {
- wp_clear_scheduled_hook( 'wp_china_yes_monitor' );
- }
- }
- }
-
- /**
- * 初始化
- */
- public function init() {
- if ( ! wp_next_scheduled( 'wp_china_yes_monitor' ) ) {
- wp_schedule_event( time(), 'hourly', 'wp_china_yes_monitor' );
- }
- }
-
- /**
- * 运行监控
- */
- public function run_monitor() {
- if ( $this->settings['store'] != 'off' ) {
- $this->maybe_check_store();
- }
- if ( $this->settings['cravatar'] != 'off' ) {
- $this->maybe_check_cravatar();
- }
- if ( ! empty( $this->settings['admincdn'] ) ) {
- $this->maybe_check_admincdn();
- }
- }
-
- /**
- * 检查应用市场可用性
- */
- public function maybe_check_store() {
- $test_url = 'https://api.wenpai.net/china-yes/version-check';
- if ( $this->settings['store'] == 'proxy' ) {
- $test_url = 'https://api.wpmirror.com/core/version-check/1.7/';
- }
- $response = wp_remote_get( $test_url );
- if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- if ( $this->settings['store'] == 'wenpai' ) {
- $this->settings['store'] = 'proxy';
- } elseif ( $this->settings['store'] == 'proxy' ) {
- $this->settings['store'] = 'off';
- }
- $this->update_settings();
- }
- }
-
- /**
- * 检查初认头像可用性
- */
- public function maybe_check_cravatar() {
- $test_url = 'https://cn.cravatar.com/avatar/';
- switch ( $this->settings['cravatar'] ) {
- case 'global':
- $test_url = 'https://en.cravatar.com/avatar/';
- break;
- case 'weavatar':
- $test_url = 'https://weavatar.com/avatar/';
- break;
- }
- $response = wp_remote_get( $test_url );
- if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- if ( $this->settings['cravatar'] == 'cn' ) {
- $this->settings['cravatar'] = 'global';
- } elseif ( $this->settings['cravatar'] == 'global' ) {
- $this->settings['cravatar'] = 'weavatar';
- } elseif ( $this->settings['cravatar'] == 'weavatar' ) {
- $this->settings['cravatar'] = 'cn';
- }
- $this->update_settings();
- }
- }
-
- /**
- * 检查萌芽加速可用性
- */
- public function maybe_check_admincdn() {
- // 后台加速
- if ( in_array( 'admin', $this->settings['admincdn'] ) ) {
- $response = wp_remote_get( 'https://wpstatic.admincdn.com/6.7/wp-includes/js/wp-sanitize.min.js' );
- if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'admin' ] ) );
- $this->update_settings();
- }
- }
- // 前台加速
- if ( in_array( 'frontend', $this->settings['admincdn'] ) ) {
- $url = network_site_url( '/wp-includes/js/wp-sanitize.min.js' );
- $response = wp_remote_get( 'https://public.admincdn.com/' . $url );
- if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'frontend' ] ) );
- $this->update_settings();
- }
- }
- // Google 字体
- if ( in_array( 'googlefonts', $this->settings['admincdn'] ) ) {
- $response = wp_remote_get( 'https://googlefonts.admincdn.com/css?family=Roboto:400,700' );
- if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'googlefonts' ] ) );
- $this->update_settings();
- }
- }
- // Google 前端公共库
- if ( in_array( 'googleajax', $this->settings['admincdn'] ) ) {
- $response = wp_remote_get( 'https://googleajax.admincdn.com/ajax/libs/jquery/3.7.1/jquery.slim.min.js' );
- if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'googleajax' ] ) );
- $this->update_settings();
- }
- }
- // CDNJS 前端公共库
- if ( in_array( 'cdnjs', $this->settings['admincdn'] ) ) {
- $response = wp_remote_get( 'https://cdnjs.admincdn.com/jquery/3.7.1/jquery.slim.min.js' );
- if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'cdnjs' ] ) );
- $this->update_settings();
- }
- }
- // jsDelivr 公共库
- if ( in_array( 'jsdelivr', $this->settings['admincdn'] ) ) {
- $response = wp_remote_get( 'https://jsd.admincdn.com/npm/jquery@3.7.1/dist/jquery.slim.min.js' );
- if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
- $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'jsdelivr' ] ) );
- $this->update_settings();
- }
- }
- }
-
- /**
- * 更新设置
- */
- private function update_settings() {
- if ( is_multisite() ) {
- update_site_option( 'wp_china_yes', $this->settings );
- } else {
- update_option( 'wp_china_yes', $this->settings, true );
- }
- }
-}
+settings = get_settings();
+ wp_clear_scheduled_hook( 'wp_china_yes_maybe_check_store' ); // TODO 下个版本移除
+ wp_clear_scheduled_hook( 'wp_china_yes_maybe_check_cravatar' ); // TODO 下个版本移除
+ wp_clear_scheduled_hook( 'wp_china_yes_maybe_check_admincdn' ); // TODO 下个版本移除
+ if ( $this->settings['monitor'] ) {
+ // 站点网络下只在主站运行
+ if ( is_main_site() ) {
+ add_action( 'init', [ $this, 'init' ] );
+ add_action( 'wp_china_yes_monitor', [
+ $this,
+ 'run_monitor'
+ ] );
+ }
+ } else {
+ wp_clear_scheduled_hook( 'wp_china_yes_monitor' );
+ }
+ }
+
+ /**
+ * 初始化
+ */
+ public function init() {
+ if ( ! wp_next_scheduled( 'wp_china_yes_monitor' ) ) {
+ wp_schedule_event( time(), 'hourly', 'wp_china_yes_monitor' );
+ }
+ }
+
+ /**
+ * 运行监控
+ */
+ public function run_monitor() {
+ if ( $this->settings['store'] != 'off' ) {
+ $this->maybe_check_store();
+ }
+ if ( $this->settings['cravatar'] != 'off' ) {
+ $this->maybe_check_cravatar();
+ }
+ if ( ! empty( $this->settings['admincdn'] ) ) {
+ $this->maybe_check_admincdn();
+ }
+ }
+
+ /**
+ * 检查应用市场可用性
+ */
+ public function maybe_check_store() {
+ $test_url = 'https://api.wenpai.net/china-yes/version-check';
+ if ( $this->settings['store'] == 'proxy' ) {
+ $test_url = 'https://api.wpmirror.com/core/version-check/1.7/';
+ }
+ $response = wp_remote_get( $test_url );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ if ( $this->settings['store'] == 'wenpai' ) {
+ $this->settings['store'] = 'proxy';
+ } elseif ( $this->settings['store'] == 'proxy' ) {
+ $this->settings['store'] = 'off';
+ }
+ $this->update_settings();
+ }
+ }
+
+ /**
+ * 检查初认头像可用性
+ */
+ public function maybe_check_cravatar() {
+ $test_url = 'https://cn.cravatar.com/avatar/';
+ switch ( $this->settings['cravatar'] ) {
+ case 'global':
+ $test_url = 'https://en.cravatar.com/avatar/';
+ break;
+ case 'weavatar':
+ $test_url = 'https://weavatar.com/avatar/';
+ break;
+ }
+ $response = wp_remote_get( $test_url );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ if ( $this->settings['cravatar'] == 'cn' ) {
+ $this->settings['cravatar'] = 'global';
+ } elseif ( $this->settings['cravatar'] == 'global' ) {
+ $this->settings['cravatar'] = 'weavatar';
+ } elseif ( $this->settings['cravatar'] == 'weavatar' ) {
+ $this->settings['cravatar'] = 'cn';
+ }
+ $this->update_settings();
+ }
+ }
+
+ /**
+ * 检查萌芽加速可用性
+ */
+ public function maybe_check_admincdn() {
+ // 后台加速
+ if ( in_array( 'admin', $this->settings['admincdn'] ) ) {
+ $response = wp_remote_get( 'https://wpstatic.admincdn.com/6.7/wp-includes/js/wp-sanitize.min.js' );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'admin' ] ) );
+ $this->update_settings();
+ }
+ }
+ // 前台加速
+ if ( in_array( 'frontend', $this->settings['admincdn'] ) ) {
+ $url = network_site_url( '/wp-includes/js/wp-sanitize.min.js' );
+ $response = wp_remote_get( 'https://public.admincdn.com/' . $url );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'frontend' ] ) );
+ $this->update_settings();
+ }
+ }
+ // Google 字体
+ if ( in_array( 'googlefonts', $this->settings['admincdn'] ) ) {
+ $response = wp_remote_get( 'https://googlefonts.admincdn.com/css?family=Roboto:400,700' );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'googlefonts' ] ) );
+ $this->update_settings();
+ }
+ }
+ // Google 前端公共库
+ if ( in_array( 'googleajax', $this->settings['admincdn'] ) ) {
+ $response = wp_remote_get( 'https://googleajax.admincdn.com/ajax/libs/jquery/3.7.1/jquery.slim.min.js' );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'googleajax' ] ) );
+ $this->update_settings();
+ }
+ }
+ // CDNJS 前端公共库
+ if ( in_array( 'cdnjs', $this->settings['admincdn'] ) ) {
+ $response = wp_remote_get( 'https://cdnjs.admincdn.com/jquery/3.7.1/jquery.slim.min.js' );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'cdnjs' ] ) );
+ $this->update_settings();
+ }
+ }
+ // jsDelivr 公共库
+ if ( in_array( 'jsdelivr', $this->settings['admincdn'] ) ) {
+ $response = wp_remote_get( 'https://jsd.admincdn.com/npm/jquery@3.7.1/dist/jquery.slim.min.js' );
+ if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != 200 ) {
+ $this->settings['admincdn'] = array_values( array_diff( $this->settings['admincdn'], [ 'jsdelivr' ] ) );
+ $this->update_settings();
+ }
+ }
+ }
+
+ /**
+ * 更新设置
+ */
+ private function update_settings() {
+ if ( is_multisite() ) {
+ update_site_option( 'wp_china_yes', $this->settings );
+ } else {
+ update_option( 'wp_china_yes', $this->settings, true );
+ }
+ }
+}
diff --git a/Service/Setting.php b/Service/Setting.php
index 376bbc6..99b06d0 100755
--- a/Service/Setting.php
+++ b/Service/Setting.php
@@ -25,6 +25,19 @@ class Setting {
self::admin_init();
}
+
+/**
+ * 动态获取设置页面的 URL
+ *
+ * @return string
+ */
+private function get_settings_page_url() {
+ if ( is_multisite() ) {
+ return network_admin_url( 'settings.php?page=wp-china-yes' );
+ }
+ return admin_url( 'options-general.php?page=wp-china-yes' );
+}
+
/**
* 挂载设置项
*/
@@ -55,7 +68,7 @@ class Setting {
'type' => 'content',
'content' =>
<< 原生体验
文派叶子🍃(WP-China-Yes)是一款不可多得的 WordPress 系统底层优化和生态基础设施软件。

特色功能
* 100% 兼容 WP 程序及发行分支版本,更多优秀插件待您体验。
网站加速
优化加速插件多如牛毛,为何文派叶子如此与众不同?
进一步了解 ↗ 翻译推送
高质量翻译中文本地化翻译由文派开源官方提供,欢迎参与改进。
本地化改进 ↗ 加入我们
关注文派茶馆 WPTEA.com 公众号以及订阅我们的时事通讯即可接收独家内容、提示和更新。
+ 原生体验
文派叶子🍃(WP-China-Yes)是一款不可多得的 WordPress 系统底层优化和生态基础设施软件。

特色功能
* 100% 兼容 WP 程序及分支发行版本,更多优秀插件待您体验。
网站加速
优化加速插件多如牛毛,为何文派叶子如此与众不同?
进一步了解 ↗ 翻译推送
高质量翻译中文本地化翻译由文派开源官方提供,欢迎参与改进。
本地化改进 ↗ 加入我们
关注文派茶馆 WPTEA.com 公众号以及订阅我们的时事通讯即可接收独家内容、提示和更新。

HTML,
]
],
@@ -71,13 +84,13 @@ HTML,
'title' => __( '应用市场', 'wp-china-yes' ),
'inline' => true,
'options' => [
+ 'wenpai' => '文派开源',
'proxy' => '官方镜像',
- 'wenpai' => '文派开源',
'off' => '不启用'
],
'default' => 'wenpai',
'subtitle' => '是否启用市场加速',
- 'desc' => __( '官方加速源(WPMirror)直接从 .org 反代至大陆分发;文派开源(WenPai.org)中国境内自建托管仓库,同时集成文派翻译平台。可参考源站说明。',
+ 'desc' => __( '文派开源(WenPai.org)中国境内自建托管仓库,同时集成文派翻译平台。官方加速源(WPMirror)直接从 .org 反代至大陆分发;可参考源站说明。',
'wp-china-yes' ),
],
[
@@ -86,20 +99,36 @@ HTML,
'title' => __( '萌芽加速', 'wp-china-yes' ),
'inline' => true,
'options' => [
- 'admin' => '后台加速',
- 'frontend' => '前台加速',
'googlefonts' => 'Google 字体',
'googleajax' => 'Google 前端库',
'cdnjs' => 'CDNJS 前端库',
- 'jsdelivr' => 'jsDelivr 前端库'
+ 'jsdelivr' => 'jsDelivr 前端库',
+ 'bootstrapcdn' => 'Bootstrap 前端库'
],
'default' => [
'admin' => 'admin',
],
'subtitle' => '是否启用萌芽加速',
- 'desc' => __( '萌芽加速(adminCDN)将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需要加速的项目,更多细节控制和功能,请查看推荐设置。',
+ 'desc' => __( '萌芽加速(adminCDN)将 WordPress 插件依赖的静态文件切换为公共资源,解决卡顿、加载慢等问题。您可按需启用加速项目,更多细节控制和功能,请查看推荐设置。',
'wp-china-yes' ),
],
+ [
+ 'id' => 'admincdn',
+ 'type' => 'checkbox',
+ 'title' => __( '文件加速', 'wp-china-yes' ),
+ 'inline' => true,
+ 'options' => [
+ 'admin' => '后台加速',
+ 'frontend' => '前台加速',
+ ],
+ 'default' => [
+ 'admin' => 'admin',
+ ],
+ 'subtitle' => '是否启用文件加速',
+ 'desc' => __( '专为 WordPress 系统内置依赖的静态资源进行加速,加快网站访问速度,如遇异常请停用对应选项。',
+ 'wp-china-yes' ),
+ ],
+
[
'id' => 'cravatar',
'type' => 'radio',
@@ -148,10 +177,12 @@ HTML,
'corner' => '直角括号',
'space' => '文本空格',
'punctuation' => '标点显示',
+ 'indent' => '段首缩进',
+ 'align' => '两端对齐',
],
'default' => '',
'subtitle' => '是否启用排印优化',
- 'desc' => __( '排印优化可提升中文网页的视觉美感,适用于中文字体的网站。',
+ 'desc' => __( '文风字体排印优化可提升中文网页的视觉美感,适用于正式内容的网站。',
'wp-china-yes' ),
'dependency' => [
'windfonts',
@@ -261,7 +292,7 @@ HTML,
],
'default' => 'off',
'subtitle' => '是否启用后台广告屏蔽',
- 'desc' => __( '文派叶子🍃(WP-China-Yes)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用插件侵入式后台广告、通知及无用信息,拿回您的后台控制权。',
+ 'desc' => __( '文派叶子🍃(WPCY)独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用插件侵入式后台广告、通知及无用信息,拿回后台控制权。',
'wp-china-yes' ),
],
[
@@ -360,10 +391,10 @@ HTML,
],
[
'id' => 'url',
- 'type' => 'text',
+ 'type' => 'textarea',
'title' => __( 'URL', 'wp-china-yes' ),
'subtitle' => 'URL',
- 'desc' => __( '设置需要屏蔽的 URL 关键词',
+ 'desc' => __( '填入需要屏蔽的 URL 链接,一行一条,注意不要串行',
'wp-china-yes' ),
'default' => '',
'placeholder' => 'example.com',
@@ -382,25 +413,64 @@ HTML,
] );
- WP_CHINA_YES::createSection( $this->prefix, [
- 'title' => '节点监控',
- 'icon' => 'icon icon-story',
- 'fields' => [
- [
- 'id' => 'monitor',
- 'type' => 'switcher',
- 'default' => true,
- 'title' => '节点监控',
- 'subtitle' => '自动监控加速节点可用性',
- 'desc' => __( '脉云维护(MainCloud)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节点或关闭加速,以保证您的网站正常访问',
- 'wp-china-yes' ),
- ],
- [
- 'type' => 'content',
- 'content' => '启用隐藏设置前请务必的保存或收藏当前设置页面 URL,否则您将无法再次进入插件设置页面',
- ],
- ],
- ] );
+WP_CHINA_YES::createSection( $this->prefix, [
+ 'title' => '脉云维护',
+ 'icon' => 'icon icon-story',
+ 'fields' => [
+ [
+ 'id' => 'monitor',
+ 'type' => 'switcher',
+ 'default' => true,
+ 'title' => '节点监控',
+ 'subtitle' => '自动监控加速节点可用性',
+ 'desc' => __( '脉云维护(MainCloud)支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节点或关闭加速,以保证您的网站正常访问',
+ 'wp-china-yes' ),
+ ],
+ [
+ 'id' => 'memory',
+ 'type' => 'switcher',
+ 'default' => true,
+ 'title' => '系统监控',
+ 'subtitle' => '自动监控站点系统运行状态',
+ 'desc' => __( '支持在管理后台页脚中显示系统运行状态,包括内存使用、CPU负载、MySQL版本、调试状态等信息',
+ 'wp-china-yes' ),
+ ],
+ [
+ 'id' => 'memory_display',
+ 'type' => 'checkbox',
+ 'title' => __( '显示参数', 'wp-china-yes' ),
+ 'inline' => true,
+ 'options' => [
+ 'memory_usage' => '内存使用量',
+ 'wp_limit' => 'WP内存限制',
+ 'server_ip' => '服务器IP',
+ 'hostname' => '主机名',
+ 'os_info' => '操作系统',
+ 'php_info' => 'PHP信息',
+ 'cpu_usage' => 'CPU使用率',
+ 'debug_status' => '调试状态',
+ 'mysql_version'=> 'MySQL版本'
+ ],
+ 'default' => [
+ 'memory_usage',
+ 'wp_limit',
+ 'server_ip',
+ 'os_info',
+ 'php_info',
+ 'cpu_usage',
+ 'debug_status',
+ 'mysql_version'
+ ],
+ 'subtitle' => '选择页脚要显示的信息',
+ 'desc' => __( '为网站维护人员提供参考依据,无需登录服务器即可查看相关信息参数','wp-china-yes' ),
+ 'dependency' => ['memory', '==', 'true'],
+ ],
+ [
+ 'type' => 'content',
+ 'content' => '启用隐藏设置前请务必的保存或收藏当前设置页面 URL,否则您将无法再次进入插件设置页面',
+ ],
+ ],
+] );
WP_CHINA_YES::createSection( $this->prefix, [
'title' => '品牌白标',
@@ -448,7 +518,7 @@ HTML,
'type' => 'content',
'content' =>
<< 开源建站
文派寻鹿🦌(WP Deer)建站套件是由文派科技官方提供的企业建站产品集合,代码均为 100% GPL 开源,无任何加密隐藏。
+ 开源建站
文派寻鹿🦌(WP Deer)建站套件是由文派科技官方提供的企业建站产品集合,代码均为 100% GPL 开源,无任何加密隐藏。
HTML,
]
],
@@ -468,9 +538,7 @@ HTML,
项目简介
文派(WordPress)中国本土化项目始于 2019 年,由 文派叶子🍃(WPCY) 插件开启,其前身为 WP-China-Yes。
2023 年 5 月,文派科技完成对该项目的收购,并对其进行了全面的品牌重塑。
-
赞助支持
特别感谢以下企业品牌对文派项目提供的资金资源支持。早期伙伴未来有机会共享文派生态资源,期待社会各界参与。
赞助支持
特别感谢以下企业品牌对文派项目提供的资金资源支持。早期伙伴未来有机会共享文派生态资源,期待社会各界参与。
开发 & 贡献者
100% 开源代码,诚邀您一起参与文派 (WordPress) 软件国产化进程,打造属于自己的开源自助建站程序。
+
HTML,
]
],
diff --git a/Service/Super.php b/Service/Super.php
old mode 100644
new mode 100755
index c0e10d0..7f664ca
--- a/Service/Super.php
+++ b/Service/Super.php
@@ -55,9 +55,7 @@ HTML;
|
翻译平台
|
- 文章投稿
- |
- 自选新闻源
+ 订阅推送
';
+ } );
+ }
+ // 支持中文排版两端对齐
+ if ( in_array( 'align', (array) $this->settings['windfonts_typography'] ) ) {
+ add_action( 'wp_head', function () {
+ echo '';
+ } );
+ }
+
}
/**
diff --git a/Service/Update.php b/Service/Update.php
old mode 100644
new mode 100755
diff --git a/assets/css/setting.css b/assets/css/setting.css
index 1ad5486..f69d956 100755
--- a/assets/css/setting.css
+++ b/assets/css/setting.css
@@ -90,6 +90,9 @@
box-shadow: 0 0 0 1px #ccd0d4, 0 1px 1px 1px rgba(0, 0, 0, .04);
}
+.wp_china_yes-field-checkbox .wp_china_yes--inline-list li, .wp_china_yes-field-radio .wp_china_yes--inline-list li {
+ margin-right: 20px;
+}
.wp_china_yes-section {
margin: 50px auto;
diff --git a/assets/images/qr-banner.jpg b/assets/images/qr-banner.jpg
new file mode 100755
index 0000000000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