WordPress 中文文档
Function Reference/get option
From WordPress Chinese
目录 |
[编辑]
Description
A safe way of getting values for a named option from the options database table.
[编辑]
Usage
%%% <?php echo get_option('show'); ?> %%%
[编辑]
Examples
[编辑]
Show Blog Title
Displays your blog's title in a <h1> tag.
%%%[编辑]
<?php echo get_option('blogname'); ?>
%%%[编辑]
Show Character Set
Displays the character set your blog is using (ex: UTF-8)
%%%Character set: <?php echo get_option('blog_charset'); ?>
%%%[编辑]
Retrieve Administrator E-mail
Retrieve the e-mail of the blog administrator, storing it in a variable.
%%% <?php $admin_email = get_option('admin_email'); ?> %%%
[编辑]
Parameters
[编辑]
