WP HOOKS
filtrdynamicznyod 3.2.0

option_page_capability_{$option_page}

Args 1Plik wp-admin/options.php

Opis — z kodu źródłowego

Filters the capability required when using the Settings API.

By default, the options groups for all registered settings require the manage_options capability. This filter is required to change the capability required for a certain options page.

Parametry

ParametrTypOpis
$capabilitystringThe capability used for the page, which is manage_options by default.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'option_page_capability_{$option_page}', 'twoja_funkcja' );

function twoja_funkcja($param_1) {
	// Twój kod
}

Popularne w tej kategorii