Skip to content

Commit

Permalink
add AHCDN & close #284
Browse files Browse the repository at this point in the history
  • Loading branch information
solstice23 committed Oct 10, 2021
1 parent 4a3ccd8 commit 63edb76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function theme_slug_setup() {
$GLOBALS['assets_path'] = "https://cdn.jsdelivr.net/gh/solstice23/argon-theme@" . wp_get_theme() -> Version;
}else if ($argon_assets_path == "fastgit"){
$GLOBALS['assets_path'] = "https://raw.fastgit.org/solstice23/argon-theme/v" . wp_get_theme() -> Version;
}else if ($argon_assets_path == "AHCDN"){
$GLOBALS['assets_path'] = "https://source.ahdark.com/wordpress/theme/argon-theme/" . wp_get_theme() -> Version;
}else{
$GLOBALS['assets_path'] = get_bloginfo('template_url');
}
Expand Down Expand Up @@ -2903,6 +2905,7 @@ function themeoptions_page(){
<option value="default" <?php if ($argon_assets_path=='default'){echo 'selected';} ?>><?php _e('不使用', 'argon');?></option>
<option value="jsdelivr" <?php if ($argon_assets_path=='jsdelivr'){echo 'selected';} ?>>jsdelivr</option>
<option value="fastgit" <?php if ($argon_assets_path=='fastgit'){echo 'selected';} ?>>fastgit</option>
<option value="AHCDN" <?php if ($argon_assets_path=='jsdelivr'){echo 'selected';} ?>>AHCDN</option>
</select>
<p class="description"><?php _e('选择主题资源文件的引用地址。使用 CDN 可以加速资源文件的访问并减少服务器压力。', 'argon');?></p>
</td>
Expand Down

0 comments on commit 63edb76

Please sign in to comment.