| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /inetpub/wwwroot/cdc/wp-content/plugins/members/addons/members-block-permissions/src/ |
Upload File : |
<?php
/**
* Plugin Activator.
*
* Runs the plugin activation routine.
*
* @package MembersBlockPermissions
* @author The MemberPress Team
* @copyright 2019, The MemberPress Team
* @link https://members-plugin.com/-block-permissions
* @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0-or-later
*/
namespace Members\BlockPermissions;
defined('ABSPATH') || exit;
/**
* Activator class.
*
* @since 1.0.0
* @access public
*/
class Activator {
/**
* Runs necessary code when first activating the plugin.
*
* @since 1.0.0
* @access public
* @return void
*/
public static function activate() {
// Get the administrator role.
$role = get_role( 'administrator' );
// If the administrator role exists, add required capabilities
// for the plugin.
if ( ! empty( $role ) ) {
$role->add_cap( 'assign_block_permissions' );
}
}
}