|
3 | 3 | // 加载内置插件
|
4 | 4 | include( get_template_directory().'/func/wp-useragent.php');
|
5 | 5 |
|
| 6 | +// 给 style.css 添加修改时间, 解决缓存问题 |
| 7 | +add_filter('stylesheet_uri', 'clrs_css_mtime'); |
| 8 | +function clrs_css_mtime() { |
| 9 | + echo get_template_directory_uri().'/style.css?t='.filemtime(get_stylesheet_directory().'/style.css'); |
| 10 | +} |
| 11 | + |
6 | 12 | // 加载语言包
|
7 | 13 | add_action('after_setup_theme', 'my_theme_setup');
|
8 | 14 | function my_theme_setup() {
|
@@ -146,9 +152,9 @@ function clrs_tjaj() {
|
146 | 152 |
|
147 | 153 | function clrs_sns () {
|
148 | 154 | // 修改此顺序可以改变输出顺序,记得修改对应的注释
|
149 |
| - $clrs_sns = array("profile","gplus","twitter","fb","weibo","qqw","github"); |
150 |
| - $clrs_snsn = array("个人页","Google+","Twitter","Facebook","SinaWeibo","QQ","Github"); |
151 |
| - for ($i=0; $i<7; $i++) { |
| 155 | + $clrs_sns = array("profile","gplus","twitter","fb","weibo","qqw","github","telegram"); |
| 156 | + $clrs_snsn = array("个人页","Google+","Twitter","Facebook","SinaWeibo","QQ","Github","Telegram"); |
| 157 | + for ($i=0; $i<8; $i++) { |
152 | 158 | $clrs_sopt = 'clrs_s_' . $clrs_sns[$i];
|
153 | 159 | if( get_option($clrs_sopt) != null ) {
|
154 | 160 | echo '<a href="' . get_option($clrs_sopt) . '" title="' . $clrs_snsn[$i] . '" target="_blank"><button class="tr_' . $clrs_sns[$i] . '"></button></a>
|
@@ -325,10 +331,10 @@ function clrs_config(){ clrs_thtj(); ?>
|
325 | 331 | 请带上 http:// <br>
|
326 | 332 | <?php
|
327 | 333 |
|
328 |
| - $clrs_sns = array("profile","gplus","twitter","fb","weibo","qqw","github"); |
329 |
| - $clrs_snsn = array("个人页","Google+","Twitter","Facebook","SinaWeibo","QQ / Qzone / QQWeibo","Github"); |
| 334 | + $clrs_sns = array("profile","gplus","twitter","fb","weibo","qqw","github","telegram"); |
| 335 | + $clrs_snsn = array("个人页","Google+","Twitter","Facebook","SinaWeibo","QQ / Qzone / QQWeibo","Github","Telegram"); |
330 | 336 |
|
331 |
| - for ($i=0; $i<7; $i++) { |
| 337 | + for ($i=0; $i<8; $i++) { |
332 | 338 | $clrs_sopt = 'clrs_s_' . $clrs_sns[$i];
|
333 | 339 | echo '<input type="text" size="80" name="' . $clrs_sopt . '" id="' . $clrs_sopt . '" placeholder="' . $clrs_snsn[$i] . '" value="' . get_option($clrs_sopt) . '"/>';
|
334 | 340 | }
|
@@ -386,8 +392,8 @@ function clrs_config(){ clrs_thtj(); ?>
|
386 | 392 | $clrs_upcl = stripslashes($_POST['clrs_upcl']);
|
387 | 393 | update_option( 'clrs_upcl', $clrs_upcl );
|
388 | 394 |
|
389 |
| - $clrs_sns = array("profile","gplus","twitter","fb","weibo","qqw","github"); |
390 |
| - for ($i=0; $i<7; $i++) { |
| 395 | + $clrs_sns = array("profile","gplus","twitter","fb","weibo","qqw","github","telegram"); |
| 396 | + for ($i=0; $i<8; $i++) { |
391 | 397 | $clrs_sopt = 'clrs_s_' . $clrs_sns[$i];
|
392 | 398 | update_option( $clrs_sopt, stripslashes($_POST[$clrs_sopt]) );
|
393 | 399 | }
|
|
0 commit comments