66 lines
2.2 KiB
PHP
Raw Permalink Normal View History

<?php
$mts_options = get_option('sensational');
/*------------[ Meta ]-------------*/
if ( ! function_exists( 'mts_meta' ) ) {
function mts_meta(){
global $mts_options
?>
<?php if ($mts_options['mts_favicon'] != ''){ ?>
<link rel="icon" href="<?php echo $mts_options['mts_favicon']; ?>" type="image/x-icon" />
<?php } ?>
<!--iOS/android/handheld specific -->
<link rel="apple-touch-icon" href="<?php echo get_template_directory_uri(); ?>/apple-touch-icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<?php if($mts_options['mts_prefetching'] == '1') { ?>
<?php if (is_front_page()) { ?>
<?php $my_query = new WP_Query('posts_per_page=1'); while ($my_query->have_posts()) : $my_query->the_post(); ?>
<link rel="prefetch" href="<?php the_permalink(); ?>">
<link rel="prerender" href="<?php the_permalink(); ?>">
<?php endwhile; wp_reset_query(); ?>
<?php } elseif (is_singular()) { ?>
<link rel="prefetch" href="<?php echo home_url(); ?>">
<link rel="prerender" href="<?php echo home_url(); ?>">
<?php } ?>
<?php } ?>
<?php }
}
/*------------[ Head ]-------------*/
if ( ! function_exists( 'mts_head' ) ){
function mts_head() {
global $mts_options
?>
<?php echo $mts_options['mts_header_code']; ?>
<?php }
}
add_action('wp_head', 'mts_head');
/*------------[ Copyrights ]-------------*/
if ( ! function_exists( 'mts_copyrights_credit' ) ) {
function mts_copyrights_credit() {
global $mts_options
?>
<!--start copyrights-->
<div class="row" id="copyright-note">
<span><a href="<?php echo home_url(); ?>/" title="<?php bloginfo('description'); ?>" rel="nofollow"><?php bloginfo('name'); ?></a> Copyright &copy; <?php echo date("Y") ?>.</span>
<span><?php echo $mts_options['mts_copyrights']; ?></span>
</div>
<!--end copyrights-->
<?php }
}
/*------------[ footer ]-------------*/
if ( ! function_exists( 'mts_footer' ) ) {
function mts_footer() {
global $mts_options
?>
<?php if ($mts_options['mts_analytics_code'] != '') { ?>
<!--start footer code-->
<?php echo $mts_options['mts_analytics_code']; ?>
<!--end footer code-->
<?php } ?>
<?php }
}
?>