| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* The plugin bootstrap file |
| 5 |
* |
| 6 |
* This file is read by WordPress to generate the plugin information in the plugin |
| 7 |
* admin area. This file also includes all of the dependencies used by the plugin, |
| 8 |
* registers the activation and deactivation functions, and defines a function |
| 9 |
* that starts the plugin. |
| 10 |
* |
| 11 |
* @link http://www.awakensolutions.com |
| 12 |
* @since 1.0.0 |
| 13 |
* @package Simple_Restrict |
| 14 |
* |
| 15 |
* @wordpress-plugin |
| 16 |
* Plugin Name: Simple Restrict |
| 17 |
* Plugin URI: http://www.awakensolutions.com/simple-restrict/ |
| 18 |
* Description: Restrict pages based on permissions assigned to pages and granted in user profiles. |
| 19 |
* Version: 1.2.3 |
| 20 |
* Author: Awaken Solutions Inc. |
| 21 |
* Author URI: http://www.awakensolutions.com |
| 22 |
* License: GPLv2 or later |
| 23 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 24 |
* Text Domain: simple-restrict |
| 25 |
* Domain Path: /languages |
| 26 |
*/ |
| 27 |
|
| 28 |
// If this file is called directly, abort. |
| 29 |
if ( ! defined( 'WPINC' ) ) { |
| 30 |
die; |
| 31 |
} |
| 32 |
|
| 33 |
/** |
| 34 |
* The code that runs during plugin activation. |
| 35 |
* This action is documented in includes/class-simple-restrict-activator.php |
| 36 |
*/ |
| 37 |
function activate_simple_restrict() { |
| 38 |
require_once plugin_dir_path( __FILE__ ) . 'includes/class-simple-restrict-activator.php'; |
| 39 |
Simple_Restrict_Activator::activate(); |
| 40 |
} |
| 41 |
|
| 42 |
/** |
| 43 |
* The code that runs during plugin deactivation. |
| 44 |
* This action is documented in includes/class-simple-restrict-deactivator.php |
| 45 |
*/ |
| 46 |
function deactivate_simple_restrict() { |
| 47 |
require_once plugin_dir_path( __FILE__ ) . 'includes/class-simple-restrict-deactivator.php'; |
| 48 |
Simple_Restrict_Deactivator::deactivate(); |
| 49 |
} |
| 50 |
|
| 51 |
register_activation_hook( __FILE__, 'activate_simple_restrict' ); |
| 52 |
register_deactivation_hook( __FILE__, 'deactivate_simple_restrict' ); |
| 53 |
|
| 54 |
/** |
| 55 |
* The core plugin class that is used to define internationalization, |
| 56 |
* admin-specific hooks, and public-facing site hooks. |
| 57 |
*/ |
| 58 |
require plugin_dir_path( __FILE__ ) . 'includes/class-simple-restrict.php'; |
| 59 |
|
| 60 |
/** |
| 61 |
* Begins execution of the plugin. |
| 62 |
* |
| 63 |
* Since everything within the plugin is registered via hooks, |
| 64 |
* then kicking off the plugin from this point in the file does |
| 65 |
* not affect the page life cycle. |
| 66 |
* |
| 67 |
* @since 1.0.0 |
| 68 |
*/ |
| 69 |
function run_simple_restrict() { |
| 70 |
|
| 71 |
$plugin = new Simple_Restrict(); |
| 72 |
$plugin->run(); |
| 73 |
|
| 74 |
} |
| 75 |
run_simple_restrict(); |
| 76 |
|