Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filter to deactivate the container #337

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading