Version 5.0.0 beta 7

This commit is contained in:
Neo committed 2025-12-19 17:18:38 -08:00
1 parent fa2a720105
commit 54d5dcd0a0
156 files changed
+4337 -2995

No files matched your search

@@ -585,7 +585,7 @@ HTML,
*/
public static function i(): static
{
if ( empty( static::$instance ) )
if ( !static::hasInstance() )
{
if ( ( \IPS\IN_DEV OR CIC ) AND class_exists( '\IPS\cloud\DataLayer' ) )
{
@@ -607,6 +607,16 @@ HTML,
return static::$instance;
}
/**
* Check if there is an instance currently
*
* @return bool
*/
public static function hasInstance() : bool
{
return !empty( static::$instance );
}
/**
* Initialize this instance
*
@@ -631,6 +641,12 @@ HTML,
*/
public function addEvent( string $key, array $values, bool $odkUpdate=true ) : void
{
/* Do we care about the datalayer on this request? */
if ( Output::i()->bypassDataLayer )
{
return;
}
/* Is it set */
if ( !$odkUpdate AND isset( $this->events[$key] ) )
{
@@ -796,6 +812,11 @@ HTML,
*/
public function addContextProperty( string $key, mixed $value, bool $odkUpdate=true ) : void
{
if ( Output::i()->bypassDataLayer )
{
return;
}
/* Did we set it already? */
if ( !$odkUpdate AND isset( $this->context[$key] ) )
{