'async' ) ); } add_action( 'wp_enqueue_scripts', 'pupop_enqueue_script' ); /** * Adds `data-site` and the optimiser opt-outs to the tag. Delaying or * deferring the script until the visitor interacts would break time-delay * triggers. Uses script_loader_tag, not wp_script_attributes, because core * only builds script tags through wp_get_script_tag from 6.4. * * @param string $tag The script tag. * @param string $handle The script handle. * @return string */ function pupop_script_tag( $tag, $handle ) { if ( 'pupop' !== $handle ) { return $tag; } $attributes = sprintf( '