📜  wordpress 选项 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:32.846000             🧑  作者: Mango

代码示例1
Wordpress options [stored in the {$wpdb->prefix}_options table]
store data about the site itself  (as opposed to site content)

Options are key value pairs, where the value can be a single value or an array of values.
// add a new option
add_option('wporg_custom_option', 'hello world!');
// get an option
$option = get_option('wporg_custom_option');