commit
ccb0b6f5da
433
functions.php
433
functions.php
File diff suppressed because it is too large
Load Diff
|
@ -78,7 +78,6 @@ window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</head>
|
</head>
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
<?php if(get_template_directory_uri() != get_site_url().'/wp-content/themes/Sakura') echo '<div style="position:fixed;height:100%;width:100%;top:0;left:0;font-size:20px;z-index:999999;background-color: #fff;">Plz rename the theme folder name as <span style="color:red">Sakura</span>!<br>请将主题文件夹名改为 <span style="color:red">Sakura</span>!</div>'; ?>
|
|
||||||
<div class="scrollbar" id="bar"></div>
|
<div class="scrollbar" id="bar"></div>
|
||||||
<section id="main-container">
|
<section id="main-container">
|
||||||
<?php
|
<?php
|
||||||
|
|
38
inc/api.php
38
inc/api.php
|
@ -325,7 +325,15 @@ EOS;
|
||||||
* @rest api接口路径:https://sakura.2heng.xin/wp-json/sakura/v1/image/cover
|
* @rest api接口路径:https://sakura.2heng.xin/wp-json/sakura/v1/image/cover
|
||||||
*/
|
*/
|
||||||
function cover_gallery() {
|
function cover_gallery() {
|
||||||
global $wpdb,$sakura_image_array;
|
if(akina_option('cover_cdn_options')=="type_2"){
|
||||||
|
$img_array = glob(get_template_directory() . "/manifest/gallary/*.{gif,jpg,png}",GLOB_BRACE);
|
||||||
|
$img = array_rand($img_array);
|
||||||
|
$imgurl = trim($img_array[$img]);
|
||||||
|
$imgurl = str_replace(get_template_directory(), get_template_directory_uri(), $imgurl);
|
||||||
|
}elseif(akina_option('cover_cdn_options')=="type_3"){
|
||||||
|
$imgurl = akina_option('cover_cdn');
|
||||||
|
}else{
|
||||||
|
global $sakura_image_array;
|
||||||
$img_array = json_decode($sakura_image_array, true);
|
$img_array = json_decode($sakura_image_array, true);
|
||||||
$img = array_rand($img_array);
|
$img = array_rand($img_array);
|
||||||
$img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory_uri();
|
$img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory_uri();
|
||||||
|
@ -334,6 +342,7 @@ function cover_gallery() {
|
||||||
} else {
|
} else {
|
||||||
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["jpeg"][0];
|
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["jpeg"][0];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$data = array('cover image');
|
$data = array('cover image');
|
||||||
$response = new WP_REST_Response($data);
|
$response = new WP_REST_Response($data);
|
||||||
$response->set_status(302);
|
$response->set_status(302);
|
||||||
|
@ -346,20 +355,7 @@ function cover_gallery() {
|
||||||
* @rest api接口路径:https://sakura.2heng.xin/wp-json/sakura/v1/image/feature
|
* @rest api接口路径:https://sakura.2heng.xin/wp-json/sakura/v1/image/feature
|
||||||
*/
|
*/
|
||||||
function feature_gallery() {
|
function feature_gallery() {
|
||||||
global $wpdb,$sakura_image_array;
|
return cover_gallery();
|
||||||
$img_array = json_decode($sakura_image_array, true);
|
|
||||||
$img = array_rand($img_array);
|
|
||||||
$img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory_uri();
|
|
||||||
if(strpos($_SERVER['HTTP_ACCEPT'], 'image/webp')) {
|
|
||||||
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["webp"][0];
|
|
||||||
} else {
|
|
||||||
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["jpeg"][0];
|
|
||||||
}
|
|
||||||
$data = array('cover image');
|
|
||||||
$response = new WP_REST_Response($data);
|
|
||||||
$response->set_status(302);
|
|
||||||
$response->header('Location', $imgurl);
|
|
||||||
return $response;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -367,9 +363,10 @@ function feature_gallery() {
|
||||||
* @rest api接口路径:https://sakura.2heng.xin/wp-json/sakura/v1/database/update
|
* @rest api接口路径:https://sakura.2heng.xin/wp-json/sakura/v1/database/update
|
||||||
*/
|
*/
|
||||||
function update_database() {
|
function update_database() {
|
||||||
|
if(akina_option('cover_cdn_options')=="type_1"){
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
$sakura_table_name = $wpdb->base_prefix.'sakura';
|
$sakura_table_name = $wpdb->base_prefix.'sakura';
|
||||||
$img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory_uri();
|
$img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory();
|
||||||
$manifest = file_get_contents($img_domain . "/manifest/manifest.json");
|
$manifest = file_get_contents($img_domain . "/manifest/manifest.json");
|
||||||
if($manifest) {
|
if($manifest) {
|
||||||
$manifest = array(
|
$manifest = array(
|
||||||
|
@ -381,16 +378,19 @@ function update_database() {
|
||||||
"mate_value" => date("Y-m-d H:i:s",time())
|
"mate_value" => date("Y-m-d H:i:s",time())
|
||||||
);
|
);
|
||||||
|
|
||||||
$wpdb->query("DELETE FROM `wp_sakura` WHERE `mate_key` ='manifest_json'");
|
$wpdb->query("DELETE FROM $sakura_table_name WHERE `mate_key` ='manifest_json'");
|
||||||
$wpdb->query("DELETE FROM `wp_sakura` WHERE `mate_key` ='json_time'");
|
$wpdb->query("DELETE FROM $sakura_table_name WHERE `mate_key` ='json_time'");
|
||||||
$wpdb->insert($sakura_table_name,$manifest);
|
$wpdb->insert($sakura_table_name,$manifest);
|
||||||
$wpdb->insert($sakura_table_name,$time);
|
$wpdb->insert($sakura_table_name,$time);
|
||||||
$output = "manifest.json has been stored into database.";
|
$output = "manifest.json has been stored into database.";
|
||||||
}else{
|
}else{
|
||||||
$output = "manifest.json not found, please ensure your url is corrent.";
|
$output = "manifest.json not found, please ensure your url ($img_domain) is corrent.";
|
||||||
}
|
}
|
||||||
$result = new WP_REST_Response($output, 200);
|
$result = new WP_REST_Response($output, 200);
|
||||||
return $result;
|
return $result;
|
||||||
|
}else{
|
||||||
|
return new WP_REST_Response("Invalid access", 200);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -753,7 +753,7 @@ if (mashiro_option.float_player_on) {
|
||||||
autoplay: !1,
|
autoplay: !1,
|
||||||
mutex: !0,
|
mutex: !0,
|
||||||
lrcType: 3,
|
lrcType: 3,
|
||||||
listFolded: !1,
|
listFolded: 1,
|
||||||
preload: 'auto',
|
preload: 'auto',
|
||||||
theme: '#2980b9',
|
theme: '#2980b9',
|
||||||
loop: 'all',
|
loop: 'all',
|
||||||
|
@ -789,23 +789,13 @@ if (mashiro_option.float_player_on) {
|
||||||
lrcTag = 2;
|
lrcTag = 2;
|
||||||
});
|
});
|
||||||
var apSwitchTag = 0;
|
var apSwitchTag = 0;
|
||||||
var aplayerlist = $(".aplayer-list");
|
|
||||||
aplayerlist.removeClass("aplayer-list-hide").css({
|
|
||||||
maxHeight: '0px'
|
|
||||||
});
|
|
||||||
$(".aplayer.aplayer-fixed .aplayer-body").addClass("ap-hover");
|
$(".aplayer.aplayer-fixed .aplayer-body").addClass("ap-hover");
|
||||||
$(".aplayer-miniswitcher").click(function () {
|
$(".aplayer-miniswitcher").click(function () {
|
||||||
if (apSwitchTag == 0) {
|
if (apSwitchTag == 0) {
|
||||||
aplayerlist.removeClass("aplayer-list-hide").animate({
|
|
||||||
maxHeight: '250px'
|
|
||||||
});
|
|
||||||
$(".aplayer.aplayer-fixed .aplayer-body").removeClass("ap-hover");
|
$(".aplayer.aplayer-fixed .aplayer-body").removeClass("ap-hover");
|
||||||
$("#secondary").addClass("active");
|
$("#secondary").addClass("active");
|
||||||
apSwitchTag = 1;
|
apSwitchTag = 1;
|
||||||
} else {
|
} else {
|
||||||
aplayerlist.css({
|
|
||||||
maxHeight: '0px'
|
|
||||||
});
|
|
||||||
$(".aplayer.aplayer-fixed .aplayer-body").addClass("ap-hover");
|
$(".aplayer.aplayer-fixed .aplayer-body").addClass("ap-hover");
|
||||||
$("#secondary").removeClass("active");
|
$("#secondary").removeClass("active");
|
||||||
apSwitchTag = 0;
|
apSwitchTag = 0;
|
||||||
|
@ -999,7 +989,9 @@ function activate_widget(){
|
||||||
$("#secondary").remove();
|
$("#secondary").remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setTimeout(function () {
|
||||||
activate_widget();
|
activate_widget();
|
||||||
|
}, 100);
|
||||||
|
|
||||||
mashiro_global.ini.normalize();
|
mashiro_global.ini.normalize();
|
||||||
loadCSS(mashiro_option.jsdelivr_css_src);
|
loadCSS(mashiro_option.jsdelivr_css_src);
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -117,9 +117,6 @@
|
||||||
<?php if (akina_option('facebook')){ ?>
|
<?php if (akina_option('facebook')){ ?>
|
||||||
<li><a href="<?php echo akina_option('facebook', ''); ?>" target="_blank" class="social-wangyiyun" title="Facebook"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/sns/facebook.png"/></a></li>
|
<li><a href="<?php echo akina_option('facebook', ''); ?>" target="_blank" class="social-wangyiyun" title="Facebook"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/sns/facebook.png"/></a></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (akina_option('googleplus')){ ?>
|
|
||||||
<li><a href="<?php echo akina_option('googleplus', ''); ?>" target="_blank" class="social-wangyiyun" title="Google+"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/sns/googleplus.png"/></a></li>
|
|
||||||
<?php } ?>
|
|
||||||
<?php if (akina_option('jianshu')){ ?>
|
<?php if (akina_option('jianshu')){ ?>
|
||||||
<li><a href="<?php echo akina_option('jianshu', ''); ?>" target="_blank" class="social-wangyiyun" title="Jianshu"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/sns/jianshu.png"/></a></li>
|
<li><a href="<?php echo akina_option('jianshu', ''); ?>" target="_blank" class="social-wangyiyun" title="Jianshu"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/sns/jianshu.png"/></a></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
107
options.php
107
options.php
|
@ -5,9 +5,8 @@
|
||||||
* If the identifier changes, it'll appear as if the options have been reset.
|
* If the identifier changes, it'll appear as if the options have been reset.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
function optionsframework_option_name()
|
||||||
|
{
|
||||||
function optionsframework_option_name() {
|
|
||||||
|
|
||||||
// 从样式表获取主题名称
|
// 从样式表获取主题名称
|
||||||
$themename = wp_get_theme();
|
$themename = wp_get_theme();
|
||||||
|
@ -28,7 +27,8 @@ function optionsframework_option_name() {
|
||||||
* Frame from: https://github.com/devinsays/options-framework-plugin/
|
* Frame from: https://github.com/devinsays/options-framework-plugin/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function optionsframework_options() {
|
function optionsframework_options()
|
||||||
|
{
|
||||||
// 测试数据
|
// 测试数据
|
||||||
$test_array = array(
|
$test_array = array(
|
||||||
'one' => __('1', 'sakura'),
|
'one' => __('1', 'sakura'),
|
||||||
|
@ -37,23 +37,22 @@ function optionsframework_options() {
|
||||||
'four' => __('4', 'sakura'),
|
'four' => __('4', 'sakura'),
|
||||||
'five' => __('5', 'sakura'),
|
'five' => __('5', 'sakura'),
|
||||||
'six' => __('6', 'sakura'),
|
'six' => __('6', 'sakura'),
|
||||||
'seven' => __('7', 'sakura')
|
'seven' => __('7', 'sakura'),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// 复选框数组
|
// 复选框数组
|
||||||
$multicheck_array = array(
|
$multicheck_array = array(
|
||||||
'one' => __('1', 'sakura'),
|
'one' => __('1', 'sakura'),
|
||||||
'two' => __('2', 'sakura'),
|
'two' => __('2', 'sakura'),
|
||||||
'three' => __('3', 'sakura'),
|
'three' => __('3', 'sakura'),
|
||||||
'four' => __('4', 'sakura'),
|
'four' => __('4', 'sakura'),
|
||||||
'five' => __('5', 'sakura')
|
'five' => __('5', 'sakura'),
|
||||||
);
|
);
|
||||||
|
|
||||||
// 复选框默认值
|
// 复选框默认值
|
||||||
$multicheck_defaults = array(
|
$multicheck_defaults = array(
|
||||||
'one' => '1',
|
'one' => '1',
|
||||||
'five' => '1'
|
'five' => '1',
|
||||||
);
|
);
|
||||||
|
|
||||||
// 背景默认值
|
// 背景默认值
|
||||||
|
@ -76,7 +75,7 @@ function optionsframework_options() {
|
||||||
'sizes' => array('6', '12', '14', '16', '20'),
|
'sizes' => array('6', '12', '14', '16', '20'),
|
||||||
'faces' => array('Helvetica Neue' => 'Helvetica Neue', 'Arial' => 'Arial'),
|
'faces' => array('Helvetica Neue' => 'Helvetica Neue', 'Arial' => 'Arial'),
|
||||||
'styles' => array('normal' => '普通', 'bold' => '粗体'),
|
'styles' => array('normal' => '普通', 'bold' => '粗体'),
|
||||||
'color' => false
|
'color' => false,
|
||||||
);
|
);
|
||||||
|
|
||||||
// 将所有分类(categories)加入数组
|
// 将所有分类(categories)加入数组
|
||||||
|
@ -93,7 +92,6 @@ function optionsframework_options() {
|
||||||
$options_tags[$tag->term_id] = $tag->name;
|
$options_tags[$tag->term_id] = $tag->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 将所有页面(pages)加入数组
|
// 将所有页面(pages)加入数组
|
||||||
$options_pages = array();
|
$options_pages = array();
|
||||||
$options_pages_obj = get_pages('sort_column=post_parent,menu_order');
|
$options_pages_obj = get_pages('sort_column=post_parent,menu_order');
|
||||||
|
@ -131,7 +129,7 @@ function optionsframework_options() {
|
||||||
'id' => 'theme_skin',
|
'id' => 'theme_skin',
|
||||||
'std' => "#FE9600",
|
'std' => "#FE9600",
|
||||||
'desc' => __('Custom theme color', 'sakura'), /*自定义主题颜色*/
|
'desc' => __('Custom theme color', 'sakura'), /*自定义主题颜色*/
|
||||||
'type' => "color"
|
'type' => "color",
|
||||||
);
|
);
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -229,7 +227,7 @@ function optionsframework_options() {
|
||||||
'type' => "radio",
|
'type' => "radio",
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'yes' => __('Open', 'sakura'),
|
'yes' => __('Open', 'sakura'),
|
||||||
'no' => __('Close', 'sakura')
|
'no' => __('Close', 'sakura'),
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -239,7 +237,7 @@ function optionsframework_options() {
|
||||||
'type' => "radio",
|
'type' => "radio",
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'standard' => __('Standard', 'sakura'), /*标准*/
|
'standard' => __('Standard', 'sakura'), /*标准*/
|
||||||
'imageflow' => __('Graphic', 'sakura')/*图文*/
|
'imageflow' => __('Graphic', 'sakura'), /*图文*/
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -249,7 +247,7 @@ function optionsframework_options() {
|
||||||
'type' => "radio",
|
'type' => "radio",
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'round' => __('Round', 'sakura'), /*圆形*/
|
'round' => __('Round', 'sakura'), /*圆形*/
|
||||||
'square' => __('Square', 'sakura')/*方形*/
|
'square' => __('Square', 'sakura'), /*方形*/
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -260,7 +258,7 @@ function optionsframework_options() {
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'left' => __('Left', 'sakura'), /*向左对齐*/
|
'left' => __('Left', 'sakura'), /*向左对齐*/
|
||||||
'right' => __('Right', 'sakura'), /*向右对齐*/
|
'right' => __('Right', 'sakura'), /*向右对齐*/
|
||||||
'alternate' => __('Alternate', 'sakura')/*左右交替*/
|
'alternate' => __('Alternate', 'sakura'), /*左右交替*/
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -270,7 +268,7 @@ function optionsframework_options() {
|
||||||
'type' => "radio",
|
'type' => "radio",
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'yes' => __('Open', 'sakura'), /*开启*/
|
'yes' => __('Open', 'sakura'), /*开启*/
|
||||||
'no' => __('Close', 'sakura')/*关闭*/
|
'no' => __('Close', 'sakura'), /*关闭*/
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -287,7 +285,7 @@ function optionsframework_options() {
|
||||||
'type' => "radio",
|
'type' => "radio",
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'ajax' => __('Ajax load', 'sakura'), /*ajax加载*/
|
'ajax' => __('Ajax load', 'sakura'), /*ajax加载*/
|
||||||
'np' => __('Previous and next page', 'sakura')/*上一页和下一页*/
|
'np' => __('Previous and next page', 'sakura'), /*上一页和下一页*/
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -346,7 +344,6 @@ function optionsframework_options() {
|
||||||
'std' => '',
|
'std' => '',
|
||||||
'type' => 'textarea');
|
'type' => 'textarea');
|
||||||
|
|
||||||
|
|
||||||
//第一屏
|
//第一屏
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('First screen', 'sakura'), /*第一屏*/
|
'name' => __('First screen', 'sakura'), /*第一屏*/
|
||||||
|
@ -373,9 +370,29 @@ function optionsframework_options() {
|
||||||
'type' => "radio",
|
'type' => "radio",
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'v2' => __('Merge with signature', 'sakura'), /*与签名合并*/
|
'v2' => __('Merge with signature', 'sakura'), /*与签名合并*/
|
||||||
'v1' => __('Independent line', 'sakura')/*独立成行*/
|
'v1' => __('Independent line', 'sakura'), /*独立成行*/
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$options[] = array(
|
||||||
|
'name' => __('Cover manifest', 'sakura'), /*封面图片库选项*/
|
||||||
|
'desc' => __('Select how to call the cover random image', 'sakura'), /*选择封面随机图的调用方式*/
|
||||||
|
'id' => 'cover_cdn_options',
|
||||||
|
'std' => "type_2",
|
||||||
|
'type' => "select",
|
||||||
|
'options' => array(
|
||||||
|
'type_1' => __('webp images (optimization)', 'sakura'), /*webp优化随机图*/
|
||||||
|
'type_2' => __('built-in api (default)', 'sakura'), /*内置原图随机图*/
|
||||||
|
'type_3' => __('custom api (advanced)', 'sakura'), /*外部随机图API*/
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$options[] = array(
|
||||||
|
'name' => __('Cover images url', 'sakura'), /*图片库url*/
|
||||||
|
'desc' => sprintf(__('Fill in the manifest path for random picture display, please refer to <a href = "https: //github.com/mashirozx/Sakura/wiki/options">Wiki </a>. If you select webp images above, click <a href = "%s">here</a> to update manifest', 'sakura'), rest_url('sakura/v1/database/update')), /*填写 manifest 路径,更多信息请参考<a href="https://github.com/mashirozx/Sakura/wiki/options">Wiki</a>,,如果你在上面选择了webp优化,点击<a href = "%s">这里</a>更新 manifest*/
|
||||||
|
'id' => 'cover_cdn',
|
||||||
|
'std' => 'https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3',
|
||||||
|
'type' => 'text');
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('full-screen display', 'sakura'), /*全屏显示*/
|
'name' => __('full-screen display', 'sakura'), /*全屏显示*/
|
||||||
'desc' => __('Default on, check off', 'sakura'), /*默认开启,勾选关闭*/
|
'desc' => __('Default on, check off', 'sakura'), /*默认开启,勾选关闭*/
|
||||||
|
@ -421,7 +438,7 @@ function optionsframework_options() {
|
||||||
'filter-undertint' => __('Undertint', 'sakura'), /*浅色*/
|
'filter-undertint' => __('Undertint', 'sakura'), /*浅色*/
|
||||||
'filter-dim' => __('Dim', 'sakura'), /*暗淡*/
|
'filter-dim' => __('Dim', 'sakura'), /*暗淡*/
|
||||||
'filter-grid' => __('Grid', 'sakura'), /*网格*/
|
'filter-grid' => __('Grid', 'sakura'), /*网格*/
|
||||||
'filter-dot' => __('Dot', 'sakura')/*点点*/
|
'filter-dot' => __('Dot', 'sakura'), /*点点*/
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -438,7 +455,7 @@ function optionsframework_options() {
|
||||||
'type' => "radio",
|
'type' => "radio",
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'left_and_right' => __('Alternate left and right', 'sakura'), /*左右交替*/
|
'left_and_right' => __('Alternate left and right', 'sakura'), /*左右交替*/
|
||||||
'bottom_to_top' => __('From bottom to top', 'sakura')/*从下往上*/
|
'bottom_to_top' => __('From bottom to top', 'sakura'), /*从下往上*/
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -533,7 +550,6 @@ function optionsframework_options() {
|
||||||
'std' => '#',
|
'std' => '#',
|
||||||
'type' => 'text');
|
'type' => 'text');
|
||||||
|
|
||||||
|
|
||||||
//文章页
|
//文章页
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('Post page', 'sakura'), /*文章页*/
|
'name' => __('Post page', 'sakura'), /*文章页*/
|
||||||
|
@ -556,7 +572,7 @@ function optionsframework_options() {
|
||||||
'type' => "radio",
|
'type' => "radio",
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'yes' => __('Open', 'sakura'), /*开启*/
|
'yes' => __('Open', 'sakura'), /*开启*/
|
||||||
'no' => __('Close', 'sakura')/*关闭*/
|
'no' => __('Close', 'sakura'), /*关闭*/
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -566,7 +582,7 @@ function optionsframework_options() {
|
||||||
'type' => "radio",
|
'type' => "radio",
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'yes' => __('Open', 'sakura'), /*开启*/
|
'yes' => __('Open', 'sakura'), /*开启*/
|
||||||
'no' => __('Close', 'sakura')/*关闭*/
|
'no' => __('Close', 'sakura'), /*关闭*/
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -576,7 +592,7 @@ function optionsframework_options() {
|
||||||
'type' => "radio",
|
'type' => "radio",
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'yes' => __('Open', 'sakura'), /*开启*/
|
'yes' => __('Open', 'sakura'), /*开启*/
|
||||||
'no' => __('Close', 'sakura')/*关闭*/
|
'no' => __('Close', 'sakura'), /*关闭*/
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -586,7 +602,7 @@ function optionsframework_options() {
|
||||||
'type' => "radio",
|
'type' => "radio",
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'yes' => __('Open', 'sakura'), /*开启*/
|
'yes' => __('Open', 'sakura'), /*开启*/
|
||||||
'no' => __('Close', 'sakura')/*关闭*/
|
'no' => __('Close', 'sakura'), /*关闭*/
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -601,7 +617,6 @@ function optionsframework_options() {
|
||||||
'id' => 'wechat_code',
|
'id' => 'wechat_code',
|
||||||
'type' => 'upload');
|
'type' => 'upload');
|
||||||
|
|
||||||
|
|
||||||
//社交选项
|
//社交选项
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('Social network', 'sakura'), /*社交网络*/
|
'name' => __('Social network', 'sakura'), /*社交网络*/
|
||||||
|
@ -689,14 +704,7 @@ function optionsframework_options() {
|
||||||
'id' => 'facebook',
|
'id' => 'facebook',
|
||||||
'std' => '',
|
'std' => '',
|
||||||
'type' => 'text');
|
'type' => 'text');
|
||||||
/*
|
|
||||||
$options[] = array(
|
|
||||||
'name' => __('Google+', 'sakura'),
|
|
||||||
'desc' => __('G+ address', 'sakura'),
|
|
||||||
'id' => 'googleplus',
|
|
||||||
'std' => '',
|
|
||||||
'type' => 'text');
|
|
||||||
*/
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('Jianshu', 'sakura'), /*简书*/
|
'name' => __('Jianshu', 'sakura'), /*简书*/
|
||||||
'desc' => __('Jianshu address', 'sakura'), /*简书地址*/
|
'desc' => __('Jianshu address', 'sakura'), /*简书地址*/
|
||||||
|
@ -750,7 +758,7 @@ function optionsframework_options() {
|
||||||
'id' => 'dash_scheme_color_a',
|
'id' => 'dash_scheme_color_a',
|
||||||
'std' => "#c6742b",
|
'std' => "#c6742b",
|
||||||
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions which are used to give the user a feel for the theme.', 'sakura'),
|
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions which are used to give the user a feel for the theme.', 'sakura'),
|
||||||
'type' => "color"
|
'type' => "color",
|
||||||
);
|
);
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -758,7 +766,7 @@ function optionsframework_options() {
|
||||||
'id' => 'dash_scheme_color_b',
|
'id' => 'dash_scheme_color_b',
|
||||||
'std' => "#d88e4c",
|
'std' => "#d88e4c",
|
||||||
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions which are used to give the user a feel for the theme.', 'sakura'),
|
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions which are used to give the user a feel for the theme.', 'sakura'),
|
||||||
'type' => "color"
|
'type' => "color",
|
||||||
);
|
);
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -766,7 +774,7 @@ function optionsframework_options() {
|
||||||
'id' => 'dash_scheme_color_c',
|
'id' => 'dash_scheme_color_c',
|
||||||
'std' => "#695644",
|
'std' => "#695644",
|
||||||
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions which are used to give the user a feel for the theme.', 'sakura'),
|
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions which are used to give the user a feel for the theme.', 'sakura'),
|
||||||
'type' => "color"
|
'type' => "color",
|
||||||
);
|
);
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -774,7 +782,7 @@ function optionsframework_options() {
|
||||||
'id' => 'dash_scheme_color_d',
|
'id' => 'dash_scheme_color_d',
|
||||||
'std' => "#a19780",
|
'std' => "#a19780",
|
||||||
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions which are used to give the user a feel for the theme.', 'sakura'),
|
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions which are used to give the user a feel for the theme.', 'sakura'),
|
||||||
'type' => "color"
|
'type' => "color",
|
||||||
);
|
);
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -782,7 +790,7 @@ function optionsframework_options() {
|
||||||
'id' => 'dash_scheme_color_base',
|
'id' => 'dash_scheme_color_base',
|
||||||
'std' => "#e5f8ff",
|
'std' => "#e5f8ff",
|
||||||
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions used to color any SVG icons.', 'sakura'),
|
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions used to color any SVG icons.', 'sakura'),
|
||||||
'type' => "color"
|
'type' => "color",
|
||||||
);
|
);
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -790,7 +798,7 @@ function optionsframework_options() {
|
||||||
'id' => 'dash_scheme_color_focus',
|
'id' => 'dash_scheme_color_focus',
|
||||||
'std' => "#fff",
|
'std' => "#fff",
|
||||||
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions used to color any SVG icons.', 'sakura'),
|
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions used to color any SVG icons.', 'sakura'),
|
||||||
'type' => "color"
|
'type' => "color",
|
||||||
);
|
);
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -798,7 +806,7 @@ function optionsframework_options() {
|
||||||
'id' => 'dash_scheme_color_current',
|
'id' => 'dash_scheme_color_current',
|
||||||
'std' => "#fff",
|
'std' => "#fff",
|
||||||
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions used to color any SVG icons.', 'sakura'),
|
'desc' => __('<i>(array) (optional)</i> An array of CSS color definitions used to color any SVG icons.', 'sakura'),
|
||||||
'type' => "color"
|
'type' => "color",
|
||||||
);
|
);
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -875,13 +883,6 @@ function optionsframework_options() {
|
||||||
'std' => '',
|
'std' => '',
|
||||||
'type' => 'text');
|
'type' => 'text');
|
||||||
|
|
||||||
$options[] = array(
|
|
||||||
'name' => __('Cover manifest', 'sakura'),/*封面图片库*/
|
|
||||||
'desc' => sprintf(__('Fill in the manifest path for random picture display, without adding a slash at the end, for example: https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3, please refer to <a href = "https: //github.com/mashirozx/Sakura/wiki/options">Wiki </a>. Click <a href = "%s">here</a> to update manifest', 'sakura'), rest_url('sakura/v1/database/update')),/*填写 manifest 路径 ,用于随机图片展示,最后不用加斜杠,例:https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3 ,更多信息请参考<a href="https://github.com/mashirozx/Sakura/wiki/options">Wiki</a>*/
|
|
||||||
'id' => 'cover_cdn',
|
|
||||||
'std' => 'https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3',
|
|
||||||
'type' => 'text');
|
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('Use the front-end library locally (lib.js、lib.css)', 'sakura'), /*本地调用前端库(lib.js、lib.css)*/
|
'name' => __('Use the front-end library locally (lib.js、lib.css)', 'sakura'), /*本地调用前端库(lib.js、lib.css)*/
|
||||||
'desc' => __('The front-end library don\'t load from jsDelivr, not recommand', 'sakura'), /*前端库不走 jsDelivr,不建议启用*/
|
'desc' => __('The front-end library don\'t load from jsDelivr, not recommand', 'sakura'), /*前端库不走 jsDelivr,不建议启用*/
|
||||||
|
@ -916,8 +917,8 @@ function optionsframework_options() {
|
||||||
'type' => "images",
|
'type' => "images",
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'tag' => 'https://img.shields.io/github/release/mashirozx/Sakura.svg?style=flat-square',
|
'tag' => 'https://img.shields.io/github/release/mashirozx/Sakura.svg?style=flat-square',
|
||||||
'tag2' => 'https://img.shields.io/github/commits-since/mashirozx/Sakura/v'.SAKURA_VERSION.'/dev.svg?style=flat-square'
|
'tag2' => 'https://img.shields.io/github/commits-since/mashirozx/Sakura/v' . SAKURA_VERSION . '/dev.svg?style=flat-square',
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -990,7 +991,7 @@ function optionsframework_options() {
|
||||||
'type' => "radio",
|
'type' => "radio",
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'wp_statistics' => __('WP-Statistics plugin (Professional statistics, can exclude invalid access)', 'sakura'), /*WP-Statistics 插件(专业性统计,可排除无效访问)*/
|
'wp_statistics' => __('WP-Statistics plugin (Professional statistics, can exclude invalid access)', 'sakura'), /*WP-Statistics 插件(专业性统计,可排除无效访问)*/
|
||||||
'theme_build_in' => __('Theme built-in (simple statistics, calculate each page access request)', 'sakura')/*主题内建(简单的统计,计算每一次页面访问请求)*/
|
'theme_build_in' => __('Theme built-in (simple statistics, calculate each page access request)', 'sakura'), /*主题内建(简单的统计,计算每一次页面访问请求)*/
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
@ -1013,7 +1014,7 @@ function optionsframework_options() {
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'imgur' => __('Imgur (https://imgur.com)', 'sakura'),
|
'imgur' => __('Imgur (https://imgur.com)', 'sakura'),
|
||||||
'smms' => __('SM.MS (https://sm.ms)', 'sakura'),
|
'smms' => __('SM.MS (https://sm.ms)', 'sakura'),
|
||||||
'chevereto' => __('Chevereto (https://chevereto.com)', 'sakura')
|
'chevereto' => __('Chevereto (https://chevereto.com)', 'sakura'),
|
||||||
));
|
));
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
|
|
|
@ -5,7 +5,7 @@ Theme URI: https://github.com/mashirozx/Sakura/
|
||||||
Author: Mashiro, Spirit, Louie, Fuzzz
|
Author: Mashiro, Spirit, Louie, Fuzzz
|
||||||
Author URI: http://2heng.xin
|
Author URI: http://2heng.xin
|
||||||
Description: A wonderful branch of theme Akina
|
Description: A wonderful branch of theme Akina
|
||||||
Version: 3.3.5
|
Version: 3.3.6
|
||||||
License: GNU General Public License v2 or later
|
License: GNU General Public License v2 or later
|
||||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
Text Domain: sakura
|
Text Domain: sakura
|
||||||
|
|
Loading…
Reference in New Issue