//注册数据
add_action('admin_init', 'register_theme_settings');
function register_theme_settings()
{
register_setting("theme_mods_freshblog","theme_mods_freshblog");
}//添加admin外观菜单
add_action('admin_menu', 'add_theme_options_menu');
function add_theme_options_menu() {
add_theme_page('主题设置','主题选项','edit_theme_options','theme-options', 'theme_settings_admin');
}
function theme_settings_admin() { //这里写选项页面内容
if ( !empty($_POST) && check_admin_referer('theme_options-update') ) {
update_option('right-click-menu', $_POST['right-click-menu']);
echo '
保存成功。
}
?>
主题设置
右键菜单: | value="yes" />开启右键菜单 |
---|
}
?>
一键复制
编辑
Web IDE
原始数据
按行查看
历史