This repository has been archived by the owner on Jul 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwp-sqrl.php
54 lines (44 loc) · 1.62 KB
/
wp-sqrl.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* @package WP_SQRL
* @author Chad Ohman <[email protected]>
* @license Apache License 2.0
* @link https://chadohman.ca
* @copyright 2019 Chad Ohman
* @package WordPress
* @subpackage Plugin
* @todo Everything...
*
* @wordpress-plugin
* Plugin Name: wp-sqrl
* Plugin URI:
* Description: A WordPress plugin for GRC's SQRL authentication.
* Version: 0.1a
* Author: Chad Ohman <[email protected]>
* Author URI: https://chadohman.ca
* License: Apache License 2.0
* License URI: http://www.apache.org/licenses/
* Text Domain: wp-sqrl
*/
// Make sure we don't expose any info if called directly
if ( !function_exists( 'add_user' ) ) {
echo 'Hello! You shouldn not call me directly.';
exit;
}
private $version = '0.1a';
private $php_required = ''; // set this
define( 'WP_SQRL_VERSION', '0.1b');
define( 'WP_SQRL_MINIMUM_WP_VERSION' , '4.0'); // revisit later
define( 'WP_SQRL_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'WP_SQRL_PLUGIN_URL', plugins_url( '', __FILE__ ));
register_activation_hook( __FILE__, array( 'WP_SQRL', 'plugin_activation' ) );
register_deactivation_hook( __FILE__, array( 'WP_SQRL', 'plugin_deactivation' ) );
register_uninstall_hook( __FILE__, array( 'WP_SQRL', 'plugin_delete' ) );
require_once( WP_SQRL_PLUGIN_DIR . 'class.wp-sqrl.php' );
require_once( WP_SQRL_PLUGIN_DIR . 'class.wp-sqrl-admin.php' );
require_once( WP_SQRL_PLUGIN_DIR . '/lib/phpqrcode/qrlib.php' ); // PHP QR Code
add_action( 'init', array( 'WP_SQRL', 'init' ) );
if ( is_admin() ) ) {
require_once( WP_SQRL__PLUGIN_DIR . 'class.wp-sqrl-admin.php' );
add_action( 'init', array( 'WP_SQRL_Admin', 'init' ) );
}