-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
64 lines (58 loc) · 1.75 KB
/
index.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
55
56
57
58
59
60
61
62
63
64
<?php
/**
* @link https://github.com/rosario-fiorella/wordpress-comblock-auth/
* @since 1.0.0
* @package wordpress-comblock-auth
* @author Rosario Fiorella
*
* @wordpress-plugin
* Plugin Name: Comblock Front-End Login
* Plugin URI: https://github.com/rosario-fiorella/wordpress-comblock-auth/
* Description: WordPress plugin that allows you to authenticate users in the front-end in a reserved area .
* Version: 1.0.0
* Requires at least: 6.0
* Requires PHP: 7.4
* Author: Rosario Fiorella
* Author URI: https://github.com/rosario-fiorella/
* Text Domain: comblock-auth
* Update URI: /
* Domain Path: /languages
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
if (!defined('WPINC')) {
die;
}
if (defined('WP_CLI') && WP_CLI) {
return;
}
/**
* @see https://semver.org
*/
define('COMBLOCK_AUTH_VERSION', '1.0.0');
define('COMBLOCK_AUTH_DOMAIN', 'comblock-auth');
define('COMBLOCK_AUTH_PLUGIN_FILE', __FILE__);
require_once plugin_dir_path(__FILE__) . 'includes/class-comblock-auth.php';
try {
$comblock_auth = new Comblock_Auth();
$comblock_auth->run();
} catch (Throwable $e) {
add_action(
'admin_notices',
/**
* @since 1.0.0
* @return void
*/
function () use ($e): void {
printf(
'<div class="error">
<pre>%s</pre>
<p>in <strong>%s</strong> at line <strong>%s</strong></p>
</div>',
esc_html($e->getMessage()),
esc_html($e->getFile()),
esc_html($e->getLine())
);
}
);
}