Skip to content

Commit

Permalink
修复:核心功能无法在 Cron 环境中运行的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxiyuan committed Nov 1, 2021
1 parent 61528c8 commit 946e4de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wp-china-yes.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: 将你的WordPress接入本土生态体系中,这将为你提供一个更贴近中国人使用习惯的WordPress
* Author: WP中国本土化社区
* Author URI:https://wp-china.org/
* Version: 3.5.2
* Version: 3.5.3
* Network: True
* License: GPLv3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -100,7 +100,7 @@ public function init() {
}


if ( is_admin() ) {
if ( is_admin() || wp_doing_cron() ) {
add_action( 'admin_init', function () {
/**
* wpapi用以标记用户所选的仓库api,数值说明:1 使用由WP-China.org提供的国区定制API,2 只是经代理加速的api.wordpress.org原版API
Expand Down

0 comments on commit 946e4de

Please sign in to comment.