|
2 | 2 | /* |
3 | 3 | Plugin Name: Modify Theme Blvd Plugin Capabilities |
4 | 4 | Description: Modify capabilities to allow Editors access to Theme Blvd plugins |
5 | | -Version: 0.3.1 |
| 5 | +Version: 0.3.2 |
6 | 6 | Author: Scot Rumery |
7 | | -Author URI: http://rumspeed.com/scot-rumery/ |
| 7 | +Author URI: http://rumspeed.com |
8 | 8 | License: GPLv2 |
9 | 9 | */ |
10 | 10 |
|
11 | | -/* Copyright 2013 Scot Rumery (email : scot@rumspeed.com) |
| 11 | +/* Copyright 2023 Scot Rumery (email : scot@rumspeed.com) |
12 | 12 |
|
13 | 13 | This program is free software; you can redistribute it and/or modify |
14 | 14 | it under the terms of the GNU General Public License as published by |
|
29 | 29 |
|
30 | 30 |
|
31 | 31 |
|
32 | | -define( 'RUM_MODIFY_CAPS_PLUGIN_VERSION', '0.3.1' ); |
| 32 | +define( 'RUM_MODIFY_CAPS_PLUGIN_VERSION', '0.3.2' ); |
33 | 33 | define( 'RUM_MODIFY_CAPS_PLUGIN_DIR', dirname( __FILE__ ) ); |
34 | 34 | define( 'RUM_MODIFY_CAPS_PLUGIN_URI', plugins_url( '' , __FILE__ ) ); |
35 | 35 |
|
|
39 | 39 | // include files - these are simply to organize functions into logical areas |
40 | 40 | include_once( 'includes/modify-caps.php' ); |
41 | 41 |
|
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +register_activation_hook( __FILE__, 'mtbpc_plugin_activated' ); |
| 46 | +register_deactivation_hook( __FILE__, 'mtbpc_plugin_deactivated' ); |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +function mtbpc_plugin_activated() { |
| 52 | + $role = get_role( 'editor' ); |
| 53 | + $role->add_cap( 'manage_options' ); |
| 54 | +} |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | +function mtbpc_plugin_deactivated() { |
| 60 | + $role = get_role( 'editor' ); |
| 61 | + $role->remove_cap( 'manage_options' ); |
| 62 | +} |
| 63 | + |
0 commit comments