# force-refresh/2.1.5/includes/actions/admin/inc.roles.php

Force Refresh, version 2.1.5. 20 lines.

- Page: https://pluginprobe.com/plugins/force-refresh/2.1.5/code/includes/actions/admin/inc.roles.php
- Raw: https://pluginprobe.com/plugins/force-refresh/2.1.5/raw/includes/actions/admin/inc.roles.php
- Modified: 2020-09-16T23:04:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/force-refresh/2.1.5/code/includes/actions/admin/inc.roles.php#L10-L20`.

```php
<?php
/**
 * Action responsible for registering the capability to request refreshes to administrators
 * of the site.
 *
 * @package ForceRefresh
 */

namespace JordanLeven\Plugins\ForceRefresh;

// Add the action to add the Force Refresh capability to allow developers to customize which users
// and roles can init a Force Refresh.
add_action(
    'admin_init',
    function() {
        $role = get_role( 'administrator' );
        $role->add_cap( WP_FORCE_REFRESH_CAPABILITY );
    }
);

```
