thefold / wordpress-dispatcher
Create URL endpoints within WordPress
Installs: 2 868
Dependents: 0
Suggesters: 0
Security: 0
Stars: 28
Watchers: 1
Forks: 4
Open Issues: 1
Requires
- php: >=5.4
This package is not auto-updated.
Last update: 2024-11-05 09:39:57 UTC
README
Easily add custom URL endpoints in WordPress. Map a url to a function.
Example
use \TheFold\WordPress\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 thefold/wordpress-dispatcher