wp_protect_special_option()
Protects WordPress special option from being modified.
Will die if $option is in protected list. Protected options are 'alloptions' and 'notoptions' options.
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
wp_protect_special_option( $option );
- $option(строка) (обязательный)
- Option name.
Список изменений
С версии 2.2.0 | Введена. |
Код wp_protect_special_option() wp protect special option WP 6.5.2
function wp_protect_special_option( $option ) { if ( 'alloptions' === $option || 'notoptions' === $option ) { wp_die( sprintf( /* translators: %s: Option name. */ __( '%s is a protected WP option and may not be modified' ), esc_html( $option ) ) ); } }