register_dom_modifier_pipeline(); // Run the HTML through the pipeline before being rendered. add_filter( 'solidwp/performance/cache/html', $this->container->callback( Modifier::class, 'modify' ), 10, 1 ); } /** * Register the dom modifier pipeline steps. * * @return void */ private function register_dom_modifier_pipeline(): void { $this->container->singleton( self::PIPELINE, fn(): Pipeline => ( new Pipeline( $this->container ) )->through( // Register any dom modifier pipeline stages here. [ Lazy_Load_Modifier::class, ] ) ); $this->container->when( Modifier::class ) ->needs( Pipeline::class ) ->give( static fn( $c ) => $c->get( self::PIPELINE ) ); } }