WordPress 中文文档
Function Reference/update option
From WordPress Chinese
目录 |
[编辑]
Description
A safe way of updating or adding a named option/value pair to the options database table. The indata is escaped with %%%$wpdb->escape%%% before the INSERT statement.
This function can be called even if the option does not exist, the function will create the option.
See add_option for more information.
[编辑]
Usage
<?php update_option($name, $value = '', $description = '', $autoload = 'yes'); ?>
[编辑]
Example
[编辑]
Usage
<?php update_option("myhack_extraction_length", '255',
'Max length of extracted text in characters.', 'yes'); ?>
[编辑]
Parameters
Template:Parameter Template:Parameter Template:Parameter Template:ParameterTemplate:Copyedit
