- Fixed deprecated WP_Widget constructors in all widget files - Changed $this->WP_Widget() to parent::__construct() in: * widget-social.php * widget-fblikebox.php * widget-googleplus.php * widget-tabs.php - Fixed old-style constructor methods to __construct() in: * widget-ad125.php (mts_Ad_Widget -> __construct) * widget-ad300.php (mts_ad_300_Widget -> __construct) - Fixed for loop syntax error in widget-tweets.php (for(i; -> for($i = 1;) - Enabled registration for ad125 and ad300 widgets - Added new 'After First Paragraph' widget area for in-content ads All widgets now compatible with PHP 8.4 and editable in WordPress admin. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
66 lines
2.2 KiB
PHP
66 lines
2.2 KiB
PHP
<?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 © <?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 }
|
|
}
|
|
?>
|