File Manager / wp-content Search Upload New Item Settings File "db5.php" Full path: /home1/epichome/public_html/wp-content/db5.php File size: 60.67 B (60.67 KB bytes) MIME-type: text/x-php Charset: utf-8 Download Open Edit Advanced Editor Back
<?php
/**
* Plugin Activator.
*
* Runs the plugin activation routine.
*
* @package MembersIntegrationACF
* @author Justin Tadlock <justintadlock@gmail.com>
* @copyright 2019, Justin Tadlock
* @link https://themehybrid.com/plugins/members-acf-integration
* @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0-or-later
*/
namespace Members\Integration\ACF;
/**
* 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( 'manage_acf' );
$role->add_cap( 'edit_acf_field_groups' );
$role->add_cap( 'edit_others_acf_field_groups' );
$role->add_cap( 'delete_acf_field_groups' );
$role->add_cap( 'delete_others_acf_field_groups' );
}
}
}
