get_widgets_settings();
foreach ( \AbsoluteAddons\Plugin::get_widgets() as $key => $val ) {
// Default config.
$is_active = $val['is_active'];
$disabled = false;
// Set is active from settings if available.
if ( isset( $widgets_option[ $key ] ) ) {
$is_active = 'on' === $widgets_option[ $key ];
}
// If pro is not active, then disable the pro widgets.
if ( $val['is_pro'] && ! absp_has_pro() ) {
$is_active = false;
$disabled = true;
}
// Disable widgets if it's upcoming.
if ( $val['is_upcoming'] ) {
$is_active = false;
$disabled = true;
}
?>