whitelist_options
Устарел с версии 5.5.0. Больше не поддерживается и может быть удален. Смотрите allowed_options.
Filters the allowed options list.
Использование
add_filter( 'whitelist_options', 'wp_kama_whitelist_options_filter', 10, 3 );
/**
* Function for `whitelist_options` filter-hook.
*
* @param array $allowed_options The allowed options list.
* @param $string
* @param $condition
*
* @return array
*/
function wp_kama_whitelist_options_filter( $allowed_options, $string, $condition ){
// filter...
return $allowed_options;
}
- $allowed_options(массив)
- The allowed options list.
- $string
- -
- $condition
- -
Список изменений
| С версии 2.7.0 | Введена. |
| Устарела с 5.5.0 | Use {@see 'allowed_options'} instead. |
Где вызывается хук
В файле: /wp-admin/options.php
whitelist_options
wp-admin/options.php 222-228
$allowed_options = apply_filters_deprecated( 'whitelist_options', array( $allowed_options ), '5.5.0', 'allowed_options', __( 'Please consider writing more inclusive code.' ) );