mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-03 02:48:45 +08:00
feat: 添加排印优化和飞行模式
This commit is contained in:
parent
b0a4bc3d42
commit
a87985970d
12 changed files with 340 additions and 573 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
|
.idea
|
||||||
vendor
|
vendor
|
|
@ -17,6 +17,9 @@ class Monitor {
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->settings = get_settings();
|
$this->settings = get_settings();
|
||||||
|
if ( $this->settings['monitor'] ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
add_action( 'init', [ $this, 'init' ] );
|
add_action( 'init', [ $this, 'init' ] );
|
||||||
add_action( 'wp_china_yes_maybe_check_store', [
|
add_action( 'wp_china_yes_maybe_check_store', [
|
||||||
|
@ -37,9 +40,6 @@ class Monitor {
|
||||||
* 初始化
|
* 初始化
|
||||||
*/
|
*/
|
||||||
public function init() {
|
public function init() {
|
||||||
if ( $this->settings['monitor'] ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 检查应用市场可用性
|
// 检查应用市场可用性
|
||||||
if ( ! wp_next_scheduled( 'wp_china_yes_maybe_check_store' ) && $this->settings['store'] != 'off' ) {
|
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' );
|
wp_schedule_event( time(), 'hourly', 'wp_china_yes_maybe_check_store' );
|
||||||
|
|
|
@ -125,6 +125,26 @@ class Setting {
|
||||||
'desc' => __( '<a href="https://windfonts.com/" target="_blank">文风字体(Windfonts)</a>为您的网站增添无限活力。专为中文网页设计,旨在提升用户阅读体验和视觉享受。新手使用请先查看<a href="https://wp-china-yes.com/document/chinese-fonts" target="_blank">字体使用说明</a>。',
|
'desc' => __( '<a href="https://windfonts.com/" target="_blank">文风字体(Windfonts)</a>为您的网站增添无限活力。专为中文网页设计,旨在提升用户阅读体验和视觉享受。新手使用请先查看<a href="https://wp-china-yes.com/document/chinese-fonts" target="_blank">字体使用说明</a>。',
|
||||||
'wp-china-yes' ),
|
'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',
|
'id' => 'windfonts_list',
|
||||||
'type' => 'group',
|
'type' => 'group',
|
||||||
|
@ -193,7 +213,7 @@ class Setting {
|
||||||
'subtitle' => '字体应用元素',
|
'subtitle' => '字体应用元素',
|
||||||
'desc' => __( '设置字体应用的元素(CSS 选择器)',
|
'desc' => __( '设置字体应用的元素(CSS 选择器)',
|
||||||
'wp-china-yes' ),
|
'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,
|
'sanitize' => false,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -231,11 +251,11 @@ class Setting {
|
||||||
'wp-china-yes' ),
|
'wp-china-yes' ),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'id' => 'adblock_rule',
|
'id' => 'adblock_rule',
|
||||||
'type' => 'group',
|
'type' => 'group',
|
||||||
'title' => '规则列表',
|
'title' => '规则列表',
|
||||||
'subtitle' => '使用的广告屏蔽规则列表',
|
'subtitle' => '使用的广告屏蔽规则列表',
|
||||||
'desc' => __( '支持添加多条<a href="https://wp-china-yes.com/document/advertising-blocking-rules" target="_blank">广告屏蔽规则</a>',
|
'desc' => __( '支持添加多条<a href="https://wp-china-yes.com/document/advertising-blocking-rules" target="_blank">广告屏蔽规则</a>',
|
||||||
'wp-china-yes' ),
|
'wp-china-yes' ),
|
||||||
|
|
||||||
'button_title' => '添加规则',
|
'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' => __( '<a href="https://wp-china-yes.com/ads" target="_blank">文派叶子🍃(WP-China-Yes)</a>独家特色功能,飞行模式可以屏蔽 WordPress 主题插件中国不能访问的服务 API 请求,加速网站前后台访问。注意:部分外部请求为产品更新检测,若屏蔽请定期手动检测。',
|
||||||
|
'wp-china-yes' ),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 'plane_rule',
|
||||||
|
'type' => 'group',
|
||||||
|
'title' => '规则列表',
|
||||||
|
'subtitle' => '飞行模式使用的 URL 屏蔽规则列表',
|
||||||
|
'desc' => __( '支持添加多条 <a href="https://wp-china-yes.com/document/advertising-blocking-rules" target="_blank">URL 屏蔽规则</a>',
|
||||||
|
'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, [
|
WP_CHINA_YES::createSection( $this->prefix, [
|
||||||
'title' => '其他设置',
|
'title' => '其他设置',
|
||||||
'icon' => 'fa fa-cogs',
|
'icon' => 'fa fa-cogs',
|
||||||
|
|
|
@ -4,6 +4,7 @@ namespace WenPai\ChinaYes\Service;
|
||||||
|
|
||||||
defined( 'ABSPATH' ) || exit;
|
defined( 'ABSPATH' ) || exit;
|
||||||
|
|
||||||
|
use WP_Error;
|
||||||
use function WenPai\ChinaYes\get_settings;
|
use function WenPai\ChinaYes\get_settings;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -170,56 +171,11 @@ HTML;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* adminCDN
|
||||||
|
*/
|
||||||
if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
||||||
/**
|
$this->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'
|
|
||||||
] );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -236,24 +192,93 @@ HTML;
|
||||||
/**
|
/**
|
||||||
* 文风字体
|
* 文风字体
|
||||||
*/
|
*/
|
||||||
if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] == 'optimize' ) {
|
if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
||||||
add_action( 'init', function () {
|
if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] != 'off' ) {
|
||||||
wp_enqueue_style( 'windfonts-optimize', CHINA_YES_PLUGIN_URL . 'assets/css/fonts.css', [], CHINA_YES_VERSION );
|
$this->load_typography();
|
||||||
} );
|
}
|
||||||
}
|
if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] == 'optimize' ) {
|
||||||
if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] == 'on' ) {
|
add_action( 'init', function () {
|
||||||
add_action( 'wp_head', [ $this, 'load_windfonts' ] );
|
wp_enqueue_style( 'windfonts-optimize', CHINA_YES_PLUGIN_URL . 'assets/css/fonts.css', [], CHINA_YES_VERSION );
|
||||||
add_action( 'admin_head', [ $this, 'load_windfonts' ] );
|
} );
|
||||||
}
|
}
|
||||||
if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] == 'frontend' ) {
|
if ( ! empty( $this->settings['windfonts'] ) && $this->settings['windfonts'] == 'on' ) {
|
||||||
add_action( 'wp_head', [ $this, 'load_windfonts' ] );
|
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' ) {
|
if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
||||||
add_action( 'admin_head', [ $this, 'load_adblock' ] );
|
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 替换
|
* WordPress.Org 替换
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,10 +18,11 @@
|
||||||
color: #dcdcde;
|
color: #dcdcde;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contributors-name a{
|
.contributors-name a {
|
||||||
line-height: 2;
|
line-height: 2;
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp_china_yes-content a {
|
.wp_china_yes-content a {
|
||||||
color: #3858e9;
|
color: #3858e9;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
23
helpers.php
23
helpers.php
|
@ -9,15 +9,18 @@ function get_settings() {
|
||||||
$settings = is_multisite() ? get_site_option( 'wp_china_yes' ) : get_option( 'wp_china_yes' );
|
$settings = is_multisite() ? get_site_option( 'wp_china_yes' ) : get_option( 'wp_china_yes' );
|
||||||
|
|
||||||
return wp_parse_args( $settings, [
|
return wp_parse_args( $settings, [
|
||||||
'store' => 'wenpai',
|
'store' => 'wenpai',
|
||||||
'admincdn' => [ 'admin' ],
|
'admincdn' => [ 'admin' ],
|
||||||
'cravatar' => 'cn',
|
'cravatar' => 'cn',
|
||||||
'windfonts' => 'off',
|
'windfonts' => 'off',
|
||||||
'windfonts_list' => [],
|
'windfonts_list' => [],
|
||||||
'adblock' => 'off',
|
'windfonts_typography' => [],
|
||||||
'adblock_rule' => [],
|
'adblock' => 'off',
|
||||||
'monitor' => true,
|
'adblock_rule' => [],
|
||||||
'hide' => false,
|
'plane' => 'off',
|
||||||
'custom_name' => 'WP-China-Yes',
|
'plane_rule' => [],
|
||||||
|
'monitor' => true,
|
||||||
|
'hide' => false,
|
||||||
|
'custom_name' => 'WP-China-Yes',
|
||||||
] );
|
] );
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -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 ""
|
|
||||||
"<a href=\"https://admincdn.com/\" target=\"_blank\">萌芽加速(adminCDN)</a>"
|
|
||||||
"将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需要"
|
|
||||||
"加速的项目,更多细节控制和功能,请关注 adminCDN 项目。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://admincdn.com/\" target=\"_blank\">adminCDN</a> 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 ""
|
|
||||||
"<a href=\"https://cravatar.com/\" target=\"_blank\">初认头像(Cravatar)</"
|
|
||||||
"a>Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请安"
|
|
||||||
"装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 "
|
|
||||||
"WordPress)"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://cravatar.com/\" target=\"_blank\">Cravatar</a> 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 ""
|
|
||||||
"<a href=\"https://windfonts.com/\" target=\"_blank\">文风字体(Windfonts)</"
|
|
||||||
"a>为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器"
|
|
||||||
"字体调用。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://windfonts.com/\" target=\"_blank\">Windfonts</a> 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 ""
|
|
||||||
"<a href=\"https://wp-china-yes.com/ads\" target=\"_blank\">文派叶子🍃(WP-"
|
|
||||||
"China-Yes)</a>支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节点"
|
|
||||||
"或关闭加速,以保证您的网站正常访问。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://wp-china-yes.com/ads\" target=\"_blank\">WP-China-Yes 🍃 "
|
|
||||||
"(文派叶子)</a> 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 ""
|
|
||||||
"<a href=\"https://wp-china-yes.com/ads\" target=\"_blank\">文派叶子🍃(WP-"
|
|
||||||
"China-Yes)</a>独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用"
|
|
||||||
"插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,"
|
|
||||||
"查看<a href=\"https://wp-china-yes.com/\" target=\"_blank\">可优化插件列表</"
|
|
||||||
"a>。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://wp-china-yes.com/ads\" target=\"_blank\">WP-China-Yes 🍃 "
|
|
||||||
"(文派叶子)</a> 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 <a "
|
|
||||||
"href=\"https://wp-china-yes.com/\" target=\"_blank\">list of optimizable "
|
|
||||||
"plugins</a>."
|
|
||||||
|
|
||||||
#: Service/Setting.php:41
|
|
||||||
msgid ""
|
|
||||||
"<a href=\"https://wpmirror.com/\" target=\"_blank\">官方加速源(WPMirror)</"
|
|
||||||
"a>直接从 .org 反代至大陆分发;<a href=\"https://wenpai.org/\" "
|
|
||||||
"target=\"_blank\">文派开源(WenPai.org)</a>中国境内自建托管仓库,同时集成文"
|
|
||||||
"派翻译平台。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://wpmirror.com/\" target=\"_blank\">The official "
|
|
||||||
"acceleration source (WPMirror)</a> is directly reverse-generated from .org "
|
|
||||||
"to the mainland for distribution; <a href=\"https://wenpai.org/\" "
|
|
||||||
"target=\"_blank\">WenPai.org Open Source</a> 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"
|
|
Binary file not shown.
|
@ -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 ""
|
|
||||||
"<a href=\"https://admincdn.com/\" target=\"_blank\">萌芽加速(adminCDN)</a>"
|
|
||||||
"将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需"
|
|
||||||
"要加速的项目,更多细节控制和功能,请关注 adminCDN 项目。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://admincdn.com/\" target=\"_blank\">萌芽加速(adminCDN)</a>"
|
|
||||||
"将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需"
|
|
||||||
"要加速的项目,更多细节控制和功能,请关注 adminCDN 项目。"
|
|
||||||
|
|
||||||
#: Service/Setting.php:72
|
|
||||||
msgid ""
|
|
||||||
"<a href=\"https://cravatar.com/\" target=\"_blank\">初认头像(Cravatar)</"
|
|
||||||
"a>Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请"
|
|
||||||
"安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 "
|
|
||||||
"WordPress)"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://cravatar.com/\" target=\"_blank\">初认头像(Cravatar)</"
|
|
||||||
"a>Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请"
|
|
||||||
"安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 "
|
|
||||||
"WordPress)"
|
|
||||||
|
|
||||||
#: Service/Setting.php:86
|
|
||||||
msgid ""
|
|
||||||
"<a href=\"https://windfonts.com/\" target=\"_blank\">文风字体(Windfonts)</"
|
|
||||||
"a>为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器"
|
|
||||||
"字体调用。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://windfonts.com/\" target=\"_blank\">文风字体(Windfonts)</"
|
|
||||||
"a>为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器"
|
|
||||||
"字体调用。"
|
|
||||||
|
|
||||||
#: Service/Setting.php:109
|
|
||||||
msgid ""
|
|
||||||
"<a href=\"https://wp-china-yes.com/ads\" target=\"_blank\">文派叶子🍃(WP-"
|
|
||||||
"China-Yes)</a>支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节"
|
|
||||||
"点或关闭加速,以保证您的网站正常访问。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://wp-china-yes.com/ads\" target=\"_blank\">文派叶子🍃(WP-"
|
|
||||||
"China-Yes)</a>支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节"
|
|
||||||
"点或关闭加速,以保证您的网站正常访问。"
|
|
||||||
|
|
||||||
#: Service/Setting.php:98
|
|
||||||
msgid ""
|
|
||||||
"<a href=\"https://wp-china-yes.com/ads\" target=\"_blank\">文派叶子🍃(WP-"
|
|
||||||
"China-Yes)</a>独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用"
|
|
||||||
"插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,"
|
|
||||||
"查看<a href=\"https://wp-china-yes.com/\" target=\"_blank\">可优化插件列表</"
|
|
||||||
"a>。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://wp-china-yes.com/ads\" target=\"_blank\">文派叶子🍃(WP-"
|
|
||||||
"China-Yes)</a>独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用"
|
|
||||||
"插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,"
|
|
||||||
"查看<a href=\"https://wp-china-yes.com/\" target=\"_blank\">可优化插件列表</"
|
|
||||||
"a>。"
|
|
||||||
|
|
||||||
#: Service/Setting.php:41
|
|
||||||
msgid ""
|
|
||||||
"<a href=\"https://wpmirror.com/\" target=\"_blank\">官方加速源(WPMirror)</"
|
|
||||||
"a>直接从 .org 反代至大陆分发;<a href=\"https://wenpai.org/\" "
|
|
||||||
"target=\"_blank\">文派开源(WenPai.org)</a>中国境内自建托管仓库,同时集成文"
|
|
||||||
"派翻译平台。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://wpmirror.com/\" target=\"_blank\">官方加速源(WPMirror)</"
|
|
||||||
"a>直接从 .org 反代至大陆分发;<a href=\"https://wenpai.org/\" "
|
|
||||||
"target=\"_blank\">文派开源(WenPai.org)</a>中国境内自建托管仓库,同时集成文"
|
|
||||||
"派翻译平台。"
|
|
||||||
|
|
||||||
#. 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 "设置"
|
|
Binary file not shown.
|
@ -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:19+0800\n"
|
|
||||||
"Last-Translator: \n"
|
|
||||||
"Language-Team: 繁體中文\n"
|
|
||||||
"Language: zh_TW\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.11; wp-6.6\n"
|
|
||||||
"X-Domain: wp-china-yes\n"
|
|
||||||
|
|
||||||
#: Service/Setting.php:54
|
|
||||||
msgid ""
|
|
||||||
"<a href=\"https://admincdn.com/\" target=\"_blank\">萌芽加速(adminCDN)</a>"
|
|
||||||
"将 WordPress 依赖的静态文件切换为公共资源,加快网站访问速度。您可按需启用需"
|
|
||||||
"要加速的项目,更多细节控制和功能,请关注 adminCDN 项目。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://admincdn.com/\" target=\"_blank\">萌芽加速(adminCDN)</a>"
|
|
||||||
"將 WordPress 依賴的靜態檔案切換為公共資源,加快網站訪問速度。您可按需啟用需"
|
|
||||||
"要加速的專案,更多細節控制和功能,請關注 adminCDN 專案。"
|
|
||||||
|
|
||||||
#: Service/Setting.php:72
|
|
||||||
msgid ""
|
|
||||||
"<a href=\"https://cravatar.com/\" target=\"_blank\">初认头像(Cravatar)</"
|
|
||||||
"a>Gravatar 在中国的完美替代方案,您可以在 Cravatar.com 上传头像,更多选项请"
|
|
||||||
"安装 WPAavatar 插件。(任何开发者均可在自己的产品中集成该服务,不局限于 "
|
|
||||||
"WordPress)"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://cravatar.com/\" target=\"_blank\">初認頭像(Cravatar)</"
|
|
||||||
"a>Gravatar 在中國的完美替代方案,您可以在 Cravatar.com 上傳頭像,更多選項請"
|
|
||||||
"安裝 WPAavatar 外掛。(任何開發者均可在自己的產品中整合該服務,不侷限於 "
|
|
||||||
"WordPress)"
|
|
||||||
|
|
||||||
#: Service/Setting.php:86
|
|
||||||
msgid ""
|
|
||||||
"<a href=\"https://windfonts.com/\" target=\"_blank\">文风字体(Windfonts)</"
|
|
||||||
"a>为您的网页渲染中文字体并对主题、插件内的字体进行加速;优化模式可优化浏览器"
|
|
||||||
"字体调用。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://windfonts.com/\" target=\"_blank\">文風字型(Windfonts)</"
|
|
||||||
"a>為您的網頁渲染中文字型並對主題、外掛內的字型進行加速;最佳化模式可最佳化瀏"
|
|
||||||
"覽器字型呼叫。"
|
|
||||||
|
|
||||||
#: Service/Setting.php:109
|
|
||||||
msgid ""
|
|
||||||
"<a href=\"https://wp-china-yes.com/ads\" target=\"_blank\">文派叶子🍃(WP-"
|
|
||||||
"China-Yes)</a>支持自动监控各加速节点可用性,当节点不可用时自动切换至可用节"
|
|
||||||
"点或关闭加速,以保证您的网站正常访问。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://wp-china-yes.com/ads\" target=\"_blank\">文派葉子🍃(WP-"
|
|
||||||
"China-Yes)</a>支援自動監控各加速節點可用性,當節點不可用時自動切換至可用節"
|
|
||||||
"點或關閉加速,以保證您的網站正常訪問。"
|
|
||||||
|
|
||||||
#: Service/Setting.php:98
|
|
||||||
msgid ""
|
|
||||||
"<a href=\"https://wp-china-yes.com/ads\" target=\"_blank\">文派叶子🍃(WP-"
|
|
||||||
"China-Yes)</a>独家特色功能,让您拥有清爽整洁的 WordPress 后台,清除各类常用"
|
|
||||||
"插件侵入式后台广告、通知及无用信息;启用后若存在异常拦截,请切换为手动模式,"
|
|
||||||
"查看<a href=\"https://wp-china-yes.com/\" target=\"_blank\">可优化插件列表</"
|
|
||||||
"a>。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://wp-china-yes.com/ads\" target=\"_blank\">文派葉子🍃(WP-"
|
|
||||||
"China-Yes)</a>獨家特色功能,讓您擁有清爽整潔的 WordPress 後臺,清除各類常用"
|
|
||||||
"外掛侵入式後臺廣告、通知及無用資訊;啟用後若存在異常攔截,請切換為手動模式,"
|
|
||||||
"檢視<a href=\"https://wp-china-yes.com/\" target=\"_blank\">可最佳化外掛列表"
|
|
||||||
"</a>。"
|
|
||||||
|
|
||||||
#: Service/Setting.php:41
|
|
||||||
msgid ""
|
|
||||||
"<a href=\"https://wpmirror.com/\" target=\"_blank\">官方加速源(WPMirror)</"
|
|
||||||
"a>直接从 .org 反代至大陆分发;<a href=\"https://wenpai.org/\" "
|
|
||||||
"target=\"_blank\">文派开源(WenPai.org)</a>中国境内自建托管仓库,同时集成文"
|
|
||||||
"派翻译平台。"
|
|
||||||
msgstr ""
|
|
||||||
"<a href=\"https://wpmirror.com/\" target=\"_blank\">官方加速源(WPMirror)</"
|
|
||||||
"a>直接從 .org 反代至大陸分發;<a href=\"https://wenpai.org/\" "
|
|
||||||
"target=\"_blank\">文派開源(WenPai.org)</a>中國境內自建託管倉庫,同時整合文"
|
|
||||||
"派翻譯平臺。"
|
|
||||||
|
|
||||||
#. 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 "設定"
|
|
Loading…
Add table
Add a link
Reference in a new issue