forked from idno/indiepub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.php
19 lines (14 loc) · 965 Bytes
/
Main.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
namespace IdnoPlugins\IndiePub {
class Main extends \Idno\Common\Plugin {
function registerPages() {
\Idno\Core\site()->addPageHandler('/indieauth/callback/?', '\IdnoPlugins\IndiePub\Pages\IndieAuth\Callback',true);
\Idno\Core\site()->addPageHandler('/indieauth/token/?', '\IdnoPlugins\IndiePub\Pages\IndieAuth\Token',true);
\Idno\Core\site()->addPageHandler('/micropub/endpoint/?', '\IdnoPlugins\IndiePub\Pages\MicroPub\Endpoint',true);
\Idno\Core\site()->template()->extendTemplate('shell/head','indiepub/shell/head');
header('Link: <https://indieauth.com/auth>; rel="authorization_endpoint"');
header('Link: <'.\Idno\Core\site()->config()->getURL().'indieauth/token>; rel="token_endpoint"');
header('Link: <'.\Idno\Core\site()->config()->getURL().'micropub/endpoint>; rel="micropub"');
}
}
}