Skip to content

davisriska/wp-request-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wordpress request middleware

How to use

  1. Add an action to wp_request_middleware that recieves MiddlewareHandlerInterface as a parameter.
  2. Add new route with $middlewareHandler->addMiddleware(); As a param pass MiddlewareInterface type.
    • new Middleware()
add_action('wp_request_middleware', function (MiddlewareHandlerInterface $middlewareHandler) {
    $middlewareHandler->addMiddleware(new Middleware());
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages