mirror of
https://github.com/mashirozx/sakura.git
synced 2024-11-22 23:08:14 +08:00
Close #73
This commit is contained in:
parent
b8d52760da
commit
d6fd57480e
@ -40,18 +40,14 @@ function get_avatar_profile_url(){
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 首页随机背景图
|
* 随机图
|
||||||
* NB: I can think of this
|
|
||||||
*/
|
*/
|
||||||
function get_random_bg_url(){
|
function get_random_bg_url(){
|
||||||
$arr = array();
|
if ( empty( akina_option('default_feature_image' )) ) {
|
||||||
for($i=0; $i<6; $i++){
|
return get_template_directory_uri().'/feature/index.php?'.rand(1,1000);
|
||||||
if(akina_option('focus_img_'.$i)){
|
} else {
|
||||||
$arr[] = akina_option('focus_img_'.$i);
|
return akina_option('default_feature_image').'?'.rand(1,1000);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$url = rand(0, count($arr)-1);
|
|
||||||
return $arr[$url];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user