-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrafty-in-here.php
46 lines (41 loc) · 1.29 KB
/
drafty-in-here.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
38
39
40
41
42
43
44
45
46
<?php
/**
* Plugin Name: Drafty In Here
* Version: 1.2.0
* Plugin URI: https://wordpress.org/plugins/drafty-in-here/
* Author: Aron Marriott-Smith <[email protected]>
* Author URI: http://aronmarriottsmith.co.uk
* Text Domain: drafty-in-here
* Domain Path: /languages/
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* Description: Get email notifications of draft posts sitting in your WordPress Blog waiting to be published.
*/
/**
* Prevent this script being called outside WordPress
*/
if ( ! defined('ABSPATH') ) {
exit;
}
/**
* Define a constant for use later
*/
if ( ! defined( 'DRAFTY_FILE' ) ) {
define( 'DRAFTY_FILE', __FILE__ );
}
/**
* Because we our plugin uses namespaces and composer we need at least PHP 5.3.2+ to run
* If we have PHP 5.3.2+ installed we load the plugin
* If we do not have at least PHP 5.3.2 installed we display an error
*/
if ( version_compare( PHP_VERSION, '5.3.2', '>=' ) ) {
require_once( dirname( DRAFTY_FILE ) . '/drafty-main.php' );
}
else {
is_admin() && add_action('admin_notices', create_function('', "
echo '
<div class=\"error\"><p>".
sprintf( __('Sorry %s requires at least PHP 5.3.2 to function properly. Please upgrade PHP.', 'drafty-in-here'), 'Drafty In Here')
."</p></div>';"
));
}