of the script the HTML is being filtered for. * * @return string */ public function register_module_scripts( $tag, $handle ) { if ( $this->module_handle !== $handle ) { return $tag; } // Since the filter did date effect, we can unhook now. remove_filter( 'script_loader_tag', [ $this, 'register_module_scripts' ] ); // Add our type flag so we can use ES6 module syntax return str_replace( "