-
Notifications
You must be signed in to change notification settings - Fork 0
/
webfinger-responder.php
39 lines (34 loc) · 964 Bytes
/
webfinger-responder.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/*
Contributors: thecjgcjg
Plugin Name: Webfinger Responder
Description: Responds to /.well-known/webfinger requests with a Webfinger payload.
Author: Charles Gillham
Version: 1.2.0
Tags: webfinger, oidc
Requires at least: 6.0
Tested up to: 6.7
Stable tag: 1.2.0
License: GPLv2
License URI: https://github.com/TheCJGCJG/webfinger-responder/blob/main/LICENSE
*/
if (!defined('ABSPATH')) {
exit;
}
// Define plugin constants
define('WEBFINGER_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('WEBFINGER_PLUGIN_URL', plugin_dir_url(__FILE__));
// Load required files
require_once WEBFINGER_PLUGIN_DIR . 'includes/class-webfinger.php';
require_once WEBFINGER_PLUGIN_DIR . 'admin/class-webfinger-admin.php';
// Initialize the plugin
function webfinger_init()
{
$plugin = new Webfinger();
$plugin->init();
if (is_admin()) {
$admin = new Webfinger_Admin();
$admin->init();
}
}
add_action('plugins_loaded', 'webfinger_init');