app_list = get_option('min_appear_elems');
}
/**
* Admin page for visual editor
* @return void
* @package minima
*/
function getAdminPage() {
?>
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";
}
}
?>