| 1 |
<?php |
| 2 |
defined('ABSPATH') or die; |
| 3 |
|
| 4 |
/* |
| 5 |
Plugin Name: FluentComments |
| 6 |
Plugin URI: https://github.com/WPManageNinja/fluent-comments |
| 7 |
Description: Simple Comments Plugin for WordPress to fight with spams and trolls |
| 8 |
Version: 2.0.0 |
| 9 |
Author: WPManageNinja Team |
| 10 |
Author URI: https://wpmanageninja.com |
| 11 |
License: GPLv2 or later |
| 12 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 13 |
Text Domain: fluent-comments |
| 14 |
Domain Path: /languages |
| 15 |
*/ |
| 16 |
|
| 17 |
define('FLUENT_COMMENTS_PLUGIN_PATH', plugin_dir_path(__FILE__)); |
| 18 |
define('FLUENT_COMMENTS_PLUGIN_URL', plugin_dir_url(__FILE__)); |
| 19 |
define('FLUENT_COMMENTS_VERSION', '2.0.0'); |
| 20 |
|
| 21 |
class FluentCommentsPlugin |
| 22 |
{ |
| 23 |
|
| 24 |
public function boot() |
| 25 |
{ |
| 26 |
$this->registerAutoLoad(); |
| 27 |
} |
| 28 |
|
| 29 |
private function registerAutoLoad() |
| 30 |
{ |
| 31 |
require_once FLUENT_COMMENTS_PLUGIN_PATH . 'app/Helpers/Arr.php'; |
| 32 |
require_once FLUENT_COMMENTS_PLUGIN_PATH . 'app/Hooks/Handlers/AdminSettingsHandler.php'; |
| 33 |
require_once FLUENT_COMMENTS_PLUGIN_PATH . 'app/Hooks/Handlers/CommentsHandler.php'; |
| 34 |
require_once FLUENT_COMMENTS_PLUGIN_PATH . 'app/Hooks/Handlers/CommentNotificationHandler.php'; |
| 35 |
require_once FLUENT_COMMENTS_PLUGIN_PATH . 'app/Http/Controllers/CommentsController.php'; |
| 36 |
require_once FLUENT_COMMENTS_PLUGIN_PATH . 'app/Services/Router.php'; |
| 37 |
require_once FLUENT_COMMENTS_PLUGIN_PATH . 'app/Services/Helper.php'; |
| 38 |
require_once FLUENT_COMMENTS_PLUGIN_PATH . 'app/Services/Mailer.php'; |
| 39 |
require_once FLUENT_COMMENTS_PLUGIN_PATH . 'app/Services/FluentWalkerComment.php'; |
| 40 |
|
| 41 |
add_action('rest_api_init', function () { |
| 42 |
require_once FLUENT_COMMENTS_PLUGIN_PATH . 'app/Http/routes.php'; |
| 43 |
}); |
| 44 |
|
| 45 |
require_once FLUENT_COMMENTS_PLUGIN_PATH . 'app/Hooks/hooks.php'; |
| 46 |
|
| 47 |
add_action('init', function () { |
| 48 |
load_plugin_textdomain('fluent-comments', false, dirname(plugin_basename(__FILE__)) . '/languages'); |
| 49 |
}); |
| 50 |
} |
| 51 |
} |
| 52 |
|
| 53 |
|
| 54 |
add_action('plugins_loaded', function () { |
| 55 |
(new FluentCommentsPlugin())->boot(); |
| 56 |
}); |
| 57 |
|