| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Post Lockdown |
| 4 |
* Plugin URI: https://github.com/andyexeter/post-lockdown |
| 5 |
* Description: Allows admins to protect selected posts and pages so they cannot be trashed or deleted by non-admin users. |
| 6 |
* Version: 4.0 |
| 7 |
* Requires at least: 4.6 |
| 8 |
* Requires PHP: 7.4 |
| 9 |
* Author: Andy Palmer |
| 10 |
* Author URI: https://andypalmer.me |
| 11 |
* Text Domain: post-lockdown |
| 12 |
* License: GPL v2 or later |
| 13 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 14 |
* Domain Path: /languages |
| 15 |
*/ |
| 16 |
require_once __DIR__ . '/src/PostLockdown/PostLockdown.php'; |
| 17 |
require_once __DIR__ . '/src/PostLockdown/OptionsPage.php'; |
| 18 |
require_once __DIR__ . '/src/PostLockdown/AdminNotice.php'; |
| 19 |
require_once __DIR__ . '/src/PostLockdown/StatusColumn.php'; |
| 20 |
require_once __DIR__ . '/src/PostLockdown/BulkActions.php'; |
| 21 |
require_once __DIR__ . '/src/PostLockdown/WpCli.php'; |
| 22 |
|
| 23 |
global $postlockdown; |
| 24 |
$postlockdown = new PostLockdown\PostLockdown(plugin_dir_path(__FILE__), plugin_dir_url(__FILE__)); |
| 25 |
|
| 26 |
register_uninstall_hook(__FILE__, [PostLockdown\PostLockdown::class, '_uninstall']); |
| 27 |
|
| 28 |
if (defined('WP_CLI') && WP_CLI) { |
| 29 |
WP_CLI::add_command('postlockdown', new PostLockdown\WpCli($postlockdown)); |
| 30 |
} |
| 31 |
|