respect "enable_css" option and do not enqueue stylesheet if disabled

This commit is contained in:
Stefan Kalscheuer 2020-04-09 12:17:38 +02:00
parent f0bf1c3542
commit ca5c81356b

View File

@ -269,13 +269,16 @@ class SCLiveticker {
)
);
wp_enqueue_style(
'sclt-css',
SCLIVETICKER_BASE . 'styles/liveticker.min.css',
'',
self::VERSION,
'all'
);
// Enqueue CSS if enabled.
if ( 1 === self::$options['enable_css'] ) {
wp_enqueue_style(
'sclt-css',
SCLIVETICKER_BASE . 'styles/liveticker.min.css',
'',
self::VERSION,
'all'
);
}
}
}