is printed `async` and, in the * TCF or Manual consent mode, carries data-consent-mode (AdPriva/tag#138). */ class Adpriva_Tag { const HANDLE = 'adpriva-tag'; /** * Register hooks. * * @return void */ public function hooks() { add_action( 'wp_enqueue_scripts', array( $this, 'enqueue' ) ); add_filter( 'script_loader_tag', array( $this, 'filter_script_tag' ), 10, 2 ); } /** * Enqueue the CDN tag when the site is connected. * * @return void */ public function enqueue() { if ( ! $this->should_load() ) { return; } wp_enqueue_script( self::HANDLE, Adpriva_Config::tag_url(), array(), ADPRIVA_VERSION, true ); } /** * Add `async` and, in a gated consent mode, data-consent-mode to the tag's own *