-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodify-theme-blvd-plugin-capabilities.php
More file actions
63 lines (37 loc) · 1.61 KB
/
modify-theme-blvd-plugin-capabilities.php
File metadata and controls
63 lines (37 loc) · 1.61 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/*
Plugin Name: Modify Theme Blvd Plugin Capabilities
Description: Modify capabilities to allow Editors access to Theme Blvd plugins
Version: 0.3.2
Author: Scot Rumery
Author URI: http://rumspeed.com
License: GPLv2
*/
/* Copyright 2023 Scot Rumery (email : scot@rumspeed.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
define( 'RUM_MODIFY_CAPS_PLUGIN_VERSION', '0.3.2' );
define( 'RUM_MODIFY_CAPS_PLUGIN_DIR', dirname( __FILE__ ) );
define( 'RUM_MODIFY_CAPS_PLUGIN_URI', plugins_url( '' , __FILE__ ) );
// include files - these are simply to organize functions into logical areas
include_once( 'includes/modify-caps.php' );
register_activation_hook( __FILE__, 'mtbpc_plugin_activated' );
register_deactivation_hook( __FILE__, 'mtbpc_plugin_deactivated' );
function mtbpc_plugin_activated() {
$role = get_role( 'editor' );
$role->add_cap( 'manage_options' );
}
function mtbpc_plugin_deactivated() {
$role = get_role( 'editor' );
$role->remove_cap( 'manage_options' );
}