首先,设置单选二单选按钮,并给出一个相关名称,如“cf\\u current\\u list”,如果是,请设置保存按钮,然后在函数中设置代码。php文件
喜欢
if(isset($_REQUEST[\'buuton_nm\'])){
if ( get_option( cf_current_list ) !== false ) {
// The option already exists, so we just update it.
update_option( cf_current_list, $_REQUEST[\'radio_btn_nm\'] );
} else {
// The option hasn\'t been added yet. We\'ll add it with $autoload set to \'no\'.
$deprecated = null;
$autoload = \'no\';
add_option( cf_current_list, $_REQUEST[\'radio_btn_nm\'], $deprecated, $autoload );
}
}
尝试此代码