mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-06 05:32:14 +08:00
特性:增加不接管应用市场的选项
This commit is contained in:
parent
788d5fba6d
commit
ef9a96618d
2 changed files with 4 additions and 1 deletions
|
@ -72,6 +72,9 @@ function wpcy_field_wpapi_cb() {
|
||||||
<label>
|
<label>
|
||||||
<input type="radio" value="1" name="wpapi" <?php checked($wpapi, '1'); ?>>本土应用市场(技术试验)
|
<input type="radio" value="1" name="wpapi" <?php checked($wpapi, '1'); ?>>本土应用市场(技术试验)
|
||||||
</label>
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="radio" value="3" name="wpapi" <?php checked($wpapi, '3'); ?>>不接管应用市场
|
||||||
|
</label>
|
||||||
<p class="description">
|
<p class="description">
|
||||||
<b>官方应用市场加速镜像</b>:直接从官方反代并在大陆分发,除了增加对WP-China-Yes插件的更新支持外未做任何更改
|
<b>官方应用市场加速镜像</b>:直接从官方反代并在大陆分发,除了增加对WP-China-Yes插件的更新支持外未做任何更改
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -86,7 +86,7 @@ if (is_admin()) {
|
||||||
* URL替换代码来自于我爱水煮鱼(http://blog.wpjam.com/)开发的WPJAM Basic插件
|
* URL替换代码来自于我爱水煮鱼(http://blog.wpjam.com/)开发的WPJAM Basic插件
|
||||||
*/
|
*/
|
||||||
add_filter('pre_http_request', function ($preempt, $r, $url) {
|
add_filter('pre_http_request', function ($preempt, $r, $url) {
|
||||||
if (!stristr($url, 'api.wordpress.org') && !stristr($url, 'downloads.wordpress.org')) {
|
if ((!stristr($url, 'api.wordpress.org') && !stristr($url, 'downloads.wordpress.org')) || get_option('wpapi') == 3) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (get_option('wpapi') == 1) {
|
if (get_option('wpapi') == 1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue