form_option

Print option value after sanitizing for forms.

Description

form_option( (string) $option ); 

Parameters (1)

0. $option (string)
Option name.

Usage

  1. if ( !function_exists( 'form_option' ) ) { 
  2. require_once ABSPATH . WPINC . '/option.php'; 
  3.  
  4. // Option name. 
  5. $option = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = form_option($option); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/option.php  
  1. function form_option( $option ) { 
  2. echo esc_attr( get_option( $option ) );