-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsubstack-sync.php
More file actions
58 lines (49 loc) · 1.84 KB
/
substack-sync.php
File metadata and controls
58 lines (49 loc) · 1.84 KB
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
<?php
declare(strict_types=1);
/**
* Plugin Name: Substack Sync
* Plugin URI: https://www.christopherspenn.com/2025/08/substack-sync-for-wordpress/
* Description: Syncs a Substack RSS feed to your WordPress site. NO SUPPORT PROVIDED. Use at your own risk. If it lights your computer on fire, it's not the author's fault.
* Version: 1.0.2
* Author: Christopher S. Penn
* Author URI: https://www.christopherspenn.com/
* License: Apache-2.0
* License URI: https://www.apache.org/licenses/LICENSE-2.0
* Text Domain: substack-sync
* Network: false
* Requires at least: 6.0
* Tested up to: 6.6
* Requires PHP: 8.0
*/
// If this file is called directly, abort.
if (! defined('WPINC')) {
die;
}
// Define Plugin Constants
define('SUBSTACK_SYNC_VERSION', '1.0.2');
define('SUBSTACK_SYNC_PLUGIN_DIR', plugin_dir_path(__FILE__));
/**
* The code that runs during plugin activation.
*/
function activate_substack_sync(): void
{
require_once SUBSTACK_SYNC_PLUGIN_DIR . 'includes/class-substack-sync-activator.php';
Substack_Sync_Activator::activate();
}
/**
* The code that runs during plugin deactivation.
*/
function deactivate_substack_sync(): void
{
require_once SUBSTACK_SYNC_PLUGIN_DIR . 'includes/class-substack-sync-deactivator.php';
Substack_Sync_Deactivator::deactivate();
}
register_activation_hook(__FILE__, 'activate_substack_sync');
register_deactivation_hook(__FILE__, 'deactivate_substack_sync');
// Include All Other Files
require_once SUBSTACK_SYNC_PLUGIN_DIR . 'admin/class-substack-sync-admin.php';
require_once SUBSTACK_SYNC_PLUGIN_DIR . 'includes/class-substack-sync-cron.php';
require_once SUBSTACK_SYNC_PLUGIN_DIR . 'includes/class-substack-sync-processor.php';
// Initialize the classes
new Substack_Sync_Admin();
new Substack_Sync_Cron();