is * printed `async` and always carries data-consent-mode (AdPriva/tag#138, tag#141). */ 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 the consent attributes to the tag's own