Version 5.0.13

This commit is contained in:
Neo committed 2025-12-19 19:04:57 -08:00
1 parent b89858b2ff
commit 5efe744c5f
1407 files changed
+69690 -30177

No files matched your search

+22 -2
View File
@@ -55,7 +55,7 @@ class advertisements extends Widget
$form = parent::configuration( $form );
$ads = [];
foreach( Db::i()->select( 'ad_id', 'core_advertisements', [ 'ad_type!=?', Advertisement::AD_EMAIL ] ) as $adId )
foreach( Db::i()->select( 'ad_id', 'core_advertisements', [ 'ad_type!=? and ad_active=?', Advertisement::AD_EMAIL, 1 ] ) as $adId )
{
$ads[$adId] = 'core_advert_' . $adId;
}
@@ -104,6 +104,20 @@ class advertisements extends Widget
return $values;
}
/**
* Return any extra classes that should be added to the widget wrapper
* Placeholder method in case an override is necessary for individual widgets.
*
* @return array
*/
public function getWrapperClasses() : array
{
return [
'ipsWidget--transparent'
];
}
/**
* Render a widget
*
@@ -125,6 +139,12 @@ class advertisements extends Widget
}
}
return $this->output( Advertisement::loadForWidget( array(), ( count( $ids ) ? $ids : null ), ( $this->configuration['widget_ad_limit'] ?? null ) ) );
$ads = Advertisement::loadForWidget( array(), ( count( $ids ) ? $ids : null ) );
if( $ads === null )
{
return "";
}
return $this->output( $ads, ( $this->configuration['widget_ad_limit'] ?? null ) );
}
}