mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-03 11:11:30 +08:00
feat: 更新接口
This commit is contained in:
parent
2223b022b7
commit
cd8e420e81
4 changed files with 7 additions and 7 deletions
|
@ -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 ) {
|
||||
|
|
|
@ -153,7 +153,7 @@ class Setting {
|
|||
echo <<<HTML
|
||||
<div class="settings-header">
|
||||
<div class="settings-title-section">
|
||||
<h1>文派叶子🍃(WP-China-Yes)</h1>
|
||||
<h1>文派叶子🍃(WP-China-Yes)</h1>
|
||||
</div>
|
||||
<h3>将您的 WordPress 接入本土生态体系,这将为您提供一个更贴近中国人使用习惯的 WordPress。</h3>
|
||||
<h4>100% 开源代码,一起参与文派(WordPress)软件国产化进程,打造属于您自己的开源自助建站程序。</h4>
|
||||
|
|
|
@ -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' ) ) {
|
||||
|
|
|
@ -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'
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue