Codex tools: Log in
Languages: English • 日本語 • Русский • Tiếng Việt • 中文(简体) • (Add your language)
Contents |
一种从数据库中获得数据的函数。如果想要获得的数据不存在或者没有相关的值,将会返回“FALSE”。
<?php echo get_option( $show, $default ); ?>
返回值可以是各种类型。
More information: Option_Reference
Displays your blog's title in a <h1> tag.
<h1><?php echo get_option('blogname'); ?></h1>
Displays the character set your blog is using (ex: UTF-8)
<p>Character set: <?php echo get_option('blog_charset'); ?> </p>
Retrieve the e-mail of the blog administrator, storing it in a variable.
<?php $admin_email = get_option('admin_email'); ?>
get_option() is located in wp-includes/functions.php.