Skip to content

iwillhappy1314/wordpress-dispatcher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Router / Dispatcher

Easily add custom URL endpoints in WordPress. Map a url to a function.

##Example

use \Wenprise\Dispatcher\Router;

Router::routes([

    'testing-a-url' => function(){
        echo 'Hello Ted';
    },

    'hello-([a-z]+)' => function($request, $name){
        echo "Hello $name";
    }
]);

/testing-a-url & /hello-dougle will now be accessable in your WordPress site.

##Install

###Composer

composer require wenprise/wordpress-dispatcher

About

URL endpoints in WordPress

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%