fix(php): use filter_var for proper boolean casting in config
This commit is contained in:
@@ -497,10 +497,10 @@ function roi_enqueue_adsense_loader() {
|
|||||||
$lazy_fill_timeout = roi_get_component_setting('adsense-placement', 'behavior', 'lazy_fill_timeout', '5000');
|
$lazy_fill_timeout = roi_get_component_setting('adsense-placement', 'behavior', 'lazy_fill_timeout', '5000');
|
||||||
|
|
||||||
$config = array(
|
$config = array(
|
||||||
'lazyEnabled' => (bool) $lazy_enabled,
|
'lazyEnabled' => filter_var($lazy_enabled, FILTER_VALIDATE_BOOLEAN),
|
||||||
'rootMargin' => (int) $lazy_rootmargin . 'px 0px',
|
'rootMargin' => (int) $lazy_rootmargin . 'px 0px',
|
||||||
'fillTimeout' => (int) $lazy_fill_timeout,
|
'fillTimeout' => (int) $lazy_fill_timeout,
|
||||||
'debug' => defined('WP_DEBUG') && WP_DEBUG,
|
'debug' => defined('WP_DEBUG') && WP_DEBUG ? true : false,
|
||||||
);
|
);
|
||||||
|
|
||||||
wp_add_inline_script(
|
wp_add_inline_script(
|
||||||
|
|||||||
Reference in New Issue
Block a user