feat: bump version 3.6.3

This commit is contained in:
耗子 2024-08-23 14:45:34 +08:00
parent ce02646463
commit 4a7c871c5c
8 changed files with 57 additions and 9 deletions

View file

@ -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();
}
}
}
/**