filtrod 2.0.0
role_has_cap
Opis — z kodu źródłowego
Filters which capabilities a role has.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$capabilities | bool[] | Array of key/value pairs where keys represent a capability name and boolean values represent whether the role has that capability. |
$cap | string | Capability name. |
$name | string | Role name. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'role_has_cap', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'role_has_cap', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii