Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/wp-content/themes/music-night/header-title.php
Назад
<?php /* * The template for displaying a header title section */ $musicnight_theme_option = get_option('musicnight_admin_option', array()); $musicnight_post_option = musicnight_decode_stopbackslashes(get_post_meta(get_the_ID(), 'post-option', true )); if( !empty($musicnight_post_option) ){ $musicnight_post_option = json_decode( $musicnight_post_option, true ); } $header_background = musicnight_header_title_background($musicnight_theme_option,'default-post-title-background',$musicnight_post_option); $page_caption =''; if( is_page() && (empty($musicnight_post_option['show-sub']) || $musicnight_post_option['show-sub'] != 'disable') ){ $page_background = ''; $page_title = get_the_title(); if(!empty($musicnight_post_option['page-caption'])){ $page_caption = $musicnight_post_option['page-caption'];} ?> <!--Sub Banner Wrap Start--> <div <?php echo wp_kses($header_background,array('img'=>array('src'=>array(),'alt'=>array()),'a'=>array()));?> class="sub-banner <?php echo esc_attr($musicnight_theme_option['kode-header-style']);?>"> <div class="container"> <h6><?php echo esc_attr(musicnight_text_filter($page_title)); ?></h6> <p>Praising pain was born and I will give you a complete account will give you a complete account</p> </div> </div> <!--Sub Banner Wrap End--> <?php }else if( is_single() && $post->post_type == 'post' ){ if( !empty($musicnight_post_option['page-title']) ){ $page_title = $musicnight_post_option['page-title']; $page_caption = $musicnight_post_option['page-caption']; }else{ $page_title = ''; $page_caption = ''; } if($page_title == ''){ $page_title = get_the_title(); } $header_background = musicnight_header_title_background($musicnight_theme_option,'default-post-title-background',$musicnight_post_option); ?> <!--Sub Banner Wrap Start--> <div <?php echo wp_kses($header_background,array('img'=>array('src'=>array(),'alt'=>array()),'a'=>array()));?> class="sub-banner <?php echo esc_attr($musicnight_theme_option['kode-header-style']);?>"> <div class="container"> <h6><?php echo esc_attr(musicnight_text_filter($page_title)); ?></h6> <p>Praising pain was born and I will give you a complete account will give you a complete account</p> </div> </div> <!--Sub Banner Wrap End--> <?php }else if( is_single() ){ // for custom post type $musicnight_theme_option = get_option('musicnight_admin_option', array()); $musicnight_post_option = musicnight_decode_stopbackslashes(get_post_meta(get_the_ID(), 'post-option', true )); if( !empty($musicnight_post_option) ){ $musicnight_post_option = json_decode( $musicnight_post_option, true ); } $header_background = musicnight_header_title_background($musicnight_theme_option,'default-hotel-background',$musicnight_post_option); if( !empty($musicnight_post_option['page-title']) ){ $page_title = $musicnight_post_option['page-title']; $page_caption = $musicnight_post_option['page-caption']; }else{ $page_title = ''; $page_caption = ''; } if($page_title == ''){ $page_title = get_the_title(); } if(is_singular('event')){ $header_background = musicnight_header_title_background($musicnight_theme_option,'default-hotel-background',$musicnight_post_option); global $EM_Event; $loc_lat = ''; $loc_lon = ''; $location = ''; if(isset($EM_Event->get_location()->address)){ $location = esc_attr($EM_Event->get_location()->address); }else{ $location = ''; } if($location <> ''){ $loc_lat = $EM_Event->get_location()->location_latitude; $loc_lon = $EM_Event->get_location()->location_longitude; } $location_town = ''; if(isset($EM_Event->get_location()->address)){ $location_town = $EM_Event->get_location()->town; }else{ $location_town = ''; }?> <!--Sub Banner Wrap Start--> <div <?php echo wp_kses($header_background,array('img'=>array('src'=>array(),'alt'=>array()),'a'=>array()));?> class="sub-banner kode-map-wrapper-main <?php echo esc_attr($musicnight_theme_option['kode-header-style']);?>"> <?php if($location <> ''){ ?> <div class="kode-map-wrapper"> <script> function initMap() { var myLatLng = {lat: <?php echo esc_attr($loc_lat); ?>, lng: <?php echo esc_attr($loc_lon); ?>}; var map = new google.maps.Map(document.getElementById('kode-map'), { zoom: 15, center: myLatLng }); var marker = new google.maps.Marker({ position: myLatLng, map: map, }); } google.maps.event.addDomListener(window, 'load', initMap); </script> <div id="kode-map"></div> </div> <?php }?> </div> <!--Sub Banner Wrap End--> <?php }else if(is_singular('video')){ }else{ ?> <!--Sub Banner Wrap Start--> <div <?php echo wp_kses($header_background,array('img'=>array('src'=>array(),'alt'=>array()),'a'=>array()));?> class="sub-banner <?php echo esc_attr($musicnight_theme_option['kode-header-style']);?>"> <div class="container"> <h6><?php echo esc_attr(musicnight_text_filter($page_title)); ?></h6> <p>Praising pain was born and I will give you a complete account will give you a complete account</p> </div> </div> <!--Sub Banner Wrap End--> <?php } }else if( is_404() ){ $page_title = esc_attr__('404 Error Page','music-night'); $header_background = musicnight_header_title_background($musicnight_theme_option,'default-404-title-background',$musicnight_post_option); ?> <!--Sub Banner Wrap Start--> <div <?php echo wp_kses($header_background,array('img'=>array('src'=>array(),'alt'=>array()),'a'=>array()));?> class="sub-banner <?php echo esc_attr($musicnight_theme_option['kode-header-style']);?>"> <div class="container"> <h6><?php echo esc_attr(musicnight_text_filter($page_title)); ?></h6> <p>Praising pain was born and I will give you a complete account will give you a complete account</p> </div> </div> <!--Sub Banner Wrap End--> <?php }else if( is_archive() || is_search() ){ if( is_search() ){ $page_title = esc_html__('Search Results', 'music-night'); $caption = get_search_query(); }else if( is_category() ){ $page_title = esc_html__('Category','music-night'); $caption = single_cat_title('', false); }else if( is_tax('genre') ){ // $page_title = esc_html__('Category','music-night'); $page_title = single_cat_title('', false); }else if( is_tag() || is_tax('work_tag') || is_tax('product_tag') ){ $page_title = esc_html__('Tag','music-night'); $caption = single_cat_title('', false); }else if( is_day() ){ $page_title = esc_html__('Day','music-night'); $caption = get_the_date('F j, Y'); }else if( is_month() ){ $page_title = esc_html__('Month','music-night'); $caption = get_the_date('F Y'); }else if( is_year() ){ $page_title = esc_html__('Year','music-night'); $caption = get_the_date('Y'); }else if( is_author() ){ $page_title = esc_html__('By','music-night'); $author_id = get_query_var('author'); $author = get_user_by('id', $author_id); $page_title = $author->display_name; }else if( is_post_type_archive('product') ){ $page_title = esc_html__('Shop', 'music-night'); $caption = ''; }else{ $page_title = get_the_title(); $caption = ''; } $header_background = musicnight_header_title_background($musicnight_theme_option,'default-search-archive-title-background',$musicnight_post_option); ?> <!--Sub Banner Wrap Start--> <div <?php echo wp_kses($header_background,array('img'=>array('src'=>array(),'alt'=>array()),'a'=>array()));?> class="sub-banner <?php echo esc_attr($musicnight_theme_option['kode-header-style']);?>"> <div class="container"> <h6><?php echo esc_attr(musicnight_text_filter($page_title)); ?></h6> <p>Praising pain was born and I will give you a complete account will give you a complete account</p> </div> </div> <!--Sub Banner Wrap End--> <?php }else if( is_single() && get_post_type() == 'event' ){ if(is_singular('event')){ $header_background = musicnight_header_title_background($hotelmanagement_plugin_option,'default-hotel-background',$musicnight_post_option); global $EM_Event; $loc_lat = ''; $loc_lon = ''; if($location <> ''){ $loc_lat = $EM_Event->get_location()->location_latitude; $loc_lon = $EM_Event->get_location()->location_longitude; } $location_town = ''; if(isset($EM_Event->get_location()->address)){ $location_town = $EM_Event->get_location()->town; }else{ $location_town = ''; } ?> <!--Sub Banner Wrap Start--> <div <?php echo wp_kses($header_background,array('img'=>array('src'=>array(),'alt'=>array()),'a'=>array()));?> class="sub-banner <?php echo esc_attr($musicnight_theme_option['kode-header-style']);?>"> <?php if($location <> ''){ ?> <div class="kode-map-wrapper"> <script> function initMap() { var myLatLng = {lat: <?php echo esc_attr($loc_lat); ?>, lng: <?php echo esc_attr($loc_lon); ?>}; var map = new google.maps.Map(document.getElementById('kode-map'), { zoom: 15, center: myLatLng }); var marker = new google.maps.Marker({ position: myLatLng, map: map, }); } google.maps.event.addDomListener(window, 'load', initMap); </script> <div id="kode-map"></div> </div> <?php }?> <div class="container"> <h6><?php echo esc_attr(musicnight_text_filter($page_title)); ?></h6> <p>Praising pain was born and I will give you a complete account will give you a complete account</p> </div> </div> <!--Sub Banner Wrap End--> <?php } }
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка