List of arguments for $option
Code
<h1><?php echo get_option( 'blogname' ); ?></h1>
Output
Code
<p><?php echo esc_html( sprintf( __( 'Character set: %s', 'textdomain' ), get_option( 'blog_charset' ) ) ); ?></p>
Output
Character set: UTF-8
Code
<?php echo get_option( 'something_bla_bla_bla' ); ?>
Output
false
Code
<?php echo get_option( 'something_bla_bla_bla', 'Oh no!' ); ?>
Output
Oh no!
Parameter | Details |
---|---|
$option | (string) Name of option to retrieve. Expected to not be SQL-escaped. |
$default | (mixed) (Optional) Default value to return if the option does not exist. |