| 1 |
<?php |
| 2 |
/** |
| 3 |
* The plugin bootstrap file |
| 4 |
* |
| 5 |
* This file is read by WordPress to generate the plugin information in the plugin |
| 6 |
* admin area. This file also includes all of the dependencies used by the plugin, |
| 7 |
* registers the activation and deactivation functions, and defines a function |
| 8 |
* that starts the plugin. |
| 9 |
* |
| 10 |
* @link https://wpruby.com |
| 11 |
* @since 1.0.0 |
| 12 |
* @package Controlled_Admin_Access |
| 13 |
* |
| 14 |
* @wordpress-plugin |
| 15 |
* Plugin Name: Controlled Admin Access |
| 16 |
* Plugin URI: https://wpruby.com/product/controlled-admin-access |
| 17 |
* Description: Grant a temporary limited admin access to others. |
| 18 |
* Version: 2.1.2 |
| 19 |
* Author: WPRuby |
| 20 |
* Author URI: https://wpruby.com |
| 21 |
* License: GPL-2.0+ |
| 22 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 23 |
* Text Domain: controlled-admin-access |
| 24 |
* Domain Path: /languages |
| 25 |
*/ |
| 26 |
|
| 27 |
namespace WPRuby_CAA; |
| 28 |
|
| 29 |
// If this file is called directly, abort. |
| 30 |
|
| 31 |
use WPRuby_CAA\Core\Core; |
| 32 |
|
| 33 |
if ( ! defined( 'WPINC' ) ) { |
| 34 |
die; |
| 35 |
} |
| 36 |
|
| 37 |
class WPRuby_Controlled_Admin_Access { |
| 38 |
|
| 39 |
protected static $_instance = null; |
| 40 |
|
| 41 |
/** |
| 42 |
* @return WPRuby_Controlled_Admin_Access |
| 43 |
*/ |
| 44 |
public static function get_instance() |
| 45 |
{ |
| 46 |
if ( is_null( self::$_instance ) ) { |
| 47 |
self::$_instance = new self(); |
| 48 |
} |
| 49 |
return self::$_instance; |
| 50 |
} |
| 51 |
|
| 52 |
/** |
| 53 |
* WPRuby_Controlled_Admin_Access constructor. |
| 54 |
*/ |
| 55 |
public function __construct() |
| 56 |
{ |
| 57 |
Core::get_instance(); |
| 58 |
} |
| 59 |
} |
| 60 |
|
| 61 |
register_activation_hook( __FILE__, function () { |
| 62 |
$active_plugins = apply_filters('active_plugins', get_option('active_plugins')); |
| 63 |
if (in_array('controlled-admin-access-pro/controlled-admin-access-pro.php', $active_plugins)) { |
| 64 |
deactivate_plugins('controlled-admin-access-pro/controlled-admin-access-pro.php'); |
| 65 |
} |
| 66 |
} ); |
| 67 |
|
| 68 |
require_once dirname(__FILE__ ) . '/includes/autoloader.php'; |
| 69 |
|
| 70 |
WPRuby_Controlled_Admin_Access::get_instance(); |
| 71 |
|