unset($bgimage[$k]);
}
- if(!empty($country) && count($bgimage) > 1){
-
- $bg = $bgimage;
- $bgimage = array();
-
- $player = (empty($country) || $country != 'CN') ? 'youtu.be' : 'youku.com';
-
- foreach ($bg as $i){
-
- if(empty($i['linkurl']) || strpos($i['linkurl'], $player) === false){
- continue;
- }
-
- $bgimage[] = $i;
- break;
-
- }
-
- if(empty($bgimage)){
- $bgimage[] = $bg[0];
- }
+ if(!empty($video)){
+ array_unshift($bgimage, $video);
}
$ret[$c->element_id_name][] = array(