Skip to content

Commit

Permalink
0.581
Browse files Browse the repository at this point in the history
  • Loading branch information
solstice23 committed Nov 4, 2019
1 parent a804b74 commit c7f93f6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 9 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Argon - 一个轻盈、简洁、美观的 WordPress 主题

# 更新日志

## 20191104 v0.581
+ 支持切换主题更新源
+ 修复 CSS 一个小问题

## 20191104 v0.58
+ 优化设置页面
+ 修复评论框高度错误问题
Expand Down
31 changes: 26 additions & 5 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@ function theme_slug_setup() {
add_action('after_setup_theme','theme_slug_setup');
//检测更新
require_once(get_template_directory() . '/theme-update-checker/plugin-update-checker.php');
$argonThemeUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
'https://raw.githubusercontent.com/abc2237512422/argon-theme/master/info.json',
get_template_directory() . '/functions.php',
'argon'
);
if (get_option('argon_update_source') == 'abc233site'){
$argonThemeUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
'https://api.abc233.site/argon/info.json',
get_template_directory() . '/functions.php',
'argon'
);
}else{
$argonThemeUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
'https://raw.githubusercontent.com/abc2237512422/argon-theme/master/info.json',
get_template_directory() . '/functions.php',
'argon'
);
}

//初次使用时发送安装量统计信息 (数据仅用于统计安装量)
function post_analytics_info(){
if(function_exists('file_get_contents')){
Expand Down Expand Up @@ -1302,6 +1311,17 @@ function themeoptions_page(){
<p class="description"></p>
</td>
</tr>
<tr>
<th><label>检测更新源</label></th>
<td>
<select name="argon_update_source">
<?php $argon_update_source = get_option('argon_update_source'); ?>
<option value="github" <?php if ($argon_update_source=='github'){echo 'selected';} ?>>Github</option>
<option value="abc233site" <?php if ($argon_update_source=='abc233site'){echo 'selected';} ?>>abc233.site</option>
</select>
<p class="description">如主机访问 Github 较慢,选择 abc233.site 源可能可以增加更新速度</p>
</td>
</tr>
</tbody>
</table>
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="保存更改"></p>
Expand Down Expand Up @@ -1333,6 +1353,7 @@ function themeoptions_page(){
update_option('argon_donate_qrcode_url', $_POST['argon_donate_qrcode_url']);
update_option('argon_hide_shortcode_in_preview', $_POST['argon_hide_shortcode_in_preview']);
update_option('argon_show_thumbnail_in_banner_in_content_page', $_POST['argon_show_thumbnail_in_banner_in_content_page']);
update_option('argon_update_source', $_POST['argon_update_source']);


//LazyLoad 相关
Expand Down
4 changes: 2 additions & 2 deletions info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version" : "0.58",
"version" : "0.581",
"details_url" : "https://github.com/abc2237512422/argon-theme/releases",
"download_url" : "https://github.com/abc2237512422/argon-theme/releases/download/v0.58/argon.zip"
"download_url" : "https://github.com/abc2237512422/argon-theme/releases/download/v0.581/argon.zip"
}
4 changes: 2 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme Name: argon
Author: abc2237512422
Author URI: https://abc233.site/
Description: 轻盈、简洁、美观的 Wordpress 主题
Version: 0.58
Version: 0.581
License: MIT License
License URI: https://opensource.org/licenses/MIT
Tags: 简约, 两栏, 侧栏在左边, 浮动侧栏, 文章目录, 自适应, 夜间模式, 可自定义
Expand Down Expand Up @@ -1256,7 +1256,7 @@ html.darkmode #float_action_buttons #fab_toggle_darkmode:before{
.github-info-card-bottom .github-info-card-meta {
margin-right: 10px;
opacity: .7;
}}
}
.github-info-card-bottom .github-info-card-meta i {
margin-right: 2px;
}
Expand Down

0 comments on commit c7f93f6

Please sign in to comment.