function ci_create_menu() { add_action('admin_init', 'ci_register_settings'); // Handle reset before anything is outputed in the browser. // This is here because it needs the settings to be registered, but because it // redirects, it should be called before the ci_settings_page. global $pagenow; if (is_admin() && isset($_POST['reset']) && $pagenow == "themes.php") { delete_option(THEME_OPTIONS); global $ci; $ci = array(); ci_default_options(true); wp_redirect('themes.php?page=ci_panel.php'); } if (!CI_WHITELABEL) { $menu_title = __('CSSIgniter Settings', 'ci_theme'); } else { $menu_title = __('Theme Settings', 'ci_theme'); } $menu_title = apply_filters('ci_panel_menu_title', $menu_title, CI_WHITELABEL); add_theme_page($menu_title, $menu_title, 'edit_theme_options', basename(__FILE__), 'ci_settings_page'); }
function ci_default_fields_set() { ci_default_options(false); }