-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·28 lines (26 loc) · 891 Bytes
/
index.php
File metadata and controls
executable file
·28 lines (26 loc) · 891 Bytes
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
<?php
/**
* Plugin Name: LNC Near Comments
* Description: verify comments with nCaptcha
* Version: 0.0.1
* Author: Learn NEAR Club
* Author URI: http://learnnear.club/
*/
use \LNCNearComments\Model\Constructor\Constructor;
try {
$composerLoader = __DIR__ . '/vendor/autoload.php';
if (file_exists($composerLoader)) {
require_once $composerLoader;
} else {
throw new Exception(__('Install the composer for current work', 'lnc-n-comments'));
}
if (!is_plugin_active('near-login/index.php')) {
throw new Exception(__('Login With NEAR should be enabled'));
}
Constructor::getInstance();
} catch (Exception $exception) {
deactivate_plugins('lnc-n-comments/index.php');
add_action('admin_notices', function() use ($exception) {
echo '<div class="error"><p>' . esc_html($exception->getMessage()) . '</p></div>';
});
}