-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathwebfinger.php
More file actions
57 lines (49 loc) · 1.62 KB
/
Copy pathwebfinger.php
File metadata and controls
57 lines (49 loc) · 1.62 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* Plugin Name: WebFinger
* Plugin URI: https://github.com/pfefferle/wordpress-webfinger
* Description: WebFinger for WordPress
* Version: 4.1.0
* Requires at least: 6.4
* Author: Matthias Pfefferle
* Author URI: https://notiz.blog/
* License: MIT
* License URI: https://opensource.org/licenses/MIT
*
* @package Webfinger
*/
namespace Webfinger;
\defined( 'WEBFINGER_LEGACY' ) || \define( 'WEBFINGER_LEGACY', false );
// Plugin related constants.
\define( 'WEBFINGER_PLUGIN_DIR', \plugin_dir_path( __FILE__ ) );
\define( 'WEBFINGER_PLUGIN_BASENAME', \plugin_basename( __FILE__ ) );
\define( 'WEBFINGER_PLUGIN_FILE', WEBFINGER_PLUGIN_DIR . \basename( __FILE__ ) );
\define( 'WEBFINGER_PLUGIN_URL', \plugin_dir_url( __FILE__ ) );
// Require the autoloader.
require_once WEBFINGER_PLUGIN_DIR . 'includes/class-autoloader.php';
Autoloader::register_path( 'Webfinger\\', WEBFINGER_PLUGIN_DIR . 'includes/' );
/**
* Initialize plugin.
*/
function init() {
// List of various public helper functions.
require_once WEBFINGER_PLUGIN_DIR . 'includes/functions.php';
require_once WEBFINGER_PLUGIN_DIR . 'includes/deprecated.php';
Webfinger::init();
Admin::init();
Health_Check::init();
// Add legacy WebFinger class.
if ( WEBFINGER_LEGACY && ! \class_exists( '\WebFingerLegacy_Plugin' ) ) {
Legacy::init();
}
}
\add_action( 'plugins_loaded', '\Webfinger\init' );
/**
* Flush rewrite rules.
*/
function flush_rewrite_rules() {
Webfinger::generate_rewrite_rules();
\flush_rewrite_rules();
}
\register_activation_hook( __FILE__, '\Webfinger\flush_rewrite_rules' );
\register_deactivation_hook( __FILE__, '\flush_rewrite_rules' );