-
Notifications
You must be signed in to change notification settings - Fork 14
/
anycomment.php
46 lines (36 loc) · 1.33 KB
/
anycomment.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
<?php
/**
* Plugin Name: AnyComment
* Plugin URI: https://anycomment.io
* Description: AnyComment is an advanced commenting system for WordPress.
* Version: 0.3.6
* Author: Bologer
* Author URI: http://bologer.ru
* Requires at least: 4.7
* Requires PHP: 5.4
* Tested up to: 5.9
* Text Domain: anycomment
* Domain Path: /languages
*
* @package AnyComment
* @author bologer
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require __DIR__ . '/vendor/autoload.php';
}
$dotenv = Dotenv\Dotenv::createImmutable( __DIR__ );
$dotenv->load();
function anycomment() {
defined( 'ANYCOMMENT_PLUGIN_FILE' ) or define( 'ANYCOMMENT_PLUGIN_FILE', __FILE__ );
defined( 'ANYCOMMENT_LANG' ) or define( 'ANYCOMMENT_LANG', __FILE__ );
defined( 'ANYCOMMENT_ABSPATH' ) or define( 'ANYCOMMENT_ABSPATH', dirname( __FILE__ ) );
defined( 'ANYCOMMENT_PLUGIN_BASENAME' ) or define( 'ANYCOMMENT_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
defined( 'ANYCOMMENT_CACHE_DIR' ) or define( 'ANYCOMMENT_CACHE_DIR', ABSPATH . str_replace( '/', DIRECTORY_SEPARATOR, 'wp-content/cache/anycomment' ) );
$enableDebug = getenv( 'ENV' ) === 'dev';
defined( 'ANYCOMMENT_DEBUG' ) or define( 'ANYCOMMENT_DEBUG', $enableDebug );
return \AnyComment\AnyCommentCore::instance();
}
anycomment();