File "frontend.js.php"

Full path: C:/Inetpub/vhosts/drshti.com/httpdocs/wp-content/plugins/ultimate-addons-for-gutenberg/includes/blocks/countdown/frontend.js.php
File size: 862 B (862 B bytes)
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Editor &nnbsp; Back

<?php
/**
 * Frontend JS File.
 *
 * @since 2.4.0
 *
 * @package uagb
 */

$selector = '.uagb-block-' . $id;

$countdown_options = apply_filters(
	'uagb_countdown_options',
	array(
		'block_id'       => $attr['block_id'],
		'endDateTime'    => $attr['endDateTime'],
		'showDays'       => $attr['showDays'],
		'showHours'      => $attr['showHours'],
		'showMinutes'    => $attr['showMinutes'],
		'isFrontend'     => true,
		'timerEndAction' => $attr['timerEndAction'],
		'redirectURL'    => $attr['redirectURL'],
	),
	$id,
	$attr
);

ob_start();
?>
window.addEventListener( 'load', function() {
	UAGBCountdown.init( '<?php echo esc_attr( $selector ); ?>', <?php echo wp_json_encode( $countdown_options ); ?> );
});
<?php
$dynamic_js = apply_filters( 'spectra_countdown_frontend_dynamic_js', ob_get_clean(), $selector, $countdown_options );
return $dynamic_js;
?>