diff --git a/Inc/enqueue-scripts.php b/Inc/enqueue-scripts.php index 16b4d28b..71d51cb9 100644 --- a/Inc/enqueue-scripts.php +++ b/Inc/enqueue-scripts.php @@ -497,10 +497,10 @@ function roi_enqueue_adsense_loader() { $lazy_fill_timeout = roi_get_component_setting('adsense-placement', 'behavior', 'lazy_fill_timeout', '5000'); $config = array( - 'lazyEnabled' => (bool) $lazy_enabled, + 'lazyEnabled' => filter_var($lazy_enabled, FILTER_VALIDATE_BOOLEAN), 'rootMargin' => (int) $lazy_rootmargin . 'px 0px', 'fillTimeout' => (int) $lazy_fill_timeout, - 'debug' => defined('WP_DEBUG') && WP_DEBUG, + 'debug' => defined('WP_DEBUG') && WP_DEBUG ? true : false, ); wp_add_inline_script(