pull/35/head
Mashiro 2019-01-02 12:03:38 +08:00
parent c744e3b1af
commit 417eb257d0
2 changed files with 7 additions and 2 deletions

View File

@ -30,7 +30,12 @@ if ( akina_option('toggle-menu') == 'no') { ?>
<?php } // comments ?>
<?php
$imgurl = akina_option('cover_img');
if (akina_option('cover_img')) {
$imgurl = akina_option('cover_img');
} else {
$imgurl = 'https://sakura.2heng.xin/wp-content/themes/Sakura/cover/index.php';
}
$image_api = 'background-image: url("'.$imgurl.'");';
$bg_style = akina_option('focus_height') ? 'background-position: center center;background-attachment: inherit;' : '';

View File

@ -356,7 +356,7 @@ function optionsframework_options() {
'name' => __('封面图', 'options_framework_theme'),
'desc' => __('此处留空则使用内置API将需要随机展示的图片放入 /cover/gallery/ 目录)', 'options_framework_theme'),
'id' => 'cover_img',
'std' => get_site_url()."/wp-content/themes/Sakura/cover/index.php",
'std' => '',
'type' => 'upload');
$options[] = array(