filtrod 2.8.0
map_meta_cap
Opis — z kodu źródłowego
Filters the primitive capabilities required of the given user to satisfy the capability being checked.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$caps | string[] | Primitive capabilities required of the user. |
$cap | string | Capability being checked. |
$user_id | int | The user ID. |
$args | array | Adds context to the capability check, typically starting with an object ID. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'map_meta_cap', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'map_meta_cap', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii