PluginProbe
Force Refresh / 2.10.2
Force Refresh v2.10.2
3.2.1 3.2.0 3.1.2 3.1.1 3.1.0 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.2.0 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.11.0 2.11.1 2.12.0 All 54 releases
force-refresh / includes / actions / admin / inc-roles.php

inc-roles.php in Force Refresh 2.10.2, at includes/actions/admin/inc-roles.php

20 lines 491 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Action responsible for registering the capability to request refreshes to administrators
4 * of the site.
5 *
6 * @package ForceRefresh
7 */
8
9 namespace JordanLeven\Plugins\ForceRefresh;
10
11 // Add the action to add the Force Refresh capability to allow developers to customize which users
12 // and roles can init a Force Refresh.
13 add_action(
14 'admin_init',
15 function () {
16 $role = get_role( 'administrator' );
17 $role->add_cap( WP_FORCE_REFRESH_CAPABILITY );
18 }
19 );
20