Version 4.7.0

This commit is contained in:
Neo committed 2025-12-19 16:00:35 -08:00
1 parent 517a5e1f70
commit 8ba7d43898
1933 files changed
+65613 -11332

No files matched your search

+17
View File
@@ -31,6 +31,15 @@ abstract class _Controller
* @brief Is this for displaying "content"? Affects if advertisements may be shown
*/
public $isContentPage = TRUE;
/**
* @brief These properties are used to specify datalayer context properties.
*
* @example array(
'community_area' => array( 'value' => 'search', 'odkUpdate' => 'true' )
* )
*/
public static $dataLayerContext = array();
/**
* Constructor
@@ -82,6 +91,14 @@ abstract class _Controller
*/
public function execute()
{
if ( !empty( static::$dataLayerContext ) AND \IPS\Settings::i()->core_datalayer_enabled AND !\IPS\Request::i()->isAjax() )
{
foreach ( static::$dataLayerContext as $property => $data )
{
\IPS\core\DataLayer::i()->addContextProperty( $property, $data['value'], $data['odkUpdate'] ?? false );
}
}
if( \IPS\Request::i()->do and preg_match( '/^[a-zA-Z\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', \IPS\Request::i()->do ) )
{
if ( method_exists( $this, \IPS\Request::i()->do ) or method_exists( $this, '__call' ) )