$font) { if ($bmb_theme_font == $font_key) { $bmb_font['value'] = $font['family']; $bmb_font['css'] = 'body { font-family:'; $bmb_font['key'] = $bmb_theme_font; update_option('bmb_theme_font', $bmb_font); break; } } } if (isset($_POST['font-size-body'])) { $bmb_font['sizes']['body']['value'] = $_POST['font-size-body']; $bmb_font['sizes']['body']['css'] = ".widget-area, #content {font-size:".$_POST['font-size-body'].'px'; update_option('bmb_theme_font', $bmb_font); } if (isset($_POST['font-size-h1'])) { $bmb_font['sizes']['h1']['value'] = $_POST['font-size-h1']; $bmb_font['sizes']['h1']['css'] = "h1,h1.entry-title,h1.page-title {font-size:".$_POST['font-size-h1'].'px'; update_option('bmb_theme_font', $bmb_font); } if (isset($_POST['font-size-h2'])) { $bmb_font['sizes']['h2']['value'] = $_POST['font-size-h2']; $bmb_font['sizes']['h2']['css'] = "h2 {font-size:".$_POST['font-size-h2'].'px'; update_option('bmb_theme_font', $bmb_font); } if (isset($_POST['font-size-h3'])) { $bmb_font['sizes']['h3']['value'] = $_POST['font-size-h3']; $bmb_font['sizes']['h3']['css'] = "h3 {font-size:".$_POST['font-size-h3'].'px'; update_option('bmb_theme_font', $bmb_font); } if (isset($_POST['font-size-site_title'])) { $bmb_font['sizes']['site_title']['value'] = $_POST['font-size-site_title']; $bmb_font['sizes']['site_title']['css'] = ".logo a {font-size:".$_POST['font-size-site_title'].'px'; update_option('bmb_theme_font', $bmb_font); } if (isset($_POST['font-size-site_tagline'])) { $bmb_font['sizes']['site_tagline']['value'] = $_POST['font-size-site_tagline']; $bmb_font['sizes']['site_tagline']['css'] = "p.site-description {font-size:".$_POST['font-size-site_tagline'].'px'; update_option('bmb_theme_font', $bmb_font); } update_option('bmb_theme_colors', $bmb_theme_colors); bmb_update_style_sheet(); wp_redirect(admin_url('themes.php?page=bmb-theme-colors&updated=true')); } else { echo 'no!'; } } } function bmb_theme_color_settings() { //must check that the user has the required capability if (!current_user_can('manage_options')) { wp_die( __('You do not have sufficient permissions to access this page.') ); } // Read in existing option value from database $opt_val = get_option('bmb_theme_colors'); // Load user selected font from database $fonts = get_option('bmb_theme_font'); $font_sizes = array( 'default' => array(10, 11, 12, 13, 14, 15, 16, 18, 20), 'title' => array(26, 28, 30, 32, 34, 36, 38, 40, 45, 50, 55, 60), 'headers' => array(10, 11, 12, 13, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30,32) ); // Load set of fonts to use $font_list = bmb_font_list(); // Just to make sure we have some data, if not fill it up if ($opt_val =='' && empty($_GET['reset'])) { delete_option('bmb_theme_colors'); wp_redirect(admin_url('themes.php?page=bmb-theme-colors')); } $current=''; ?>
Visit your site to see how it looks.' ), home_url( '/' ) ); ?>