app_list = get_option('min_appear_elems'); } /** * Admin page for visual editor * @return void * @package minima */ function getAdminPage() { ?>
>

Appearance Editor

app_list['sections'] as $section) { ?> V
app_list['sections'] as $section) { ?>
'sp-bg-' . $element['selector'], 'name' => $element['name'])); break; case 'font': minima_admin_font(array('slug' => 'sp-font-' . $element['selector'], 'name' => $element['name'])); break; case 'both': minima_admin_font(array('slug' => 'sp-font-' . $element['selector'], 'class' => 'appearance-common ti-font-2c', 'name' => $element['name'])); minima_admin_background(array('slug' => 'sp-bg-' . $element['selector'], 'class' => 'appearance-common ti-bg-2c', 'name' => $element['name'])); break; case 'fontcolor': minima_admin_fontcolor(array('slug' => 'sp-font-' . $element['selector'], 'name' => $element['name'])); break; } ?>
ajaxUpdate(); update_option("ti_generate_css", 1); die(); } if (isset($_REQUEST['get_font_iframe'])) { $this->getFontIframe(); die(); } } /** * Includes font iframe file * @return void */ function getFontIframe() { } /** * Updates appearance settings * * This is a common function to update background and fonts of a defined element. * Handles : $_REQUEST['bg_elem'],$_REQUEST['bg'],$_REQUEST['font_elem'] and $_REQUEST['font'] * @return void * @package minima */ function ajaxUpdate() { if (isset($_POST['bg_elem'])) { $bg = json_decode(stripcslashes($_POST['bg'])); if (isset($bg->bg_img)) { $bg->bg_img_url = esc_url(wp_get_attachment_url($bg->bg_img)); } update_option($_POST['bg_elem'], $bg); } if (isset($_POST['font_elem'])) { $ti_fonts = get_option("sp-fonts", array()); $font = json_decode(stripcslashes($_POST['font'])); $ff = $ti_fonts[$font->font]; $ff['family'] = isset($ff['family'])?stripslashes($ff['family']):''; $ff['family'] = str_replace("'", '"', $ff['family']); $font->font_desc = $ff; update_option($_POST['font_elem'], $font); } print_r(get_option($_POST['bg_elem'])); print_r(get_option($_POST['font_elem'])); echo "ok"; } } ?>