| Server IP : 172.67.147.195 / Your IP : 216.73.216.142 Web Server : Apache/2 System : Linux hosting8537.lvs 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : mienphi ( 1014) PHP Version : 8.2.14 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/mienphi/public_html/wp-content/themes/eduma/inc/widgets/countdown-box/tpl/ |
Upload File : |
<?php
wp_enqueue_script( 'mb-commingsoon' );
$text_days = ( isset( $instance['text_days'] ) && '' != $instance['text_days'] ) ? $instance['text_days'] : 'days';
$text_hours = ( isset( $instance['text_hours'] ) && '' != $instance['text_hours'] ) ? $instance['text_hours'] : 'hours';
$text_minutes = ( isset( $instance['text_minutes'] ) && '' != $instance['text_minutes'] ) ? $instance['text_minutes'] : 'minutes';
$text_seconds = ( isset( $instance['text_seconds'] ) && '' != $instance['text_seconds'] ) ? $instance['text_seconds'] : 'seconds';
$year = !empty( $instance['time_year'] ) ? (int) ( $instance['time_year'] ) : date( "Y", time() );
$month = !empty( $instance['time_month'] ) ? (int) ( $instance['time_month'] ) : date( "m", time() );
$day = !empty( $instance['time_hour'] ) ? (int) ( $instance['time_day'] ) : date( "d", time() );
$hour = !empty( $instance['time_hour'] ) ? (int) ( $instance['time_hour'] ) : date( "G", time() );
$due_time = isset( $instance['due-time'] ) ? $instance['due-time'] : ( $year . '/' . $month . '/' . $day . ' ' . $hour . ':00' );
$due_time = date_format( date_create( $due_time ), "Y/m/d H:i" );
$style_color = 'color-white';
if ( $instance['style_color'] != '' ) {
$style_color = 'color-' . $instance['style_color'];
}
$text_align = '';
if ( $instance['text_align'] != '' ) {
$text_align = $instance['text_align'];
}
if ( $instance['layout'] != '' ) {
$text_align .= ' countdown-'.$instance['layout'];
}
$id = uniqid();
echo '<div class="' . $text_align . ' ' . $style_color . '" id="coming-soon-counter' . $id . '"></div>';
?>
<script data-cfasync="true" type="text/javascript">
(function ($) {
'use strict';
$(document).ready(function () {
if (jQuery().mbComingsoon) {
$("#coming-soon-counter<?php echo esc_js( $id ); ?>").mbComingsoon({
expiryDate : new Date('<?php echo( $due_time ); ?>'),
localization: {
days : "<?php echo esc_js( $text_days ); ?>",
hours : "<?php echo esc_js( $text_hours ); ?>",
minutes: "<?php echo esc_js( $text_minutes ); ?>",
seconds: "<?php echo esc_js( $text_seconds ); ?>",
},
speed : 100,
});
setTimeout(function () {
jQuery(window).resize();
}, 200);
}
});
})(jQuery);
</script>