Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加自定义资源来源 #297

Open
wants to merge 5 commits into
base: 3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
bloginfo( 'name' );$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) ) echo " - $site_description";if ( $paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __( 'page %s'), max( $paged, $page ) );/*第 %s 页*/?>
</title>
<link type="text/css" media="all" href="https://cdn.jsdelivr.net/gh/moezx/[email protected]/css/lib.css" rel="stylesheet" />
<link type="text/css" media="all" href="<?php echo(SAKURA_STATIC_ASSETS_HOST);?>gh/mashirozx/sakura@static/css/lib.css" rel="stylesheet" />
<?php wp_head(); ?>
<script>
var the_url=window.location.href;
Expand Down Expand Up @@ -55,5 +55,5 @@ function httpGet(theUrl) {
</form>
</div>
</section>
<script src="https://cdn.jsdelivr.net/gh/moezx/[email protected]/js/other/404.min.js" type="text/javascript"></script>
<script src="<?php echo(SAKURA_STATIC_ASSETS_HOST); ?>gh/mashirozx/sakura@static/js/other/404.min.js" type="text/javascript"></script>
</body>
4 changes: 2 additions & 2 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<div class="site-info" theme-info="Sakura v<?php echo SAKURA_VERSION; ?>">
<div class="footertext">
<div class="img-preload">
<img src="https://cdn.jsdelivr.net/gh/moezx/[email protected]/img/Sakura/images/wordpress-rotating-ball-o.svg">
<img src="https://cdn.jsdelivr.net/gh/moezx/[email protected]/img/Sakura/images/disqus-preloader.svg">
<img src="<?php echo(SAKURA_STATIC_ASSETS_HOST); ?>gh/mashirozx/sakura@static/img/Sakura/images/wordpress-rotating-ball-o.svg">
<img src="<?php echo(SAKURA_STATIC_ASSETS_HOST); ?>gh/mashirozx/sakura@static/img/Sakura/images/disqus-preloader.svg">
</div>
<p style="color: #666666;"><?php echo akina_option('footer_info', ''); ?></p>
</div>
Expand Down
79 changes: 50 additions & 29 deletions functions.php

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions inc/swicher.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ function font_end_js_control() { ?>
mashiro_option.skin_bg7 = "<?php echo $bg_arry[7] ?>";
<?php }else {?>
mashiro_option.skin_bg0 = "none";
mashiro_option.skin_bg1 = "https://cdn.jsdelivr.net/gh/spirit1431007/[email protected]/img/sakura.png";
mashiro_option.skin_bg2 = "https://cdn.jsdelivr.net/gh/spirit1431007/[email protected]/img/plaid2dbf8.jpg";
mashiro_option.skin_bg3 = "https://cdn.jsdelivr.net/gh/spirit1431007/[email protected]/img/star02.png";
mashiro_option.skin_bg4 = "https://cdn.jsdelivr.net/gh/spirit1431007/[email protected]/img/kyotoanimation.png";
mashiro_option.skin_bg5 = "https://cdn.jsdelivr.net/gh/spirit1431007/[email protected]/img/dot_orange.gif";
mashiro_option.skin_bg1 = <?php echo (SAKURA_STATIC_ASSETS_HOST);?>"gh/mashirozx/sakura@static/cdn/img/sakura.png";
mashiro_option.skin_bg2 = <?php echo (SAKURA_STATIC_ASSETS_HOST);?>"gh/mashirozx/sakura@static/cdn/img/plaid2dbf8.jpg";
mashiro_option.skin_bg3 = <?php echo (SAKURA_STATIC_ASSETS_HOST);?>"gh/mashirozx/sakura@static/cdn/img/star02.png";
mashiro_option.skin_bg4 = <?php echo (SAKURA_STATIC_ASSETS_HOST);?>"gh/mashirozx/sakura@static/cdn/img/kyotoanimation.png";
mashiro_option.skin_bg5 = <?php echo (SAKURA_STATIC_ASSETS_HOST);?>"gh/mashirozx/sakura@static/cdn/img/dot_orange.gif";
mashiro_option.skin_bg6 = "https://api.mashiro.top/bing/";
mashiro_option.skin_bg7 = "https://cdn.jsdelivr.net/gh/moezx/[email protected]/other-sites/api-index/images/me.png";
mashiro_option.skin_bg7 = <?php echo (SAKURA_STATIC_ASSETS_HOST);?>"gh/mashirozx/sakura@static/other-sites/api-index/images/me.png";
<?php } ?>

mashiro_option.darkmode = <?php if ( akina_option('darkmode') ){ echo 'true'; } else { echo 'false'; } ?>;
Expand Down Expand Up @@ -67,7 +67,7 @@ function font_end_js_control() { ?>
<?php if(akina_option('jsdelivr_cdn_test')){ ?>
mashiro_option.jsdelivr_css_src = "<?php echo get_template_directory_uri() ?>/cdn/css/lib.css?<?php echo SAKURA_VERSION.akina_option('cookie_version', ''); ?>";
<?php } else { ?>
mashiro_option.jsdelivr_css_src = "https://cdn.jsdelivr.net/gh/mashirozx/Sakura@<?php echo SAKURA_VERSION; ?>/cdn/css/lib.min.css";
mashiro_option.jsdelivr_css_src = <?php echo (SAKURA_STATIC_ASSETS_HOST);?>"gh/mashirozx/Sakura@<?php echo SAKURA_VERSION; ?>/cdn/css/lib.min.css";
<?php } ?>
<?php if (akina_option('aplayer_server') != 'off'): ?>
mashiro_option.float_player_on = true;
Expand Down
16 changes: 8 additions & 8 deletions inc/theme_plus.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ function the_headPattern(){
if(!is_home() && $full_image_url) : ?>
<div class="pattern-center-blank"></div>
<div class="pattern-center <?php if(is_single()){echo $center;} ?>">
<div class="pattern-attachment-img lazyload" style="background-image: url(https://cdn.jsdelivr.net/gh/moezx/[email protected]/img/svg/loader/orange.progress-bar-stripe-loader.svg)" data-src="<?php echo $full_image_url; ?>"> </div>
<div class="pattern-attachment-img lazyload" style="background-image: url(<?php echo (SAKURA_STATIC_ASSETS_HOST);?>gh/mashirozx/sakura@static/img/svg/loader/orange.progress-bar-stripe-loader.svg)" data-src="<?php echo $full_image_url; ?>"> </div>
<header class="pattern-header <?php if(is_single()){echo $header;} ?>"><?php echo $t; ?></header>
</div>
<?php else :
Expand Down Expand Up @@ -358,13 +358,13 @@ function the_video_headPattern_hls(){
$t .= the_title( '<h1 class="entry-title">', '</h1>', false);
}elseif(is_archive()){
$full_image_url = z_taxonomy_image_url();
$thubm_image_url = 'https://cdn.jsdelivr.net/gh/moezx/[email protected]/img/svg/loader/orange.progress-bar-stripe-loader.svg';
$thubm_image_url = SAKURA_STATIC_ASSETS_HOST.'gh/mashirozx/sakura@static/img/svg/loader/orange.progress-bar-stripe-loader.svg';
$des = category_description() ? category_description() : ''; // 描述
$t .= '<h1 class="cat-title">'.single_cat_title('', false).'</h1>';
$t .= ' <span class="cat-des">'.$des.'</span>';
}elseif(is_search()){
$full_image_url = get_random_bg_url();
$thubm_image_url = 'https://cdn.jsdelivr.net/gh/moezx/[email protected]/img/svg/loader/orange.progress-bar-stripe-loader.svg';
$thubm_image_url = SAKURA_STATIC_ASSETS_HOST.'gh/mashirozx/sakura@static/img/svg/loader/orange.progress-bar-stripe-loader.svg';
$t .= '<h1 class="entry-title search-title"> '.sprintf( __( "Search results for \" %s \"","sakura" ), get_search_query()) ./*关于“ '.get_search_query().' ”的搜索结果*/'</h1>';
}
$thubm_image_url = $thubm_image_url . "#lazyload-blur";
Expand Down Expand Up @@ -426,13 +426,13 @@ function the_video_headPattern_normal(){
$t .= the_title( '<h1 class="entry-title">', '</h1>', false);
}elseif(is_archive()){
$full_image_url = z_taxonomy_image_url();
$thubm_image_url = 'https://cdn.jsdelivr.net/gh/moezx/[email protected]/img/svg/loader/orange.progress-bar-stripe-loader.svg';
$thubm_image_url = SAKURA_STATIC_ASSETS_HOST.'gh/mashirozx/sakura@static/img/svg/loader/orange.progress-bar-stripe-loader.svg';
$des = category_description() ? category_description() : ''; // 描述
$t .= '<h1 class="cat-title">'.single_cat_title('', false).'</h1>';
$t .= ' <span class="cat-des">'.$des.'</span>';
}elseif(is_search()){
$full_image_url = get_random_bg_url();
$thubm_image_url = 'https://cdn.jsdelivr.net/gh/moezx/[email protected]/img/svg/loader/orange.progress-bar-stripe-loader.svg';
$thubm_image_url = SAKURA_STATIC_ASSETS_HOST.'gh/mashirozx/sakura@static/img/svg/loader/orange.progress-bar-stripe-loader.svg';
$t .= '<h1 class="entry-title search-title"> '.sprintf( __( "Search results for \" %s \"","sakura" ), get_search_query()) ./*关于“ '.get_search_query().' ”的搜索结果*/'</h1>';
}
$thubm_image_url = $thubm_image_url . "#lazyload-blur";
Expand Down Expand Up @@ -485,7 +485,7 @@ function header_user_menu(){
</div>
<?php
}else{
$ava = 'https://cdn.jsdelivr.net/gh/moezx/[email protected]/img/Sakura/images/none.png';
$ava = SAKURA_STATIC_ASSETS_HOST.'gh/mashirozx/sakura@static/img/Sakura/images/none.png';
$login_url = akina_option('exlogin_url') ? akina_option('exlogin_url') : get_bloginfo('url').'/wp-login.php';
?>
<div class="header-user-avatar">
Expand Down Expand Up @@ -933,7 +933,7 @@ function siren_get_os($ua){
function siren_get_useragent($ua){
if(akina_option('open_useragent')){
// $imgurl = get_bloginfo('template_directory') . '/images/ua/';
$imgurl = 'https://cdn.jsdelivr.net/gh/moezx/[email protected]/img/Sakura/images/ua/svg/';
$imgurl = SAKURA_STATIC_ASSETS_HOST.'gh/mashirozx/sakura@static/img/Sakura/images/ua/svg/';
$browser = siren_get_browsers($ua);
$os = siren_get_os($ua);
return '&nbsp;&nbsp;<span class="useragent-info">( <img src="'. $imgurl.$browser[1] .'.svg">&nbsp;'. $browser[0] .'&nbsp;&nbsp;<img src="'. $imgurl.$os[1] .'.svg">&nbsp;'. $os[0] .' )</span>';
Expand All @@ -944,7 +944,7 @@ function siren_get_useragent($ua){
// UA 显示移动定制
function mobile_get_useragent_icon($ua){
if(akina_option('open_useragent')){
$imgurl = 'https://cdn.jsdelivr.net/gh/moezx/[email protected]/img/Sakura/images/ua/svg/';
$imgurl = SAKURA_STATIC_ASSETS_HOST.'gh/mashirozx/sakura@static/img/Sakura/images/ua/svg/';
$browser = siren_get_browsers($ua);
$os = siren_get_os($ua);
return '<span class="useragent-info-m">( <img src="'. $imgurl.$browser[1] .'.svg">&nbsp;&nbsp;<img src="'. $imgurl.$os[1] .'.svg"> )</span>';
Expand Down
Binary file modified languages/zh_CN.mo
Binary file not shown.
101 changes: 72 additions & 29 deletions languages/zh_CN.po
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-08-06 17:39+0800\n"
"PO-Revision-Date: 2020-08-06 17:42+0800\n"
"POT-Creation-Date: 2022-07-08 23:01+0800\n"
"PO-Revision-Date: 2022-07-08 23:03+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.3.1\n"
"X-Poedit-Basepath: ..\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.1.1\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
"X-Poedit-WPHeader: style.css\n"
"X-Poedit-SourceCharset: UTF-8\n"
Expand Down Expand Up @@ -138,80 +138,80 @@ msgstr "搜索"
msgid "Widgets"
msgstr "小工具"

#: functions.php:51
#: functions.php:53
msgid "Nav Menus"
msgstr "导航菜单"

#: functions.php:423 inc/theme_plus.php:186 layouts/authorprofile.php:11
#: functions.php:455 inc/theme_plus.php:186 layouts/authorprofile.php:11
#: options.php:121
msgid "Author"
msgstr "作者"

#: functions.php:423
#: functions.php:455
msgid "Blogger"
msgstr "博主"

#: functions.php:427
#: functions.php:459
msgid "Location"
msgstr "来自"

#: functions.php:431
#: functions.php:464
msgid "Private"
msgstr "私密"

#: functions.php:433
#: functions.php:466
msgid "Yes"
msgstr "是"

#: functions.php:435
#: functions.php:468
msgid "No"
msgstr "否"

#: functions.php:438
#: functions.php:471
msgid "Edit"
msgstr "编辑"

#: functions.php:527
#: functions.php:560
msgid ""
"Please install pulgin <a href=\"https://wordpress.org/plugins/wp-statistics/"
"\" target=\"_blank\">WP-Statistics</a>"
msgstr ""
"请安装插件 <a href=\"https://wordpress.org/plugins/wp-statistics/\" target="
"\"_blank\">WP-Statistics</a>"

#: functions.php:577
#: functions.php:610
msgid "This guy is so lazy ╮(╯▽╰)╭"
msgstr "这家伙好懒╮(╯▽╰)╭"

#: functions.php:1335
#: functions.php:1368
msgid "All expand/collapse"
msgstr "全部展开/收缩"

#: functions.php:1356 options.php:980
#: functions.php:1392 options.php:980
msgid " "
msgstr ""

#: functions.php:1360
#: functions.php:1396
msgid " post(s)"
msgstr " 篇文章"

#: functions.php:1383 functions.php:1386 inc/theme_plus.php:478
#: functions.php:1419 functions.php:1422 inc/theme_plus.php:478
msgid "Dashboard"
msgstr "管理中心"

#: functions.php:1612
#: functions.php:1648
msgid "<b>ERROR</b>: This email domain (<b>@"
msgstr ""

#: functions.php:1717
#: functions.php:1753
msgid "QQ"
msgstr ""

#: functions.php:1779
#: functions.php:1815
msgid "Sidebar"
msgstr "侧栏"

#: functions.php:1892
#: functions.php:1928
msgid ""
"<b> For a better experience, please do not set <a href=\"/wp-admin/options-"
"permalink.php\"> permalink </a> as plain. To do this, you may need to "
Expand Down Expand Up @@ -1003,6 +1003,7 @@ msgstr "文章页"
msgid "Post style"
msgstr "文章样式"

#. Theme Name of the plugin/theme
#: options.php:577
msgid "Sakura"
msgstr "默认样式"
Expand Down Expand Up @@ -1825,6 +1826,26 @@ msgstr ""
"用于发送系统邮件,在用户的邮箱中显示的发件人地址,不要使用中文,默认系统邮件"
"地址为 bibi@你的域名"

#: options.php:1239
msgid "Statics Source"
msgstr "资源来源"

#: options.php:1244
msgid "JsDelivr"
msgstr "JsDelivr"

#: options.php:1245
msgid "Other"
msgstr "其他"

#: options.php:1248
msgid "Self Source"
msgstr "自设源"

#: options.php:1249
msgid "Set if self other source is selected"
msgstr "如果选择了\"其他\",请设置此项"

#: search.php:19
#, php-format
msgid "search result: %s"
Expand Down Expand Up @@ -1952,14 +1973,42 @@ msgstr "注册成功!正在跳转......"
msgid "Registration is not open yet."
msgstr "暂未开放注册。"

#. Theme URI of the plugin/theme
msgid "https://github.com/mashirozx/Sakura/"
msgstr ""

#. Description of the plugin/theme
#, fuzzy
#| msgid "A branch of theme Akina"
msgid "A wonderful branch of theme Akina"
msgstr "Akina主题分支(原版地址 http://www.akina.pw/themeakina)"

#. Author of the plugin/theme
msgid "Mashiro, Spirit, Louie, Fuzzz"
msgstr ""

#. Author URI of the plugin/theme
msgid "http://2heng.xin"
msgstr ""

#. Template Name of the plugin/theme
#, fuzzy
#| msgid "Search"
msgid "archive"
msgstr "搜索"

#. Template Name of the plugin/theme
msgid "links"
msgstr ""

#~ msgid "Transparent"
#~ msgstr "全透明"

#~ msgid "Transparency 0.1"
#~ msgstr "透明度0.1"

#~ msgid "Transparency 0.2"
#~ msgstr "明度0.2"
#~ msgstr "透明度0.2"

#~ msgid "Transparency 0.3"
#~ msgstr "透明度0.3"
Expand Down Expand Up @@ -1991,9 +2040,6 @@ msgstr "暂未开放注册。"
#~ msgid "Cover CDN"
#~ msgstr "封面图图片库"

#~ msgid "Jsdelivr CDN"
#~ msgstr "随机图片"

#~ msgid "Default article feature image"
#~ msgstr "默认文章特色图"

Expand Down Expand Up @@ -2022,9 +2068,6 @@ msgstr "暂未开放注册。"
#~ msgid " Previous"
#~ msgstr " 上一页"

#~ msgid "A branch of theme Akina"
#~ msgstr "Akina主题分支(原版地址 http://www.akina.pw/themeakina)"

#, php-format
#~ msgid "第 %s 页"
#~ msgstr "第 %s 页"
Expand Down
Binary file modified languages/zh_TW.mo
Binary file not shown.
Loading