On this page
form_option( string $option )
Prints option value after sanitizing for forms.
Parameters
$optionstring Required-
Option name.
Source
File: wp-includes/option.php. View all references
function form_option( $option ) {
echo esc_attr( get_option( $option ) );
}
Related
Uses
| Uses | Description |
|---|---|
| esc_attr() wp-includes/formatting.php | Escaping for HTML attributes. |
| get_option() wp-includes/option.php | Retrieves an option value based on an option name. |
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/form_option