'install-burst', 'label' => 'default', 'title' => "Burst Statistics", 'text' => __( "Burst Statistics will be configured automatically.", "complianz-gdpr" ), ]; return $notices; } add_filter( 'cmplz_field_notices', 'cmplz_burst_statistics_integration_show_compile_statistics_notice', 10, 1 ); function cmplz_burst_statistics_activate_burst() { ob_start(); ?> ', ''), '', $script); wp_add_inline_script( 'cmplz-cookiebanner', $script); } add_action( 'wp_enqueue_scripts', 'cmplz_burst_statistics_activate_burst',PHP_INT_MAX ); /** * If checked for privacy friendly, and the user select "none of the above", return true, as it's burst. * @param $is_privacy_friendly * * @return bool */ function cmplz_burst_statistics_privacy_friendly($is_privacy_friendly){ $statistics = cmplz_get_option( 'compile_statistics' ); if ($statistics==='yes') { $is_privacy_friendly = true; } return $is_privacy_friendly; } add_filter('cmplz_cookie_warning_required_stats', 'cmplz_burst_statistics_privacy_friendly'); add_filter('cmplz_statistics_privacy_friendly', 'cmplz_burst_statistics_privacy_friendly'); /** * Add a script to the blocked list * @param array $tags * * @return array */ function cmplz_burst_script( $tags ) { //if cookieless tracking enabled, do not block. if ( burst_get_option('enable_cookieless_tracking') ) { return $tags; } $tags[] = array( 'name' => 'burst', 'category' => 'statistics', 'urls' => array( 'assets/js/build/burst.js', 'assets/js/build/burst.min.js', 'helpers/timeme/timeme.js', 'helpers/timeme/timeme.min.js', ), 'enable_placeholder' => '0', 'enable_dependency' => '0', ); return $tags; } add_filter( 'cmplz_known_script_tags', 'cmplz_burst_script' );