-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreplies-importer-for-mastodon.php
37 lines (33 loc) · 1.36 KB
/
replies-importer-for-mastodon.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
<?php
/**
* Plugin Name: Replies Importer for Mastodon
* Plugin URI: https://odd.blog/replies-importer-for-mastodon/
* Description: Imports replies from Mastodon as comments on WordPress posts.
* Version: 0.0.1
* Author: Donncha Ó Caoimh
* Author URI: https://odd.blog/
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: replies-importer-for-mastodon
*
* @package RepliesImporterForMastodon
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
// Define plugin constants.
define( 'REPLIES_IMPORTER_FOR_MASTODON_VERSION', '0.0.1' );
define( 'REPLIES_IMPORTER_FOR_MASTODON_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'REPLIES_IMPORTER_FOR_MASTODON_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
// Include necessary files.
require_once REPLIES_IMPORTER_FOR_MASTODON_PLUGIN_DIR . 'includes/debug.php';
require_once REPLIES_IMPORTER_FOR_MASTODON_PLUGIN_DIR . 'includes/config.php';
require_once REPLIES_IMPORTER_FOR_MASTODON_PLUGIN_DIR . 'includes/admin-functions.php';
require_once REPLIES_IMPORTER_FOR_MASTODON_PLUGIN_DIR . 'includes/api-functions.php';
// Initialize the plugin.
function replies_importer_for_mastodon_init() {
$admin_functions = new Replies_Importer_For_Mastodon_Admin();
$admin_functions->init();
}
add_action( 'plugins_loaded', 'replies_importer_for_mastodon_init' );