mirror of
https://github.com/mashirozx/sakura.git
synced 2024-11-22 14:58: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(){
|
||||
$arr = array();
|
||||
for($i=0; $i<6; $i++){
|
||||
if(akina_option('focus_img_'.$i)){
|
||||
$arr[] = akina_option('focus_img_'.$i);
|
||||
if ( empty( akina_option('default_feature_image' )) ) {
|
||||
return get_template_directory_uri().'/feature/index.php?'.rand(1,1000);
|
||||
} else {
|
||||
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