-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathshareadraft.php
More file actions
42 lines (34 loc) · 1.28 KB
/
Copy pathshareadraft.php
File metadata and controls
42 lines (34 loc) · 1.28 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
<?php
/**
* Plugin Name: Share a Draft
* Plugin URI: https://wordpress.org/plugins/shareadraft/
* Description: Generate safe-to-share, time- and usage-limited preview links so reviewers without a WordPress account can review a draft. Hardens the existing Preview Links.
* Version: 2.0.0-alpha
* Requires at least: 6.9
* Requires PHP: 8.2
* Author: Automattic
* Author URI: https://wpvip.com
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: shareadraft
* Domain Path: /languages
*/
use Automattic\ShareADraft\BulkLinkRevoker;
use Automattic\ShareADraft\LinkGarbageCollector;
use Automattic\ShareADraft\Plugin;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( defined( 'VIP_SHAREADRAFT_LOADED' ) ) {
return;
}
define( 'VIP_SHAREADRAFT_LOADED', true );
define( 'VIP_SHAREADRAFT_VERSION', '2.0.0-alpha' );
define( 'VIP_SHAREADRAFT_FILE', __FILE__ );
require_once __DIR__ . '/inc/autoload.php';
register_deactivation_hook( __FILE__, [ LinkGarbageCollector::class, 'unschedule' ] );
register_deactivation_hook( __FILE__, [ BulkLinkRevoker::class, 'unschedule' ] );
Plugin::get_instance()->register();
// Links made with Share a Draft 1.x, until 2.1.0 removes them.
require_once __DIR__ . '/vestigial.php';
Automattic\ShareADraft\Vestigial\bootstrap();