| 1 |
<?php |
| 2 |
/* |
| 3 |
* Plugin Name: Plugin Groups |
| 4 |
* Plugin URI: https://cramer.co.za |
| 5 |
* Description: Organize Plugins in groups |
| 6 |
* Version: 2.0.4 |
| 7 |
* Author: David Cramer |
| 8 |
* Author URI: https://cramer.co.za |
| 9 |
* Text Domain: plugin-groups |
| 10 |
* License: GPL2+ |
| 11 |
*/ |
| 12 |
|
| 13 |
// If this file is called directly, abort. |
| 14 |
if ( ! defined( 'WPINC' ) ) { |
| 15 |
die; |
| 16 |
} |
| 17 |
|
| 18 |
// Constants. |
| 19 |
define( 'PLGGRP_PATH', plugin_dir_path( __FILE__ ) ); |
| 20 |
define( 'PLGGRP_CORE', __FILE__ ); |
| 21 |
define( 'PLGGRP_URL', plugin_dir_url( __FILE__ ) ); |
| 22 |
define( 'PLGGRP_SLUG', basename( __DIR__ ) . '/' . basename( __FILE__ ) ); |
| 23 |
|
| 24 |
if ( ! version_compare( PHP_VERSION, '5.6', '>=' ) ) { |
| 25 |
if ( is_admin() ) { |
| 26 |
add_action( 'admin_notices', 'plugin_groups_php_ver' ); |
| 27 |
} |
| 28 |
} else { |
| 29 |
// Includes Plugin_Groups and starts instance. |
| 30 |
include_once PLGGRP_PATH . 'bootstrap.php'; |
| 31 |
} |
| 32 |
|
| 33 |
function plugin_groups_php_ver() { |
| 34 |
|
| 35 |
$message = __( 'Plugin Groups requires PHP version 5.6 or later. We strongly recommend PHP 5.6 or later for security and performance reasons.', 'plugin-groups' ); |
| 36 |
echo sprintf( '<div id="plugin_groups_error" class="error notice notice-error"><p>%s</p></div>', esc_html( $message ) ); |
| 37 |
} |
| 38 |
|
| 39 |
|