mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-06 21:53:56 +08:00
feat: bump version 3.6.3
This commit is contained in:
parent
ce02646463
commit
4a7c871c5c
8 changed files with 57 additions and 9 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue