wenprise / wordpress-dispatcher
Create URL endpoints within WordPress
Installs: 495
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 4
pkg:composer/wenprise/wordpress-dispatcher
Requires
- php: >=5.4
 
This package is auto-updated.
Last update: 2025-10-22 08:50:24 UTC
README
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