Skip to content

Commit

Permalink
Add filter to deactivate the container
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenLundsgaard committed Nov 23, 2023
1 parent 8af7d16 commit 08c235b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ Find out about what's new in our [our release post](https://gtmkit.com/gtm-kit-1
#### Enhancements:
* Added option to specify the Google Tag Manager environment.
* Performance optimization through optimized database queries and general code improvements.
* Added a filter to deactivate the container, so the container can be deactivated on specific pages.

#### Bugfixes:
* Add missing _sbp cookie in the cookie keeper.
Expand Down
2 changes: 1 addition & 1 deletion src/Frontend/Frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct( Options $options ) {
*/
public static function register( Options $options ): void {
$page = new Frontend( $options );
$container_active = $options->get( 'general', 'container_active' );
$container_active = ( $options->get( 'general', 'container_active' ) && apply_filters( 'gtmkit_container_active', true ) );
$noscript_implementation = $options->get( 'general', 'noscript_implementation' );

if ( empty( $options->get( 'general', 'just_the_container' ) ) ) {
Expand Down

0 comments on commit 08c235b

Please sign in to comment.