wordpress option的操作

wordpress option的操作在wp-include/option.php中,这个文件中有add,get, update等接口,

例如:

$options_from_table = get_option( STAGS_OPTIONS_NAME );
if ( $options_from_table == false ) {
$options = (array) include( dirname(__FILE__) . '/helper.options.default.php' );
update_option( STAGS_OPTIONS_NAME, $options );

posted @ 2013-03-19 00:18  hurner  Views(277)  Comments(0Edit  收藏  举报