-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathwp-openid.php
More file actions
39 lines (31 loc) · 1.01 KB
/
wp-openid.php
File metadata and controls
39 lines (31 loc) · 1.01 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
<?php
/*
Plugin Name: WP OpenID
Plugin URI: https://github.com/nicko170/wp-openid
Description: Simple OpenID authentication for WordPress.
Version: VERSION
Author: Nick Pratley
Author URI: https://theitdept.au
Text Domain: openid
Domain Path: /languages
Documentation: https://github.com/nicko170/wp-openid
*/
// Define the plugin version. This will be replaced by the build script.
const WP_OPENID_VER = 'VERSION';
defined('ABSPATH') or die('');
if (!function_exists('is_plugin_active_for_network')) {
require_once(ABSPATH . '/wp-admin/includes/plugin.php');
}
require_once __DIR__ . '/OpenID.php';
require_once __DIR__ . '/GithubUpdater.php';
// We only want to run the updater if we are in the admin area.
add_action('admin_init', function () {
GithubUpdater::make()
->repository('nicko170/wp-openid')
->asset_name('wp-openid.zip')
->readme_url('https://raw.githubusercontent.com/nicko170/wp-openid/main/README.md')
->boot(__FILE__);
});
// Boot the plugin.
OpenID::make()
->boot();