Ejemplo n.º 1
0
function us_custom_styles()
{
    global $of_options, $smof_data;
    // Resave theme custom CSS if the theme was updated
    $theme_version = us_get_main_theme_version();
    $last_custom_css_version = get_option('us_custom_css_version');
    if (empty($last_custom_css_version) or version_compare($last_custom_css_version, $theme_version, '<')) {
        $options_machine = new Options_Machine($of_options);
        $smof_data = array_merge($options_machine->Defaults, $smof_data);
        of_save_options($smof_data);
        us_save_styles($smof_data);
        update_option('us_custom_css_version', $theme_version);
    }
    $wp_upload_dir = wp_upload_dir();
    $styles_dir = $wp_upload_dir['basedir'] . '/us_custom_css';
    $styles_dir = str_replace('\\', '/', $styles_dir);
    $styles_file = $styles_dir . '/us_astra_custom_styles.css';
    if (file_exists($styles_file)) {
        wp_register_style('us_custom_css', $wp_upload_dir['baseurl'] . '/us_custom_css/us_astra_custom_styles.css', array(), '1', 'all');
        wp_enqueue_style('us_custom_css');
    } else {
        global $load_styles_directly;
        $load_styles_directly = true;
    }
    if (get_template_directory_uri() != get_stylesheet_directory_uri()) {
        wp_register_style('astra-style', get_stylesheet_directory_uri() . '/style.css', array(), '1', 'all');
        wp_enqueue_style('astra-style');
    }
}
Ejemplo n.º 2
0
/**
 * Add default options upon activation else DB does not exist
 *
 * DEPRECATED, Class_options_machine now does this on load to ensure all values are set
 *
 * @since 1.0.0
 */
function of_option_setup()
{
    global $of_options, $options_machine;
    $options_machine = new bresponZive_themepacific_Options_Machine($of_options);
    if (!of_get_options()) {
        of_save_options($options_machine->Defaults);
    }
}
Ejemplo n.º 3
0
/**
 * Add default options upon activation else DB does not exist
 *
 * @since 1.0.0
 */
function of_option_setup()
{
    global $of_options, $options_machine;
    $options_machine = new Options_Machine($of_options);
    if (!of_get_options()) {
        of_save_options($options_machine->Defaults);
    }
}
Ejemplo n.º 4
0
/**
 * Add default options upon activation else DB does not exist
 *
 * @since 1.0.0
 */
function of_option_setup()
{
    global $of_options, $options_machine, $smof_data;
    do_action('of_option_setup_before', array('of_options' => $of_options, 'options_machine' => $options_machine, 'smof_data' => $smof_data));
    $options_machine = new Options_Machine($of_options);
    if (empty($smof_data) || !isset($smof_data['smof_init'])) {
        // Let's set the values if the theme's already been active
        of_save_options($options_machine->Defaults);
        of_save_options(date('r'), 'smof_init');
        $smof_data = of_get_options();
        $data = $smof_data;
    }
    do_action('of_option_setup_after', array('of_options' => $of_options, 'options_machine' => $options_machine, 'smof_data' => $smof_data));
}
Ejemplo n.º 5
0
 function cs_set_options($option)
 {
     of_save_options(unserialize(base64_decode($option)));
 }
Ejemplo n.º 6
0
 /**
  * Process options data and build option fields
  *
  * @uses get_theme_mod()
  *
  * @access public
  * @since 1.0.0
  *
  * @return array
  */
 public static function optionsframework_machine($options)
 {
     global $smof_output, $smof_details, $smof_data;
     if (empty($options)) {
         return;
     }
     if (empty($smof_data)) {
         $smof_data = of_get_options();
     }
     $data = $smof_data;
     $defaults = array();
     $counter = 0;
     $menu = '';
     $output = '';
     $update_data = false;
     do_action('optionsframework_machine_before', array('options' => $options, 'smof_data' => $smof_data));
     if ($smof_output != "") {
         $output .= $smof_output;
         $smof_output = "";
     }
     foreach ($options as $value) {
         // sanitize option
         if ($value['type'] != "heading") {
             $value = self::sanitize_option($value);
         }
         $counter++;
         $val = '';
         //create array of defaults
         if ($value['type'] == 'multicheck') {
             if (is_array($value['std'])) {
                 foreach ($value['std'] as $i => $key) {
                     $defaults[$value['id']][$key] = true;
                 }
             } else {
                 $defaults[$value['id']][$value['std']] = true;
             }
         } else {
             if (isset($value['id'])) {
                 $defaults[$value['id']] = $value['std'];
             }
         }
         /* condition start */
         if (!empty($smof_data) || !empty($data)) {
             if (array_key_exists('id', $value) && !isset($smof_data[$value['id']])) {
                 $smof_data[$value['id']] = $value['std'];
                 if ($value['type'] == "checkbox" && $value['std'] == 0) {
                     $smof_data[$value['id']] = 0;
                 } else {
                     $update_data = true;
                 }
             }
             if (array_key_exists('id', $value) && !isset($smof_details[$value['id']])) {
                 $smof_details[$value['id']] = $smof_data[$value['id']];
             }
             //Start Heading
             if ($value['type'] != "heading") {
                 $class = '';
                 if (isset($value['class'])) {
                     $class = $value['class'];
                 }
                 //hide items in checkbox group
                 $fold = '';
                 if (array_key_exists("fold", $value)) {
                     if (isset($smof_data[$value['fold']]) && $smof_data[$value['fold']]) {
                         $fold = "f_" . $value['fold'] . " ";
                     } else {
                         $fold = "f_" . $value['fold'] . " temphide ";
                     }
                 }
                 $output .= '<div id="section-' . $value['id'] . '" class="' . $fold . 'section section-' . $value['type'] . ' ' . $class . '">' . "\n";
                 //only show header if 'name' value exists
                 if ($value['name']) {
                     $output .= '<h3 class="heading">' . $value['name'] . '</h3>' . "\n";
                 }
                 $output .= '<div class="option">' . "\n" . '<div class="controls">' . "\n";
             }
             //End Heading
             //if (!isset($smof_data[$value['id']]) && $value['type'] != "heading")
             //  continue;
             //switch statement to handle various options type
             switch ($value['type']) {
                 //text input
                 case 'text':
                     $t_value = '';
                     $t_value = stripslashes($smof_data[$value['id']]);
                     $mini = '';
                     if (!isset($value['mod'])) {
                         $value['mod'] = '';
                     }
                     if ($value['mod'] == 'mini') {
                         $mini = 'mini';
                     }
                     $output .= '<input class="of-input ' . $mini . '" name="' . $value['id'] . '" id="' . $value['id'] . '" type="' . $value['type'] . '" value="' . $t_value . '" />';
                     break;
                     //select option
                 //select option
                 case 'select':
                     $mini = '';
                     if (!isset($value['mod'])) {
                         $value['mod'] = '';
                     }
                     if ($value['mod'] == 'mini') {
                         $mini = 'mini';
                     }
                     $output .= '<div class="select_wrapper ' . $mini . '">';
                     $output .= '<select class="select of-input" name="' . $value['id'] . '" id="' . $value['id'] . '">';
                     foreach ($value['options'] as $select_ID => $option) {
                         $theValue = $option;
                         if (!is_numeric($select_ID)) {
                             $theValue = $select_ID;
                         }
                         $output .= '<option id="' . $select_ID . '" value="' . $theValue . '" ' . selected($smof_data[$value['id']], $theValue, false) . ' />' . $option . '</option>';
                     }
                     $output .= '</select></div>';
                     break;
                     //textarea option
                 //textarea option
                 case 'textarea':
                     $cols = '8';
                     $ta_value = '';
                     if (isset($value['options'])) {
                         $ta_options = $value['options'];
                         if (isset($ta_options['cols'])) {
                             $cols = $ta_options['cols'];
                         }
                     }
                     $ta_value = stripslashes($smof_data[$value['id']]);
                     $output .= '<textarea class="of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" cols="' . $cols . '" rows="8">' . $ta_value . '</textarea>';
                     break;
                     //radiobox option
                 //radiobox option
                 case "radio":
                     $checked = isset($smof_data[$value['id']]) ? checked($smof_data[$value['id']], $option, false) : '';
                     foreach ($value['options'] as $option => $name) {
                         $output .= '<input class="of-input of-radio" name="' . $value['id'] . '" type="radio" value="' . $option . '" ' . checked($smof_data[$value['id']], $option, false) . ' /><label class="radio">' . $name . '</label><br/>';
                     }
                     break;
                     //checkbox option
                 //checkbox option
                 case 'checkbox':
                     if (!isset($smof_data[$value['id']])) {
                         $smof_data[$value['id']] = 0;
                     }
                     $fold = '';
                     if (array_key_exists("folds", $value)) {
                         $fold = "fld ";
                     }
                     $output .= '<input type="hidden" class="' . $fold . 'checkbox of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" value="0"/>';
                     $output .= '<input type="checkbox" class="' . $fold . 'checkbox of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" value="1" ' . checked($smof_data[$value['id']], 1, false) . ' />';
                     break;
                     //multiple checkbox option
                 //multiple checkbox option
                 case 'multicheck':
                     isset($smof_data[$value['id']]) ? $multi_stored = $smof_data[$value['id']] : ($multi_stored = "");
                     foreach ($value['options'] as $key => $option) {
                         if (!isset($multi_stored[$key])) {
                             $multi_stored[$key] = '';
                         }
                         $of_key_string = $value['id'] . '_' . $key;
                         $output .= '<input type="checkbox" class="checkbox of-input" name="' . $value['id'] . '[' . $key . ']' . '" id="' . $of_key_string . '" value="1" ' . checked($multi_stored[$key], 1, false) . ' /><label class="multicheck" for="' . $of_key_string . '">' . $option . '</label><br />';
                     }
                     break;
                     // Color picker
                 // Color picker
                 case "color":
                     $default_color = '';
                     if (isset($value['std'])) {
                         $default_color = ' data-default-color="' . $value['std'] . '" ';
                     }
                     $output .= '<input name="' . $value['id'] . '" id="' . $value['id'] . '" class="of-color"  type="text" value="' . $smof_data[$value['id']] . '"' . $default_color . ' />';
                     break;
                     //typography option
                 //typography option
                 case 'typography':
                     $typography_stored = isset($smof_data[$value['id']]) ? $smof_data[$value['id']] : $value['std'];
                     /* Font Size */
                     if (isset($typography_stored['size'])) {
                         $output .= '<div class="select_wrapper typography-size" original-title="Font size">';
                         $output .= '<select class="of-typography of-typography-size select" name="' . $value['id'] . '[size]" id="' . $value['id'] . '_size">';
                         for ($i = 9; $i < 51; $i++) {
                             $test = $i . 'px';
                             $output .= '<option value="' . $i . 'px" ' . selected($typography_stored['size'], $test, false) . '>' . $i . 'px</option>';
                         }
                         $output .= '</select></div>';
                     }
                     /* Line Height */
                     if (isset($typography_stored['height'])) {
                         $output .= '<div class="select_wrapper typography-height" original-title="Line height">';
                         $output .= '<select class="of-typography of-typography-height select" name="' . $value['id'] . '[height]" id="' . $value['id'] . '_height">';
                         for ($i = 20; $i < 38; $i++) {
                             $test = $i . 'px';
                             $output .= '<option value="' . $i . 'px" ' . selected($typography_stored['height'], $test, false) . '>' . $i . 'px</option>';
                         }
                         $output .= '</select></div>';
                     }
                     /* Font Face */
                     if (isset($typography_stored['face'])) {
                         $output .= '<div class="select_wrapper typography-face" original-title="Font family">';
                         $output .= '<select class="of-typography of-typography-face select" name="' . $value['id'] . '[face]" id="' . $value['id'] . '_face">';
                         $output .= '<optgroup label="System Fonts" >';
                         $system_font_faces = array('arial' => 'Arial', 'verdana' => 'Verdana, Geneva', 'trebuchet' => 'Trebuchet', 'georgia' => 'Georgia', 'times' => 'Times New Roman', 'tahoma' => 'Tahoma, Geneva', 'palatino' => 'Palatino', 'helvetica' => 'Helvetica', "'Kozuka Mincho Pro','Kozuka Mincho Std','小塚明朝 Pro R','小塚明朝 Std R','Hiragino Mincho Pro','ヒラギノ明朝 Pro W3','MS P明朝','MS PMincho',serif" => 'Mincho');
                         foreach ($system_font_faces as $i => $system_font_face) {
                             $output .= '<option value="' . $i . '" ' . selected($typography_stored['face'], $i, false) . '>' . $system_font_face . '</option>';
                         }
                         $output .= '</optgroup><optgroup label="Google Fonts" >';
                         $google_font_faces = array('ABeeZee' => 'ABeeZee', 'Abel' => 'Abel', 'Abril Fatface' => 'Abril Fatface', 'Aclonica' => 'Aclonica', 'Acme' => 'Acme', 'Actor' => 'Actor', 'Adamina' => 'Adamina', 'Advent Pro' => 'Advent Pro', 'Aguafina Script' => 'Aguafina Script', 'Aladin' => 'Aladin', 'Aldrich' => 'Aldrich', 'Alegreya' => 'Alegreya', 'Alegreya SC' => 'Alegreya SC', 'Alex Brush' => 'Alex Brush', 'Alfa Slab One' => 'Alfa Slab One', 'Alice' => 'Alice', 'Alike' => 'Alike', 'Alike Angular' => 'Alike Angular', 'Allan' => 'Allan', 'Allerta' => 'Allerta', 'Allerta Stencil' => 'Allerta Stencil', 'Allura' => 'Allura', 'Almendra' => 'Almendra', 'Almendra SC' => 'Almendra SC', 'Amaranth' => 'Amaranth', 'Amatic SC' => 'Amatic SC', 'Amethysta' => 'Amethysta', 'Andada' => 'Andada', 'Andika' => 'Andika', 'Angkor' => 'Angkor', 'Annie Use Your Telescope' => 'Annie Use Your Telescope', 'Anonymous Pro' => 'Anonymous Pro', 'Antic' => 'Antic', 'Antic Didone' => 'Antic Didone', 'Antic Slab' => 'Antic Slab', 'Anton' => 'Anton', 'Arapey' => 'Arapey', 'Arbutus' => 'Arbutus', 'Architects Daughter' => 'Architects Daughter', 'Arimo' => 'Arimo', 'Arizonia' => 'Arizonia', 'Armata' => 'Armata', 'Artifika' => 'Artifika', 'Arvo' => 'Arvo', 'Asap' => 'Asap', 'Asset' => 'Asset', 'Astloch' => 'Astloch', 'Asul' => 'Asul', 'Atomic Age' => 'Atomic Age', 'Aubrey' => 'Aubrey', 'Audiowide' => 'Audiowide', 'Average' => 'Average', 'Averia Gruesa Libre' => 'Averia Gruesa Libre', 'Averia Libre' => 'Averia Libre', 'Averia Sans Libre' => 'Averia Sans Libre', 'Averia Serif Libre' => 'Averia Serif Libre', 'Bad Script' => 'Bad Script', 'Balthazar' => 'Balthazar', 'Bangers' => 'Bangers', 'Basic' => 'Basic', 'Battambang' => 'Battambang', 'Baumans' => 'Baumans', 'Bayon' => 'Bayon', 'Belgrano' => 'Belgrano', 'Belleza' => 'Belleza', 'Bentham' => 'Bentham', 'Berkshire Swash' => 'Berkshire Swash', 'Bevan' => 'Bevan', 'Bigshot One' => 'Bigshot One', 'Bilbo' => 'Bilbo', 'Bilbo Swash Caps' => 'Bilbo Swash Caps', 'Bitter' => 'Bitter', 'Black Ops One' => 'Black Ops One', 'Bokor' => 'Bokor', 'Bonbon' => 'Bonbon', 'Boogaloo' => 'Boogaloo', 'Bowlby One' => 'Bowlby One', 'Bowlby One SC' => 'Bowlby One SC', 'Brawler' => 'Brawler', 'Bree Serif' => 'Bree Serif', 'Bubblegum Sans' => 'Bubblegum Sans', 'Buda' => 'Buda', 'Buenard' => 'Buenard', 'Butcherman' => 'Butcherman', 'Butterfly Kids' => 'Butterfly Kids', 'Cabin' => 'Cabin', 'Cabin Condensed' => 'Cabin Condensed', 'Cabin Sketch' => 'Cabin Sketch', 'Caesar Dressing' => 'Caesar Dressing', 'Cagliostro' => 'Cagliostro', 'Calligraffitti' => 'Calligraffitti', 'Cambo' => 'Cambo', 'Candal' => 'Candal', 'Cantarell' => 'Cantarell', 'Cantata One' => 'Cantata One', 'Cardo' => 'Cardo', 'Carme' => 'Carme', 'Carter One' => 'Carter One', 'Caudex' => 'Caudex', 'Cedarville Cursive' => 'Cedarville Cursive', 'Ceviche One' => 'Ceviche One', 'Changa One' => 'Changa One', 'Chango' => 'Chango', 'Chau Philomene One' => 'Chau Philomene One', 'Chelsea Market' => 'Chelsea Market', 'Chenla' => 'Chenla', 'Cherry Cream Soda' => 'Cherry Cream Soda', 'Chewy' => 'Chewy', 'Chicle' => 'Chicle', 'Chivo' => 'Chivo', 'Coda' => 'Coda', 'Coda Caption' => 'Coda Caption', 'Codystar' => 'Codystar', 'Comfortaa' => 'Comfortaa', 'Coming Soon' => 'Coming Soon', 'Concert One' => 'Concert One', 'Condiment' => 'Condiment', 'Content' => 'Content', 'Contrail One' => 'Contrail One', 'Convergence' => 'Convergence', 'Cookie' => 'Cookie', 'Copse' => 'Copse', 'Corben' => 'Corben', 'Cousine' => 'Cousine', 'Coustard' => 'Coustard', 'Covered By Your Grace' => 'Covered By Your Grace', 'Crafty Girls' => 'Crafty Girls', 'Creepster' => 'Creepster', 'Crete Round' => 'Crete Round', 'Crimson Text' => 'Crimson Text', 'Crushed' => 'Crushed', 'Cuprum' => 'Cuprum', 'Cutive' => 'Cutive', 'Damion' => 'Damion', 'Dancing Script' => 'Dancing Script', 'Dangrek' => 'Dangrek', 'Dawning of a New Day' => 'Dawning of a New Day', 'Days One' => 'Days One', 'Delius' => 'Delius', 'Delius Swash Caps' => 'Delius Swash Caps', 'Delius Unicase' => 'Delius Unicase', 'Della Respira' => 'Della Respira', 'Devonshire' => 'Devonshire', 'Didact Gothic' => 'Didact Gothic', 'Diplomata' => 'Diplomata', 'Diplomata SC' => 'Diplomata SC', 'Doppio One' => 'Doppio One', 'Dorsa' => 'Dorsa', 'Dosis' => 'Dosis', 'Dr Sugiyama' => 'Dr Sugiyama', 'Droid Sans' => 'Droid Sans', 'Droid Sans Mono' => 'Droid Sans Mono', 'Droid Serif' => 'Droid Serif', 'Duru Sans' => 'Duru Sans', 'Dynalight' => 'Dynalight', 'EB Garamond' => 'EB Garamond', 'Eater' => 'Eater', 'Economica' => 'Economica', 'Electrolize' => 'Electrolize', 'Emblema One' => 'Emblema One', 'Emilys Candy' => 'Emilys Candy', 'Engagement' => 'Engagement', 'Enriqueta' => 'Enriqueta', 'Erica One' => 'Erica One', 'Esteban' => 'Esteban', 'Euphoria Script' => 'Euphoria Script', 'Ewert' => 'Ewert', 'Exo' => 'Exo', 'Expletus Sans' => 'Expletus Sans', 'Fanwood Text' => 'Fanwood Text', 'Fascinate' => 'Fascinate', 'Fascinate Inline' => 'Fascinate Inline', 'Federant' => 'Federant', 'Federo' => 'Federo', 'Felipa' => 'Felipa', 'Fjord One' => 'Fjord One', 'Flamenco' => 'Flamenco', 'Flavors' => 'Flavors', 'Fondamento' => 'Fondamento', 'Fontdiner Swanky' => 'Fontdiner Swanky', 'Forum' => 'Forum', 'Francois One' => 'Francois One', 'Fredericka the Great' => 'Fredericka the Great', 'Fredoka One' => 'Fredoka One', 'Freehand' => 'Freehand', 'Fresca' => 'Fresca', 'Frijole' => 'Frijole', 'Fugaz One' => 'Fugaz One', 'GFS Didot' => 'GFS Didot', 'GFS Neohellenic' => 'GFS Neohellenic', 'Galdeano' => 'Galdeano', 'Gentium Basic' => 'Gentium Basic', 'Gentium Book Basic' => 'Gentium Book Basic', 'Geo' => 'Geo', 'Geostar' => 'Geostar', 'Geostar Fill' => 'Geostar Fill', 'Germania One' => 'Germania One', 'Give You Glory' => 'Give You Glory', 'Glass Antiqua' => 'Glass Antiqua', 'Glegoo' => 'Glegoo', 'Gloria Hallelujah' => 'Gloria Hallelujah', 'Goblin One' => 'Goblin One', 'Gochi Hand' => 'Gochi Hand', 'Gorditas' => 'Gorditas', 'Goudy Bookletter 1911' => 'Goudy Bookletter 1911', 'Graduate' => 'Graduate', 'Gravitas One' => 'Gravitas One', 'Great Vibes' => 'Great Vibes', 'Gruppo' => 'Gruppo', 'Gudea' => 'Gudea', 'Habibi' => 'Habibi', 'Hammersmith One' => 'Hammersmith One', 'Handlee' => 'Handlee', 'Hanuman' => 'Hanuman', 'Happy Monkey' => 'Happy Monkey', 'Henny Penny' => 'Henny Penny', 'Herr Von Muellerhoff' => 'Herr Von Muellerhoff', 'Holtwood One SC' => 'Holtwood One SC', 'Homemade Apple' => 'Homemade Apple', 'Homenaje' => 'Homenaje', 'IM Fell DW Pica' => 'IM Fell DW Pica', 'IM Fell DW Pica SC' => 'IM Fell DW Pica SC', 'IM Fell Double Pica' => 'IM Fell Double Pica', 'IM Fell Double Pica SC' => 'IM Fell Double Pica SC', 'IM Fell English' => 'IM Fell English', 'IM Fell English SC' => 'IM Fell English SC', 'IM Fell French Canon' => 'IM Fell French Canon', 'IM Fell French Canon SC' => 'IM Fell French Canon SC', 'IM Fell Great Primer' => 'IM Fell Great Primer', 'IM Fell Great Primer SC' => 'IM Fell Great Primer SC', 'Iceberg' => 'Iceberg', 'Iceland' => 'Iceland', 'Imprima' => 'Imprima', 'Inconsolata' => 'Inconsolata', 'Inder' => 'Inder', 'Indie Flower' => 'Indie Flower', 'Inika' => 'Inika', 'Irish Grover' => 'Irish Grover', 'Istok Web' => 'Istok Web', 'Italiana' => 'Italiana', 'Italianno' => 'Italianno', 'Jim Nightshade' => 'Jim Nightshade', 'Jockey One' => 'Jockey One', 'Jolly Lodger' => 'Jolly Lodger', 'Josefin Sans' => 'Josefin Sans', 'Josefin Slab' => 'Josefin Slab', 'Judson' => 'Judson', 'Julee' => 'Julee', 'Junge' => 'Junge', 'Jura' => 'Jura', 'Just Another Hand' => 'Just Another Hand', 'Just Me Again Down Here' => 'Just Me Again Down Here', 'Kameron' => 'Kameron', 'Karla' => 'Karla', 'Kaushan Script' => 'Kaushan Script', 'Kelly Slab' => 'Kelly Slab', 'Kenia' => 'Kenia', 'Khmer' => 'Khmer', 'Knewave' => 'Knewave', 'Kotta One' => 'Kotta One', 'Koulen' => 'Koulen', 'Kranky' => 'Kranky', 'Kreon' => 'Kreon', 'Kristi' => 'Kristi', 'Krona One' => 'Krona One', 'La Belle Aurore' => 'La Belle Aurore', 'Lancelot' => 'Lancelot', 'Lato' => 'Lato', 'League Script' => 'League Script', 'Leckerli One' => 'Leckerli One', 'Ledger' => 'Ledger', 'Lekton' => 'Lekton', 'Lemon' => 'Lemon', 'Lilita One' => 'Lilita One', 'Limelight' => 'Limelight', 'Linden Hill' => 'Linden Hill', 'Lobster' => 'Lobster', 'Lobster Two' => 'Lobster Two', 'Londrina Outline' => 'Londrina Outline', 'Londrina Shadow' => 'Londrina Shadow', 'Londrina Sketch' => 'Londrina Sketch', 'Londrina Solid' => 'Londrina Solid', 'Lora' => 'Lora', 'Love Ya Like A Sister' => 'Love Ya Like A Sister', 'Loved by the King' => 'Loved by the King', 'Lovers Quarrel' => 'Lovers Quarrel', 'Luckiest Guy' => 'Luckiest Guy', 'Lusitana' => 'Lusitana', 'Lustria' => 'Lustria', 'Macondo' => 'Macondo', 'Macondo Swash Caps' => 'Macondo Swash Caps', 'Magra' => 'Magra', 'Maiden Orange' => 'Maiden Orange', 'Mako' => 'Mako', 'Marck Script' => 'Marck Script', 'Marko One' => 'Marko One', 'Marmelad' => 'Marmelad', 'Marvel' => 'Marvel', 'Mate' => 'Mate', 'Mate SC' => 'Mate SC', 'Maven Pro' => 'Maven Pro', 'Meddon' => 'Meddon', 'MedievalSharp' => 'MedievalSharp', 'Medula One' => 'Medula One', 'Megrim' => 'Megrim', 'Merienda One' => 'Merienda One', 'Merriweather' => 'Merriweather', 'Metal' => 'Metal', 'Metamorphous' => 'Metamorphous', 'Metrophobic' => 'Metrophobic', 'Michroma' => 'Michroma', 'Miltonian' => 'Miltonian', 'Miltonian Tattoo' => 'Miltonian Tattoo', 'Miniver' => 'Miniver', 'Miss Fajardose' => 'Miss Fajardose', 'Modern Antiqua' => 'Modern Antiqua', 'Molengo' => 'Molengo', 'Monofett' => 'Monofett', 'Monoton' => 'Monoton', 'Monsieur La Doulaise' => 'Monsieur La Doulaise', 'Montaga' => 'Montaga', 'Montez' => 'Montez', 'Montserrat' => 'Montserrat', 'Moul' => 'Moul', 'Moulpali' => 'Moulpali', 'Mountains of Christmas' => 'Mountains of Christmas', 'Mr Bedfort' => 'Mr Bedfort', 'Mr Dafoe' => 'Mr Dafoe', 'Mr De Haviland' => 'Mr De Haviland', 'Mrs Saint Delafield' => 'Mrs Saint Delafield', 'Mrs Sheppards' => 'Mrs Sheppards', 'Muli' => 'Muli', 'Mystery Quest' => 'Mystery Quest', 'Neucha' => 'Neucha', 'Neuton' => 'Neuton', 'News Cycle' => 'News Cycle', 'Niconne' => 'Niconne', 'Nixie One' => 'Nixie One', 'Nobile' => 'Nobile', 'Nokora' => 'Nokora', 'Norican' => 'Norican', 'Nosifer' => 'Nosifer', 'Nothing You Could Do' => 'Nothing You Could Do', 'Noticia Text' => 'Noticia Text', 'Nova Cut' => 'Nova Cut', 'Nova Flat' => 'Nova Flat', 'Nova Mono' => 'Nova Mono', 'Nova Oval' => 'Nova Oval', 'Nova Round' => 'Nova Round', 'Nova Script' => 'Nova Script', 'Nova Slim' => 'Nova Slim', 'Nova Square' => 'Nova Square', 'Numans' => 'Numans', 'Nunito' => 'Nunito', 'Odor Mean Chey' => 'Odor Mean Chey', 'Old Standard TT' => 'Old Standard TT', 'Oldenburg' => 'Oldenburg', 'Oleo Script' => 'Oleo Script', 'Open Sans' => 'Open Sans', 'Open Sans Condensed' => 'Open Sans Condensed', 'Orbitron' => 'Orbitron', 'Original Surfer' => 'Original Surfer', 'Oswald' => 'Oswald', 'Over the Rainbow' => 'Over the Rainbow', 'Overlock' => 'Overlock', 'Overlock SC' => 'Overlock SC', 'Ovo' => 'Ovo', 'Oxygen' => 'Oxygen', 'PT Mono' => 'PT Mono', 'PT Sans' => 'PT Sans', 'PT Sans Caption' => 'PT Sans Caption', 'PT Sans Narrow' => 'PT Sans Narrow', 'PT Serif' => 'PT Serif', 'PT Serif Caption' => 'PT Serif Caption', 'Pacifico' => 'Pacifico', 'Parisienne' => 'Parisienne', 'Passero One' => 'Passero One', 'Passion One' => 'Passion One', 'Patrick Hand' => 'Patrick Hand', 'Patua One' => 'Patua One', 'Paytone One' => 'Paytone One', 'Permanent Marker' => 'Permanent Marker', 'Petrona' => 'Petrona', 'Philosopher' => 'Philosopher', 'Piedra' => 'Piedra', 'Pinyon Script' => 'Pinyon Script', 'Plaster' => 'Plaster', 'Play' => 'Play', 'Playball' => 'Playball', 'Playfair Display' => 'Playfair Display', 'Podkova' => 'Podkova', 'Poiret One' => 'Poiret One', 'Poller One' => 'Poller One', 'Poly' => 'Poly', 'Pompiere' => 'Pompiere', 'Pontano Sans' => 'Pontano Sans', 'Port Lligat Sans' => 'Port Lligat Sans', 'Port Lligat Slab' => 'Port Lligat Slab', 'Prata' => 'Prata', 'Preahvihear' => 'Preahvihear', 'Press Start 2P' => 'Press Start 2P', 'Princess Sofia' => 'Princess Sofia', 'Prociono' => 'Prociono', 'Prosto One' => 'Prosto One', 'Puritan' => 'Puritan', 'Quantico' => 'Quantico', 'Quattrocento' => 'Quattrocento', 'Quattrocento Sans' => 'Quattrocento Sans', 'Questrial' => 'Questrial', 'Quicksand' => 'Quicksand', 'Qwigley' => 'Qwigley', 'Radley' => 'Radley', 'Raleway' => 'Raleway', 'Rammetto One' => 'Rammetto One', 'Rancho' => 'Rancho', 'Rationale' => 'Rationale', 'Redressed' => 'Redressed', 'Reenie Beanie' => 'Reenie Beanie', 'Revalia' => 'Revalia', 'Ribeye' => 'Ribeye', 'Ribeye Marrow' => 'Ribeye Marrow', 'Righteous' => 'Righteous', 'Roboto' => 'Roboto', 'Roboto Condensed' => 'Roboto Condensed', 'Rochester' => 'Rochester', 'Rock Salt' => 'Rock Salt', 'Rokkitt' => 'Rokkitt', 'Ropa Sans' => 'Ropa Sans', 'Rosario' => 'Rosario', 'Rosarivo' => 'Rosarivo', 'Rouge Script' => 'Rouge Script', 'Ruda' => 'Ruda', 'Ruge Boogie' => 'Ruge Boogie', 'Ruluko' => 'Ruluko', 'Ruslan Display' => 'Ruslan Display', 'Russo One' => 'Russo One', 'Ruthie' => 'Ruthie', 'Sail' => 'Sail', 'Salsa' => 'Salsa', 'Sanchez' => 'Sanchez', 'Sancreek' => 'Sancreek', 'Sansita One' => 'Sansita One', 'Sarina' => 'Sarina', 'Satisfy' => 'Satisfy', 'Schoolbell' => 'Schoolbell', 'Seaweed Script' => 'Seaweed Script', 'Sevillana' => 'Sevillana', 'Shadows Into Light' => 'Shadows Into Light', 'Shadows Into Light Two' => 'Shadows Into Light Two', 'Shanti' => 'Shanti', 'Share' => 'Share', 'Shojumaru' => 'Shojumaru', 'Short Stack' => 'Short Stack', 'Siemreap' => 'Siemreap', 'Sigmar One' => 'Sigmar One', 'Signika' => 'Signika', 'Signika Negative' => 'Signika Negative', 'Simonetta' => 'Simonetta', 'Sirin Stencil' => 'Sirin Stencil', 'Six Caps' => 'Six Caps', 'Slackey' => 'Slackey', 'Smokum' => 'Smokum', 'Smythe' => 'Smythe', 'Sniglet' => 'Sniglet', 'Snippet' => 'Snippet', 'Sofia' => 'Sofia', 'Sonsie One' => 'Sonsie One', 'Sorts Mill Goudy' => 'Sorts Mill Goudy', 'Special Elite' => 'Special Elite', 'Spicy Rice' => 'Spicy Rice', 'Spinnaker' => 'Spinnaker', 'Spirax' => 'Spirax', 'Squada One' => 'Squada One', 'Stardos Stencil' => 'Stardos Stencil', 'Stint Ultra Condensed' => 'Stint Ultra Condensed', 'Stint Ultra Expanded' => 'Stint Ultra Expanded', 'Stoke' => 'Stoke', 'Sue Ellen Francisco' => 'Sue Ellen Francisco', 'Sunshiney' => 'Sunshiney', 'Supermercado One' => 'Supermercado One', 'Suwannaphum' => 'Suwannaphum', 'Swanky and Moo Moo' => 'Swanky and Moo Moo', 'Syncopate' => 'Syncopate', 'Tangerine' => 'Tangerine', 'Taprom' => 'Taprom', 'Telex' => 'Telex', 'Tenor Sans' => 'Tenor Sans', 'The Girl Next Door' => 'The Girl Next Door', 'Tienne' => 'Tienne', 'Tinos' => 'Tinos', 'Titan One' => 'Titan One', 'Trade Winds' => 'Trade Winds', 'Trocchi' => 'Trocchi', 'Trochut' => 'Trochut', 'Trykker' => 'Trykker', 'Tulpen One' => 'Tulpen One', 'Ubuntu' => 'Ubuntu', 'Ubuntu Condensed' => 'Ubuntu Condensed', 'Ubuntu Mono' => 'Ubuntu Mono', 'Ultra' => 'Ultra', 'Uncial Antiqua' => 'Uncial Antiqua', 'UnifrakturCook' => 'UnifrakturCook', 'UnifrakturMaguntia' => 'UnifrakturMaguntia', 'Unkempt' => 'Unkempt', 'Unlock' => 'Unlock', 'Unna' => 'Unna', 'VT323' => 'VT323', 'Varela' => 'Varela', 'Varela Round' => 'Varela Round', 'Vast Shadow' => 'Vast Shadow', 'Vibur' => 'Vibur', 'Vidaloka' => 'Vidaloka', 'Viga' => 'Viga', 'Voces' => 'Voces', 'Volkhov' => 'Volkhov', 'Vollkorn' => 'Vollkorn', 'Voltaire' => 'Voltaire', 'Waiting for the Sunrise' => 'Waiting for the Sunrise', 'Wallpoet' => 'Wallpoet', 'Walter Turncoat' => 'Walter Turncoat', 'Wellfleet' => 'Wellfleet', 'Wire One' => 'Wire One', 'Yanone Kaffeesatz' => 'Yanone Kaffeesatz', 'Yellowtail' => 'Yellowtail', 'Yeseva One' => 'Yeseva One', 'Yesteryear' => 'Yesteryear', 'Zeyada' => 'Zeyada');
                         foreach ($google_font_faces as $i => $google_font_face) {
                             $output .= '<option value="' . $i . '" ' . selected($typography_stored['face'], $i, false) . '>' . $google_font_face . '</option>';
                         }
                         $output .= '</optgroup>';
                         $output .= '</select></div>';
                     }
                     /* Font Weight */
                     if (isset($typography_stored['style'])) {
                         $output .= '<div class="select_wrapper typography-style" original-title="Font style">';
                         $output .= '<select class="of-typography of-typography-style select" name="' . $value['id'] . '[style]" id="' . $value['id'] . '_style">';
                         $styles = array('normal' => 'Normal', 'italic' => 'Italic', 'bold' => 'Bold', 'bold italic' => 'Bold Italic');
                         foreach ($styles as $i => $style) {
                             $output .= '<option value="' . $i . '" ' . selected($typography_stored['style'], $i, false) . '>' . $style . '</option>';
                         }
                         $output .= '</select></div>';
                     }
                     /* Font Color */
                     if (isset($typography_stored['color'])) {
                         $output .= '<div id="' . $value['id'] . '_color_picker" class="colorSelector typography-color"><div style="background-color: ' . $typography_stored['color'] . '"></div></div>';
                         $output .= '<input class="of-color of-typography of-typography-color" original-title="Font color" name="' . $value['id'] . '[color]" id="' . $value['id'] . '_color" type="text" value="' . $typography_stored['color'] . '" />';
                     }
                     break;
                     //border option
                 //border option
                 case 'border':
                     /* Border Width */
                     $border_stored = $smof_data[$value['id']];
                     $output .= '<div class="select_wrapper border-width">';
                     $output .= '<select class="of-border of-border-width select" name="' . $value['id'] . '[width]" id="' . $value['id'] . '_width">';
                     for ($i = 0; $i < 21; $i++) {
                         $output .= '<option value="' . $i . '" ' . selected($border_stored['width'], $i, false) . '>' . $i . '</option>';
                     }
                     $output .= '</select></div>';
                     /* Border Style */
                     $output .= '<div class="select_wrapper border-style">';
                     $output .= '<select class="of-border of-border-style select" name="' . $value['id'] . '[style]" id="' . $value['id'] . '_style">';
                     $styles = array('none' => 'None', 'solid' => 'Solid', 'dashed' => 'Dashed', 'dotted' => 'Dotted');
                     foreach ($styles as $i => $style) {
                         $output .= '<option value="' . $i . '" ' . selected($border_stored['style'], $i, false) . '>' . $style . '</option>';
                     }
                     $output .= '</select></div>';
                     /* Border Color */
                     $output .= '<div id="' . $value['id'] . '_color_picker" class="colorSelector"><div style="background-color: ' . $border_stored['color'] . '"></div></div>';
                     $output .= '<input class="of-color of-border of-border-color" name="' . $value['id'] . '[color]" id="' . $value['id'] . '_color" type="text" value="' . $border_stored['color'] . '" />';
                     break;
                     //images checkbox - use image as checkboxes
                 //images checkbox - use image as checkboxes
                 case 'images':
                     $i = 0;
                     $select_value = isset($smof_data[$value['id']]) ? $smof_data[$value['id']] : '';
                     foreach ($value['options'] as $key => $option) {
                         $i++;
                         $checked = '';
                         $selected = '';
                         if (NULL != checked($select_value, $key, false)) {
                             $checked = checked($select_value, $key, false);
                             $selected = 'of-radio-img-selected';
                         }
                         $output .= '<span>';
                         $output .= '<input type="radio" id="of-radio-img-' . $value['id'] . $i . '" class="checkbox of-radio-img-radio" value="' . $key . '" name="' . $value['id'] . '" ' . $checked . ' />';
                         $output .= '<div class="of-radio-img-label">' . $key . '</div>';
                         $output .= '<img src="' . $option . '" alt="" class="of-radio-img-img ' . $selected . '" onClick="document.getElementById(\'of-radio-img-' . $value['id'] . $i . '\').checked = true;" />';
                         $output .= '</span>';
                     }
                     break;
                     //info (for small intro box etc)
                 //info (for small intro box etc)
                 case "info":
                     $info_text = $value['std'];
                     $output .= '<div class="of-info">' . $info_text . '</div>';
                     break;
                     //display a single image
                 //display a single image
                 case "image":
                     $src = $value['std'];
                     $output .= '<img src="' . $src . '">';
                     break;
                     //tab heading
                 //tab heading
                 case 'heading':
                     if ($counter >= 2) {
                         $output .= '</div>' . "\n";
                     }
                     //custom icon
                     $icon_class = '';
                     if (isset($value['icon'])) {
                         $icon_class = ' dashicons-smof-menu dashicons-' . $value['icon'];
                     }
                     $header_class = str_replace(' ', '', strtolower($value['name']));
                     $jquery_click_hook = str_replace(' ', '', strtolower($value['name']));
                     $jquery_click_hook = "of-option-" . trim(preg_replace('/ +/', '', preg_replace('/[^A-Za-z0-9 ]/', '', urldecode(html_entity_decode(strip_tags($jquery_click_hook))))));
                     $menu .= '<li class="' . $header_class . '"><a title="' . $value['name'] . '" href="#' . $jquery_click_hook . '" class="' . $icon_class . '">' . $value['name'] . '</a></li>';
                     $output .= '<div class="group" id="' . $jquery_click_hook . '"><h2>' . $value['name'] . '</h2>' . "\n";
                     break;
                     //drag & drop slide manager
                 //drag & drop slide manager
                 case 'slider':
                     $output .= '<div class="slider"><ul id="' . $value['id'] . '">';
                     $slides = $smof_data[$value['id']];
                     $count = count($slides);
                     if ($count < 2) {
                         $oldorder = 1;
                         $order = 1;
                         $output .= Options_Machine::optionsframework_slider_function($value['id'], $value['std'], $oldorder, $order);
                     } else {
                         $i = 0;
                         foreach ($slides as $slide) {
                             $oldorder = $slide['order'];
                             $i++;
                             $order = $i;
                             $output .= Options_Machine::optionsframework_slider_function($value['id'], $value['std'], $oldorder, $order);
                         }
                     }
                     $output .= '</ul>';
                     $output .= '<a href="#" class="button slide_add_button">Add New Slide</a></div>';
                     break;
                     //drag & drop block manager
                 //drag & drop block manager
                 case 'sorter':
                     // Make sure to get list of all the default blocks first
                     $all_blocks = $value['std'];
                     $temp = array();
                     // holds default blocks
                     $temp2 = array();
                     // holds saved blocks
                     foreach ($all_blocks as $blocks) {
                         $temp = array_merge($temp, $blocks);
                     }
                     $sortlists = isset($data[$value['id']]) && !empty($data[$value['id']]) ? $data[$value['id']] : $value['std'];
                     foreach ($sortlists as $sortlist) {
                         $temp2 = array_merge($temp2, $sortlist);
                     }
                     // now let's compare if we have anything missing
                     foreach ($temp as $k => $v) {
                         if (!array_key_exists($k, $temp2)) {
                             $sortlists['disabled'][$k] = $v;
                         }
                     }
                     // now check if saved blocks has blocks not registered under default blocks
                     foreach ($sortlists as $key => $sortlist) {
                         foreach ($sortlist as $k => $v) {
                             if (!array_key_exists($k, $temp)) {
                                 unset($sortlist[$k]);
                             }
                         }
                         $sortlists[$key] = $sortlist;
                     }
                     // assuming all sync'ed, now get the correct naming for each block
                     foreach ($sortlists as $key => $sortlist) {
                         foreach ($sortlist as $k => $v) {
                             $sortlist[$k] = $temp[$k];
                         }
                         $sortlists[$key] = $sortlist;
                     }
                     $output .= '<div id="' . $value['id'] . '" class="sorter">';
                     if ($sortlists) {
                         foreach ($sortlists as $group => $sortlist) {
                             $output .= '<ul id="' . $value['id'] . '_' . $group . '" class="sortlist_' . $value['id'] . '">';
                             $output .= '<h3>' . $group . '</h3>';
                             foreach ($sortlist as $key => $list) {
                                 $output .= '<input class="sorter-placebo" type="hidden" name="' . $value['id'] . '[' . $group . '][placebo]" value="placebo">';
                                 if ($key != "placebo") {
                                     $output .= '<li id="' . $key . '" class="sortee">';
                                     $output .= '<input class="position" type="hidden" name="' . $value['id'] . '[' . $group . '][' . $key . ']" value="' . $list . '">';
                                     $output .= $list;
                                     $output .= '</li>';
                                 }
                             }
                             $output .= '</ul>';
                         }
                     }
                     $output .= '</div>';
                     break;
                     //background images option
                 //background images option
                 case 'tiles':
                     $i = 0;
                     $select_value = isset($smof_data[$value['id']]) && !empty($smof_data[$value['id']]) ? $smof_data[$value['id']] : '';
                     if (is_array($value['options'])) {
                         foreach ($value['options'] as $key => $option) {
                             $i++;
                             $checked = '';
                             $selected = '';
                             if (NULL != checked($select_value, $option, false)) {
                                 $checked = checked($select_value, $option, false);
                                 $selected = 'of-radio-tile-selected';
                             }
                             $output .= '<span>';
                             $output .= '<input type="radio" id="of-radio-tile-' . $value['id'] . $i . '" class="checkbox of-radio-tile-radio" value="' . $option . '" name="' . $value['id'] . '" ' . $checked . ' />';
                             $output .= '<div class="of-radio-tile-img ' . $selected . '" style="background: url(' . $option . ')" onClick="document.getElementById(\'of-radio-tile-' . $value['id'] . $i . '\').checked = true;"></div>';
                             $output .= '</span>';
                         }
                     }
                     break;
                     //backup and restore options data
                 //backup and restore options data
                 case 'backup':
                     $instructions = $value['desc'];
                     $backup = of_get_options(BACKUPS);
                     $init = of_get_options('smof_init');
                     if (!isset($backup['backup_log'])) {
                         $log = __('No backups yet', 'editit');
                     } else {
                         $log = $backup['backup_log'];
                     }
                     $output .= '<div class="backup-box">';
                     $output .= '<div class="instructions">' . $instructions . "\n";
                     $output .= '<p><strong>' . __('Last Backup : ', 'editit') . '<span class="backup-log">' . $log . '</span></strong></p></div>' . "\n";
                     $output .= '<a href="#" id="of_backup_button" class="button" title="Backup Options">' . __('Backup Options', 'editit') . '</a>';
                     $output .= '<a href="#" id="of_restore_button" class="button" title="Restore Options">' . __('Restore Options', 'editit') . '</a>';
                     $output .= '</div>';
                     break;
                     //export or import data between different installs
                 //export or import data between different installs
                 case 'transfer':
                     $instructions = $value['desc'];
                     $output .= '<textarea id="export_data" rows="8">' . base64_encode(serialize($smof_data)) . '</textarea>' . "\n";
                     $output .= '<a href="#" id="of_import_button" class="button" title="Restore Options">' . __('Import Options', 'editit') . '</a>';
                     break;
                     // google font field
                 // google font field
                 case 'select_google_font':
                     $output .= '<div class="select_wrapper">';
                     $output .= '<select class="select of-input google_font_select" name="' . $value['id'] . '" id="' . $value['id'] . '">';
                     foreach ($value['options'] as $select_key => $option) {
                         $output .= '<option value="' . $select_key . '" ' . selected(isset($smof_data[$value['id']]) ? $smof_data[$value['id']] : "", $option, false) . ' />' . $option . '</option>';
                     }
                     $output .= '</select></div>';
                     if (isset($value['preview']['text'])) {
                         $g_text = $value['preview']['text'];
                     } else {
                         $g_text = '0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz';
                     }
                     if (isset($value['preview']['size'])) {
                         $g_size = 'style="font-size: ' . $value['preview']['size'] . ';"';
                     } else {
                         $g_size = '';
                     }
                     $hide = " hide";
                     if ($smof_data[$value['id']] != "none" && $smof_data[$value['id']] != "") {
                         $hide = "";
                     }
                     $output .= '<p class="' . $value['id'] . '_ggf_previewer google_font_preview' . $hide . '" ' . $g_size . '>' . $g_text . '</p>';
                     break;
                     //JQuery UI Slider
                 //JQuery UI Slider
                 case 'sliderui':
                     $s_val = $s_min = $s_max = $s_step = $s_edit = '';
                     //no errors, please
                     $s_val = stripslashes($smof_data[$value['id']]);
                     if (!isset($value['min'])) {
                         $s_min = '0';
                     } else {
                         $s_min = $value['min'];
                     }
                     if (!isset($value['max'])) {
                         $s_max = $s_min + 1;
                     } else {
                         $s_max = $value['max'];
                     }
                     if (!isset($value['step'])) {
                         $s_step = '1';
                     } else {
                         $s_step = $value['step'];
                     }
                     if (!isset($value['edit'])) {
                         $s_edit = ' readonly="readonly"';
                     } else {
                         $s_edit = '';
                     }
                     if ($s_val == '') {
                         $s_val = $s_min;
                     }
                     //values
                     $s_data = 'data-id="' . $value['id'] . '" data-val="' . $s_val . '" data-min="' . $s_min . '" data-max="' . $s_max . '" data-step="' . $s_step . '"';
                     //html output
                     $output .= '<input type="text" name="' . $value['id'] . '" id="' . $value['id'] . '" value="' . $s_val . '" class="mini" ' . $s_edit . ' />';
                     $output .= '<div id="' . $value['id'] . '-slider" class="smof_sliderui" style="margin-left: 7px;" ' . $s_data . '></div>';
                     break;
                     //Switch option
                 //Switch option
                 case 'switch':
                     if (!isset($smof_data[$value['id']])) {
                         $smof_data[$value['id']] = 0;
                     }
                     $fold = '';
                     if (array_key_exists("folds", $value)) {
                         $fold = "s_fld ";
                     }
                     $cb_enabled = $cb_disabled = '';
                     //no errors, please
                     //Get selected
                     if ($smof_data[$value['id']] == 1) {
                         $cb_enabled = ' selected';
                         $cb_disabled = '';
                     } else {
                         $cb_enabled = '';
                         $cb_disabled = ' selected';
                     }
                     //Label ON
                     if (!isset($value['on'])) {
                         $on = "On";
                     } else {
                         $on = $value['on'];
                     }
                     //Label OFF
                     if (!isset($value['off'])) {
                         $off = "Off";
                     } else {
                         $off = $value['off'];
                     }
                     $output .= '<p class="switch-options">';
                     $output .= '<label class="' . $fold . 'cb-enable' . $cb_enabled . '" data-id="' . $value['id'] . '"><span>' . $on . '</span></label>';
                     $output .= '<label class="' . $fold . 'cb-disable' . $cb_disabled . '" data-id="' . $value['id'] . '"><span>' . $off . '</span></label>';
                     $output .= '<input type="hidden" class="' . $fold . 'checkbox of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" value="0"/>';
                     $output .= '<input type="checkbox" id="' . $value['id'] . '" class="' . $fold . 'checkbox of-input main_checkbox" name="' . $value['id'] . '"  value="1" ' . checked($smof_data[$value['id']], 1, false) . ' />';
                     $output .= '</p>';
                     break;
                     // Uploader 3.5
                 // Uploader 3.5
                 case "upload":
                 case "media":
                     if (!isset($value['mod'])) {
                         $value['mod'] = '';
                     }
                     $u_val = '';
                     if ($smof_data[$value['id']]) {
                         $u_val = stripslashes($smof_data[$value['id']]);
                     }
                     $output .= Options_Machine::optionsframework_media_uploader_function($value['id'], $u_val, $value['mod']);
                     break;
             }
             do_action('optionsframework_machine_loop', array('options' => $options, 'smof_data' => $smof_data, 'defaults' => $defaults, 'counter' => $counter, 'menu' => $menu, 'output' => $output, 'value' => $value));
             if ($smof_output != "") {
                 $output .= $smof_output;
                 $smof_output = "";
             }
             //description of each option
             if ($value['type'] != 'heading') {
                 if (!isset($value['desc'])) {
                     $explain_value = '';
                 } else {
                     $explain_value = '<div class="explain">' . $value['desc'] . '</div>' . "\n";
                 }
                 $output .= '</div>' . $explain_value . "\n";
                 $output .= '<div class="clear"> </div></div></div>' . "\n";
             }
         }
         /* condition empty end */
     }
     if ($update_data == true) {
         of_save_options($smof_data);
     }
     $output .= '</div>';
     do_action('optionsframework_machine_after', array('options' => $options, 'smof_data' => $smof_data, 'defaults' => $defaults, 'counter' => $counter, 'menu' => $menu, 'output' => $output, 'value' => $value));
     if ($smof_output != "") {
         $output .= $smof_output;
         $smof_output = "";
     }
     return array($output, $menu, $defaults);
 }
Ejemplo n.º 7
0
/**
 * Ajax Save Options
 *
 * @uses get_option()
 *
 * @since 1.0.0
 */
function of_ajax_callback()
{
    global $options_machine, $of_options;
    $nonce = $_POST['security'];
    if (!wp_verify_nonce($nonce, 'of_ajax_nonce')) {
        die('-1');
    }
    //get options array from db
    $all = of_get_options();
    $save_type = $_POST['type'];
    //echo $_POST['data'];
    //Uploads
    if ($save_type == 'upload') {
        $clickedID = $_POST['data'];
        // Acts as the name
        $filename = $_FILES[$clickedID];
        $filename['name'] = preg_replace('/[^a-zA-Z0-9._\\-]/', '', $filename['name']);
        $override['test_form'] = false;
        $override['action'] = 'wp_handle_upload';
        $uploaded_file = wp_handle_upload($filename, $override);
        $upload_tracking[] = $clickedID;
        //update $options array w/ image URL
        $upload_image = $all;
        //preserve current data
        $upload_image[$clickedID] = $uploaded_file['url'];
        of_save_options($upload_image);
        if (!empty($uploaded_file['error'])) {
            echo 'Upload Error: ' . $uploaded_file['error'];
        } else {
            echo $uploaded_file['url'];
        }
        // Is the Response
    } elseif ($save_type == 'image_reset') {
        $id = $_POST['data'];
        // Acts as the name
        $delete_image = $all;
        //preserve rest of data
        $delete_image[$id] = '';
        //update array key with empty value
        of_save_options($delete_image);
    } elseif ($save_type == 'backup_options') {
        $backup = $all;
        $backup['backup_log'] = date('r');
        of_save_options($backup, BACKUPS);
        die('1');
    } elseif ($save_type == 'restore_options') {
        $smof_data = get_option(BACKUPS);
        update_option(OPTIONS, $smof_data);
        of_save_options($smof_data);
        die('1');
    } elseif ($save_type == 'import_options') {
        $smof_data = unserialize(base64_decode($smof_data));
        //100% safe - ignore theme check nag
        of_save_options($smof_data);
        die('1');
    } elseif ($save_type == 'save') {
        wp_parse_str(stripslashes($_POST['data']), $smof_data);
        unset($smof_data['security']);
        unset($smof_data['of_save']);
        of_save_options($smof_data);
        die('1');
    } elseif ($save_type == 'reset') {
        $theme_name = 'wp-consilium' . get_option('cs-body-class', '');
        $option_json = get_template_directory_uri() . '/admin/sample/' . $theme_name . '/option.txt';
        $option_json = wp_remote_get($option_json);
        $option_data = $option_json['body'];
        of_save_options(unserialize(base64_decode($option_data)));
        die('1');
        //options reset
    } elseif ($save_type == 'of_add_params') {
        $current_option = of_get_options();
        $current_option = of_get_options();
        $default = $options_machine->Defaults;
        foreach ($default as $k => $option) {
            if (isset($current_option[$k])) {
                $default[$k] = $current_option[$k];
            }
        }
        of_save_options($default);
        die('1');
        //options reset
    }
    die;
}
Ejemplo n.º 8
0
/**
 * Ajax Save Options
 *
 * @uses get_option()
 *
 * @since 1.0.0
 */
function of_ajax_callback()
{
    global $options_machine, $of_options;
    $nonce = $_POST['security'];
    if (!wp_verify_nonce($nonce, 'of_ajax_nonce')) {
        die('-1');
    }
    //get options array from db
    $all = of_get_options();
    $save_type = $_POST['type'];
    //echo $_POST['data'];
    //Uploads
    if ($save_type == 'upload') {
        $clickedID = $_POST['data'];
        // Acts as the name
        $filename = $_FILES[$clickedID];
        $filename['name'] = preg_replace('/[^a-zA-Z0-9._\\-]/', '', $filename['name']);
        $override['test_form'] = false;
        $override['action'] = 'wp_handle_upload';
        $uploaded_file = wp_handle_upload($filename, $override);
        $upload_tracking[] = $clickedID;
        //update $options array w/ image URL
        $upload_image = $all;
        //preserve current data
        $upload_image[$clickedID] = $uploaded_file['url'];
        of_save_options($upload_image);
        if (!empty($uploaded_file['error'])) {
            echo 'Upload Error: ' . $uploaded_file['error'];
        } else {
            echo $uploaded_file['url'];
        }
        // Is the Response
    } elseif ($save_type == 'image_reset') {
        $id = $_POST['data'];
        // Acts as the name
        $delete_image = $all;
        //preserve rest of data
        $delete_image[$id] = '';
        //update array key with empty value
        of_save_options($delete_image);
    } elseif ($save_type == 'backup_options') {
        $backup = $all;
        $backup['backup_log'] = date('r');
        of_save_options($backup, BACKUPS);
        die('1');
    } elseif ($save_type == 'restore_options') {
        $smof_data = get_option(BACKUPS);
        update_option(OPTIONS, $smof_data);
        of_save_options($smof_data);
        die('1');
    } elseif ($save_type == 'import_options') {
        $smof_data = unserialize(base64_decode($smof_data));
        //100% safe - ignore theme check nag
        of_save_options($smof_data);
        die('1');
    } elseif ($save_type == 'save') {
        wp_parse_str(stripslashes($_POST['data']), $smof_data);
        unset($smof_data['security']);
        unset($smof_data['of_save']);
        if (SNPSHPWP_FBUILDER === true) {
            global $fbuilder;
            $options = array('bottom_margin' => $smof_data['fb_bmargin'], 'high_rezolution_width' => $smof_data['fb_hres_w'], 'high_rezolution_margin' => $smof_data['fb_hres_c'], 'med_rezolution_width' => $smof_data['fb_mres_w'], 'med_rezolution_margin' => $smof_data['fb_mres_c'], 'med_rezolution_hide_sidebar' => $smof_data['fb_mres_s'] == 1 ? 'true' : 'false', 'low_rezolution_width' => $smof_data['fb_lres_w'], 'low_rezolution_margin' => $smof_data['fb_lres_c'], 'low_rezolution_hide_sidebar' => $smof_data['fb_lres_s'] == 1 ? 'true' : 'false');
            $fbuilder->set_options($options);
        }
        of_save_options($smof_data);
        die('1');
    } elseif ($save_type == 'reset') {
        of_save_options($options_machine->Defaults);
        die('1');
        //options reset
    } elseif ($save_type == 'demo_remove') {
        set_transient('snpshpwp_remove_demo', 'true');
        die('1');
        //options reset
    } elseif ($save_type == 'demo_install') {
        $curr_style = $_POST['style'];
        $curr_theme = $_POST['theme'];
        $curr_images = $_POST['images'];
        $curr_pages = $_POST['pages'];
        $site_url = get_option("siteurl");
        $template_url = get_template_directory_uri();
        $snpshpwp_options = array('snapshop' => array('options' => array('blog_layout' => '3', 'blog_excerpt' => '223', 'snpshpwp_hide_featarea' => '0', 'snpshpwp_hide_title' => '0', 'snpshpwp_hide_tags' => '0', 'snpshpwp_hide_related_main' => '0', 'snpshpwp_related_columns' => '3', 'snpshpwp_hide_meta' => '0', 'snpshpwp_hide_author' => '0', 'snpshpwp_hide_postmeta' => '0', 'snpshpwp_hide_share' => '0', 'snpshpwp_hide_related_side' => '1', 'contactform_message' => '', 'contact' => array(1 => array('order' => '1', 'url' => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/82.jpg', 'name' => 'James McMilan', 'email' => '*****@*****.**', 'job' => 'Web Designer', 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'contact' => array(1 => array('socialnetworksurl' => '#', 'socialnetworks' => 'facebook.png'), 2 => array('socialnetworksurl' => '#', 'socialnetworks' => 'twitter.png'), 3 => array('socialnetworksurl' => '#', 'socialnetworks' => 'google.png')))), 'favicon' => 'http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti57' => 'http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti72' => 'http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti114' => 'http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti144' => 'http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'header_bar' => '0', 'header_bar_height' => '30', 'header_bar_left' => array('disabled' => array('placebo' => 'placebo', 'language-bar' => 'language-bar', 'login-link' => 'login-link', 'network-icons' => 'network-icons', 'menu' => 'menu', 'tagline-alt' => 'tagline-alt'), 'enabled' => array('placebo' => 'placebo', 'tagline' => 'tagline')), 'header_bar_right' => array('disabled' => array('placebo' => 'placebo', 'menu' => 'menu', 'tagline' => 'tagline', 'network-icons' => 'network-icons', 'login-link' => 'login-link'), 'enabled' => array('placebo' => 'placebo', 'language-bar' => 'language-bar', 'tagline-alt' => 'tagline-alt')), 'header_bar_menu' => 'side-menu', 'header_bar_networks' => '1', 'header_bar_tagline' => '<i class="fa fa-phone-square"></i> REACH OUT TO US: <STRONG>+381 (0) 63 255 7004</STRONG>', 'header_bar_tagline_alt' => 'Write us at: <STRONG><a href="#">info@yourdomain.com</a></STRONG>', 's_header_bar_bg' => '#ffffff', 's_header_bar_txt' => '#222222', 's_header_bar_lnk' => '#222222', 's_header_bar_lnkhvr' => '#c74c44', 's_header_bar_brdr' => '#cccccc', 'f_header_bar_mn' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_header_bar_mnggl_on' => '1', 'f_header_bar_mnggl' => array('face' => 'PT Sans', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'header_height' => '60', 'header_sticky' => '1', 'header_width' => '1920', 'header_mode' => 'default', 'header_left' => array('disabled' => array('placebo' => 'placebo', 'tagline' => 'tagline', 'tagline-alt' => 'tagline-alt', 'woo-login-link' => 'woo-login-link', 'woo-cart' => 'woo-cart', 'network-icons' => 'network-icons', 'sidenav' => 'sidenav', 'search' => 'search', 'login-link' => 'login-link'), 'enabled' => array('placebo' => 'placebo', 'logo' => 'logo', 'menu' => 'menu')), 'header_right' => array('disabled' => array('placebo' => 'placebo', 'logo' => 'logo', 'menu' => 'menu', 'tagline-alt' => 'tagline-alt', 'woo-login-link' => 'woo-login-link', 'tagline' => 'tagline', 'network-icons' => 'network-icons'), 'enabled' => array('placebo' => 'placebo', 'login-link' => 'login-link', 'woo-cart' => 'woo-cart', 'search' => 'search', 'sidenav' => 'sidenav')), 'header_logo' => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/logo1.png', 'header_tagline' => 'FramedWP by br0', 'header_tagline_alt' => 'WordPress', 'header_left_sidenav' => 'header-left-sidenav', 'header_right_sidenav' => 'header-right-sidenav', 'header_menu' => 'header-1', 'header_networks' => '1', 'header_custom' => '', 'header_custom_height' => '100', 's_header_bg' => '#ffffff', 's_header_txt' => '#222222', 's_header_lnk' => '#222222', 's_header_lnkhvr' => '#c74c44', 's_header_brdr' => '#cccccc', 's_header_tpbrdr' => '#222222', 's_header_drpdwn_bg' => '#222222', 's_header_drpdwn_lnk' => '#ffffff', 's_header_drpdwn_lnkhvr' => '#c74c44', 's_header_ldbr' => '#c74c44', 'f_header_mn' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_header_mnggl_on' => '0', 'f_header_mnggl' => array('face' => 'PT Serif', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_header_drpdwn' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_header_drpdwnggl_on' => '1', 'f_header_drpdwnggl' => array('face' => 'Open Sans', 'size' => '13px', 'style' => 'normal', 'weight' => '400'), 'breadcrumbs_active' => '0', 'breadcrumbs_height' => '60', 'breadcrumbs_tagline' => '', 's_breadcrumbs_bg' => '#ffffff', 's_breadcrumbs_txt' => '#222222', 's_breadcrumbs_lnk' => '#222222', 's_breadcrumbs_lnkhvr' => '#c74c44', 's_breadcrumbs_brdr' => '#cccccc', 'f_breadcrumbs' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_breadcrumbs_ggl_on' => '0', 'f_breadcrumbs_ggl' => array('face' => 'PT Serif', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'snpshpwp_hide_page_title' => '0', 'enable_comments' => '0', 's_post_bg' => '#ffffff', 's_post_txt' => '#808080', 's_post_hdr' => '#222222', 's_post_lnk' => '#c74c44', 's_post_lnkhvr' => '#c74c44', 's_post_brdr' => '#cccccc', 's_post_bttn' => '#222222', 's_post_bttnhvr' => '#c74c44', 's_post_bttnlnk' => '#ffffff', 's_post_bttnlnkhvr' => '#ffffff', 'f_post_mn' => array('face' => 'Lovelo', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_post_mnggl_on' => '1', 'f_post_mnggl' => array('face' => 'Open Sans', 'size' => '14px', 'style' => 'normal', 'weight' => '400'), 'f_post_hdr' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_post_hdrggl_on' => '0', 'f_post_hdrggl' => array('face' => 'PT Serif', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_post_crsv' => array('face' => 'Lovelo', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_post_crsvggl_on' => '1', 'f_post_crsvggl' => array('face' => 'Open Sans', 'size' => '14px', 'style' => 'italic', 'weight' => '400'), 'sidebar-size' => '5', 'sidebar-blog' => '1', 'sidebar-blog-position' => '0', 'sidebar-single' => '1', 'sidebar-single-position' => '1', 'sidebar-page' => '1', 'sidebar-page-position' => '0', 'sidebar' => array(1 => array('order' => '1', 'title' => 'Header Left Sidenav'), 2 => array('order' => '2', 'title' => 'Header Right Sidenav'), 3 => array('order' => '3', 'title' => 'Bottom 1'), 4 => array('order' => '4', 'title' => 'Bottom 2'), 5 => array('order' => '5', 'title' => 'Bottom 3'), 6 => array('order' => '6', 'title' => 'Bottom 4'), 7 => array('order' => '7', 'title' => 'Blog Archive - Custom')), 'footer_area' => '0', 'footer_widgets' => '0', 'footer_sidebar' => '3', 'footer_width' => '1301', 's_footer_tpbrdr' => '#222222', 's_footer_bg' => '#ffffff', 's_footer_txt' => '#808080', 's_footer_hdr' => '#222222', 's_footer_lnk' => '#222222', 's_footer_lnkhvr' => '#c74c44', 'f_footer_wt' => array('face' => 'Lovelo', 'size' => '15px', 'style' => 'normal', 'weight' => '400'), 'f_footer_wtggl_on' => '0', 'f_footer_wtggl' => array('face' => 'PT Serif', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_footer_wtxt' => array('face' => 'Lovelo', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_footer_wtxtggl_on' => '1', 'f_footer_wtxtggl' => array('face' => 'Open Sans', 'size' => '14px', 'style' => 'normal', 'weight' => '400'), 'footer_bar' => '0', 'footer_height' => '60', 'footer_left' => array('disabled' => array('placebo' => 'placebo', 'login-link' => 'login-link', 'tagline' => 'tagline', 'network-icons' => 'network-icons', 'tagline-alt' => 'tagline-alt', 'to-the-top' => 'to-the-top'), 'enabled' => array('placebo' => 'placebo', 'menu' => 'menu')), 'footer_right' => array('disabled' => array('placebo' => 'placebo', 'login-link' => 'login-link', 'menu' => 'menu', 'tagline' => 'tagline', 'tagline-alt' => 'tagline-alt', 'network-icons' => 'network-icons'), 'enabled' => array('placebo' => 'placebo', 'to-the-top' => 'to-the-top')), 'footer_menu' => 'header-1', 'footer_networks' => '1', 'footer_tagline' => 'SnapShopWP 2014', 'footer_tagline_alt' => 'WordPress', 'footer_up_text' => '', 's_footer_lmnt_bg' => '#ffffff', 's_footer_lmnt_txt' => '#808080', 's_footer_lmnt_lnk' => '#808080', 's_footer_lmnt_lnkhvr' => '#c74c44', 's_footer_lmnt_brdr' => '#eaeaea', 'f_footer_fbr' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_footer_fbrggl_on' => '1', 'f_footer_fbrggl' => array('face' => 'Open Sans', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'woo-columns' => '4', 'woo-columns-rel' => '4', 'woo_per_page' => '12', 'woo_rel_per_page' => '4', 'sidebar-woo' => '1', 'sidebar-woo-position' => '1', 'sidebar-woo-single' => '1', 'sidebar-woo-single-position' => '0', 'sidebar-woo-size' => '5', 'shop-widgets-before' => 'none', 'shop-widgets-after' => 'none', 'product-widgets-before' => 'none', 'product-widgets-after' => 'none', 'site_layout' => 'wide', 'responsive' => '1', 'loader_background' => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/logo-clean.png', 'tracking-code' => '', 'content_width' => '1920', 'fb_hres_c' => '36', 'fb_bmargin' => '36', 'fb_hres_w' => '1200', 'fb_mres_c' => '18', 'custom-css-high' => '', 'fb_mres_w' => '1024', 'fb_lres_c' => '6', 'fb_mres_s' => '1', 'custom-css-med' => '.snpshpwp_element_login-link, .snpshpwp_element_language-bar {display:none;}', 'fb_lres_w' => '768', 'fb_lres_s' => '1', 'custom-css-low' => '.snpshpwp_top_right > div {display:none;}', 'fimage_width' => '960', 'fimage_height' => '400', 'fimage_override' => '0', 'single_fimage_width' => '1200', 'single_fimage_height' => '400', 'single_fimage_override' => '1', 'twitter_ck' => 'WTpkUO8EKqFf7LIufyxymw', 'twitter_cs' => 'FTTyvUgl576OSiA86aFL4s3Mo3Ym7XmRoccOsN4xqU', 'twitter_at' => '966576138-B4gBnApgj9Khbt7931uowPw6KVHfBb4fB1Njp5SC', 'twitter_ats' => 'gBqkVVG6cW2qC9sInSVKYBD0N0IpXgmauPsifhSg8wg4J', 'mailchimp' => '0', 'mailchimp_override' => '', 'language' => array(1 => array('order' => '1', 'flag' => 'uk.png', 'language' => 'English', 'langurl' => '#'), 2 => array('order' => '2', 'flag' => 'france.png', 'language' => 'French', 'langurl' => '#'), 3 => array('order' => '3', 'flag' => 'germany.png', 'language' => 'German', 'langurl' => '#')), 'custom-css' => '', 'custom-css-snpshp_limit_width' => '1301'), 'home' => '2', 'widgets' => array('sidebars_widgets' => array('sidebar-1' => array(0 => 'text-3', 1 => 'search-2', 2 => 'recent-posts-2', 3 => 'recent-comments-2', 4 => 'archives-2', 5 => 'meta-2'), 'wp_inactive_widgets' => array(), 'sidebar-blog' => array(0 => 'snpshpwp_category-3', 1 => 'recent-posts-5'), 'sidebar-single' => array(0 => 'snpshpwp_category-6', 1 => 'categories-4', 2 => 'tag_cloud-3'), 'sidebar-page' => array(0 => 'text-4', 1 => 'text-5', 2 => 'snpshpwp_category-5', 3 => 'woocommerce_products-6', 4 => 'snpshpwp_twitter-2'), 'footer-1' => array(0 => 'text-2'), 'footer-2' => array(0 => 'text-9', 1 => 'woocommerce_product_search-2'), 'footer-3' => array(0 => 'text-7', 1 => 'socialbro-3'), 'footer-4' => array(), 'footer-5' => array(), 'sidebar-woo' => array(0 => 'woocommerce_product_categories-2', 1 => 'woocommerce_price_filter-2'), 'sidebar-woo-single' => array(0 => 'woocommerce_product_categories-3'), 'header-left-sidenav' => array(0 => 'snpshpwp_category-4', 1 => 'nav_menu-2', 2 => 'recent-posts-3'), 'header-right-sidenav' => array(0 => 'nav_menu-3', 1 => 'nav_menu-4', 2 => 'socialbro-2'), 'bottom-1' => array(0 => 'woocommerce_top_rated_products-2'), 'bottom-2' => array(0 => 'woocommerce_recent_reviews-2'), 'bottom-3' => array(0 => 'woocommerce_products-5'), 'bottom-4' => array(0 => 'woocommerce_product_categories-4'), 'blog-archive-custom' => array(0 => 'snpshpwp_category-7', 1 => 'tag_cloud-4', 2 => 'text-6'), 'array_version' => 3), 'widget_categories' => array(4 => array('title' => '', 'count' => 1, 'hierarchical' => 0, 'dropdown' => 0), '_multiwidget' => 1), 'widget_text' => array(2 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/envato/logo-footer.png"></img> <br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), 3 => array('title' => 'OUR LINKS', 'text' => '<a href="#">Envato.com</h3></a><BR> <a href="#">Themeforest.net</a><BR> <a href="#">Codecanyon.net</a><BR> <a href="#">Videohive.net</a><BR> <a href="#">Shindiristudio.com</a><BR>', 'filter' => false), 4 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/envato/logo-footer.png"></img> <br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean erat lacus, vulputate sit amet lacinia vestibulum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), 5 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/sidebar-ad.jpg"></img><br><img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/ad21.jpg"></img><br><img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/ad13.jpg"></img>', 'filter' => false), 6 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/sidebar-ad.jpg">', 'filter' => false), 7 => array('title' => 'GET IN TOUCH', 'text' => 'Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), 9 => array('title' => 'Search Products', 'text' => 'Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), '_multiwidget' => 1), 'widget_rss' => array(1 => array(), '_multiwidget' => 1), 'widget_search' => array(2 => array('title' => ''), '_multiwidget' => 1), 'widget_recent-posts' => array(2 => array('title' => '', 'number' => 5), 3 => array('title' => '', 'number' => 5, 'show_date' => false), 5 => array('title' => '', 'number' => 5, 'show_date' => false), '_multiwidget' => 1), 'widget_recent-comments' => array(2 => array('title' => '', 'number' => 5), '_multiwidget' => 1), 'widget_archives' => array(2 => array('title' => '', 'count' => 0, 'dropdown' => 0), '_multiwidget' => 1), 'widget_meta' => array(2 => array('title' => ''), '_multiwidget' => 1), 'widget_nav_menu' => array(2 => array('title' => '', 'nav_menu' => 13), 3 => array('title' => 'THIS IS SNAPSHOP', 'nav_menu' => 32), 4 => array('title' => 'CLOSE AND PERSONAL', 'nav_menu' => 33), '_multiwidget' => 1), 'widget_pages' => array(1 => array(), '_multiwidget' => 1), 'widget_snpshpwp_twitter' => array(1 => array(), 2 => array('title' => 'LATEST FROM TWITTER', 'user' => '', 'count' => '1'), '_multiwidget' => 1), 'widget_snpshpwp_category' => array(3 => array('title' => 'Fresh', 'order' => 'date', 'category' => '-1', 'number' => '5'), 4 => array('title' => 'Fresh', 'order' => 'date', 'category' => '-1', 'number' => '3'), 5 => array('title' => 'LATEST BLOG POSTS', 'order' => 'date', 'category' => '-1', 'number' => '3'), 6 => array('title' => 'LATEST POSTS', 'order' => 'date', 'category' => '-1', 'number' => '5'), 7 => array('title' => 'LATEST POSTS', 'order' => 'date', 'category' => '-1', 'number' => '5'), '_multiwidget' => 1), 'widget_woocommerce_products' => array(5 => array('title' => '', 'number' => '4', 'show' => '', 'orderby' => 'date', 'order' => 'desc', 'hide_free' => 0, 'show_hidden' => 0), 6 => array('title' => 'FEATURED PRODUCTS', 'number' => '3', 'show' => '', 'orderby' => 'date', 'order' => 'desc', 'hide_free' => 0, 'show_hidden' => 0), '_multiwidget' => 1), 'widget_woocommerce_product_categories' => array(2 => array('title' => 'Product Categories', 'orderby' => 'order', 'dropdown' => 0, 'count' => '1', 'hierarchical' => '1', 'show_children_only' => 0), 3 => array('title' => 'Product Categories', 'orderby' => 'name', 'dropdown' => 0, 'count' => '1', 'hierarchical' => '1', 'show_children_only' => 0), 4 => array('title' => '', 'orderby' => 'order', 'dropdown' => 0, 'count' => '1', 'hierarchical' => '1', 'show_children_only' => 0), '_multiwidget' => 1), 'widget_woocommerce_product_search' => array(2 => array('title' => ''), '_multiwidget' => 1), 'widget_tag_cloud' => array(3 => array('title' => '', 'taxonomy' => 'post_tag'), 4 => array('title' => 'POPULAR TAGS', 'taxonomy' => 'post_tag'), '_multiwidget' => 1), 'widget_woocommerce_price_filter' => array(2 => array('title' => 'Filter by price'), '_multiwidget' => 1), 'widget_woocommerce_recently_viewed_products' => array('_multiwidget' => 1), 'widget_woocommerce_product_tag_cloud' => array(1 => array(), '_multiwidget' => 1), 'widget_socialbro' => array(2 => array('title' => 'CONNECT WITH SNAPSHOP', 'opacity' => '50', 'hover_opacity' => '100', 'icons' => 'http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0067_Vector-Smart-Object.png::#::Like Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0066_Vector-Smart-Object.png::#::Follow Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0064_Vector-Smart-Object.png::#::Plus Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0069_Vector-Smart-Object.png::#::Rate Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0063_Vector-Smart-Object.png::#::Pin Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0055_Vector-Smart-Object.png::#::Digg Us'), 3 => array('title' => '', 'opacity' => '100', 'hover_opacity' => '70', 'icons' => 'http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0067_Vector-Smart-Object.png::#::Facebook||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0064_Vector-Smart-Object.png::#::Google +||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0066_Vector-Smart-Object.png::#::Twitter||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0063_Vector-Smart-Object.png::#::Pinteresr||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0055_Vector-Smart-Object.png::#::DiggIt||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0059_Vector-Smart-Object.png::#::Flickr||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0069_Vector-Smart-Object.png::#::Envato||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0015_Vector-Smart-Object.png::#::RSS'), '_multiwidget' => 1), 'widget_calendar' => array(1 => array(), '_multiwidget' => 1), 'widget_rev-slider-widget' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_widget_cart' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_layered_nav' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_layered_nav_filters' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_recent_reviews' => array(1 => array(), 2 => array('title' => '', 'number' => '4'), '_multiwidget' => 1), 'widget_woocommerce_top_rated_products' => array(1 => array(), 2 => array('title' => '', 'number' => '4'), '_multiwidget' => 1)), 'images' => array(1362 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/08/logo-newsletter.png', 1315 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/08/shirt8.jpg', 1314 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/08/shirt7.jpg', 1313 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/08/shirt6.jpg', 1309 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/08/shirt5.jpg', 1304 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/08/shirt4.jpg', 1303 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/08/shirt3.jpg', 1302 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/08/shirt2.jpg', 1298 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/08/shirt1.jpg', 1286 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/08/shoes-big.jpg', 1212 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/shoes5-1.jpg', 1211 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/shoes5.jpg', 1209 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/shoes4-1.jpg', 1208 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/shoes4.jpg', 1206 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/shoes3-1.jpg', 1205 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/shoes3.jpg', 1203 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/shoes2-1.jpg', 1202 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/shoes2.jpg', 1200 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/shoes1-1.jpg', 1199 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/shoes1.jpg', 1197 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/4-23.jpg', 1196 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/4-13.jpg', 1195 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/45.jpg', 1193 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3-14.jpg', 1192 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/35.jpg', 1190 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-24.jpg', 1189 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-14.jpg', 1188 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/25.jpg', 1186 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-24.jpg', 1185 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-14.jpg', 1184 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/16.jpg', 1181 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/6-32.jpg', 1180 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/6-22.jpg', 1179 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/6-12.jpg', 1178 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/63.jpg', 1176 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/5-32.jpg', 1175 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/5-22.jpg', 1174 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/5-12.jpg', 1173 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/52.jpg', 1171 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/4-32.jpg', 1170 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/4-22.jpg', 1169 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/4-12.jpg', 1168 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/44.jpg', 1166 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3-33.jpg', 1165 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3-23.jpg', 1164 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3-13.jpg', 1163 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/34.jpg', 1161 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-33.jpg', 1160 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-23.jpg', 1159 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-13.jpg', 1158 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/24.jpg', 1156 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-33.jpg', 1155 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-23.jpg', 1154 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-13.jpg', 1153 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/14.jpg', 1095 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/blog3.jpg', 1093 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/blog2.jpg', 1057 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/blog1.jpg', 1026 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/ad31.jpg', 974 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/furniture10.jpg', 966 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/furniture4.jpg', 965 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/furniture7.jpg', 964 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/furniture6.jpg', 963 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/furniture5.jpg', 961 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/furniture8.jpg', 957 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/background.jpg', 950 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/furniture3.png', 949 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/furniture2.png', 948 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/furniture1.png', 943 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/clothes5.jpg', 942 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/clothes4.jpg', 941 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/clothes3.jpg', 940 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/clothes2.jpg', 939 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/clothes1.jpg', 934 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/gadget4.jpg', 932 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/gadget3.jpg', 930 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/gadget2.jpg', 925 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/gadget1.jpg', 922 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/about-us-wide.jpg', 839 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/caseinfo-xx-bg-light.png', 789 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/43.jpg', 788 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/82.jpg', 787 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/62.jpg', 779 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/about-us1.jpg', 778 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/about-us.jpg', 765 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/cubes.png', 739 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook15.jpg', 738 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook14.jpg', 737 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook13.jpg', 736 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook121.jpg', 735 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook111.jpg', 732 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook10.jpg', 731 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook9.jpg', 730 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook8.jpg', 729 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook7.jpg', 724 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook12.jpg', 721 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook6.jpg', 710 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook5.jpg', 709 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook4.jpg', 708 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook3.jpg', 707 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/wlookbook2.jpg', 697 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/menu-image-11.jpg', 695 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/Dark-Chalkboard.jpg', 693 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/sHAPED.gif', 690 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/lookbook5.jpg', 688 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/lookbook4.jpg', 685 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/lookbook3.jpg', 682 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/lookbook2.jpg', 674 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/Para-3-blur.png', 673 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/Para-2-blur-more.png', 671 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/Para-5.png', 670 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/Para-4.png', 669 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/Para-3.png', 668 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/Para-2.png', 667 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/Para-1.png', 666 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/Para-Background.jpg', 608 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/banner8.jpg', 607 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/banner7.jpg', 606 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/banner6.jpg', 605 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/banner5.jpg', 604 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/banner4.jpg', 603 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/banner3.jpg', 602 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/banner21.jpg', 562 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/lookbook1.jpg', 544 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/sidebar-header1.jpg', 541 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/sidebar-ad.jpg', 527 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/menu-image5.jpg', 492 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/home-parallax11.jpg', 472 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/logo-clean.png', 461 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/tablets.png', 435 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/home-simple-image1.jpg', 425 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/home-simple-headert.jpg', 419 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/timeline4.jpg', 418 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/timeline3.jpg', 417 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/timeline2.jpg', 416 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/timeline12.jpg', 415 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/timeline11.jpg', 412 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/timeline1.jpg', 405 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/grid3.jpg', 404 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/grid2.jpg', 403 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/grid1.jpg', 365 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/preview1.jpg', 362 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/home-feature12.jpg', 361 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/home-feature11.jpg', 360 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/home-feature1.jpg', 359 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/42.jpg', 358 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/33.jpg', 357 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/23.jpg', 354 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/grid-home1.jpg', 297 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/ad21.jpg', 295 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/ad13.jpg', 279 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/8-31.jpg', 278 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/8-21.jpg', 277 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/8-11.jpg', 276 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/81.jpg', 274 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/7-31.jpg', 273 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/7-21.jpg', 272 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/7-11.jpg', 271 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/71.jpg', 269 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/6-31.jpg', 268 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/6-21.jpg', 267 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/6-11.jpg', 266 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/61.jpg', 264 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/5-31.jpg', 263 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/5-21.jpg', 262 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/5-11.jpg', 261 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/51.jpg', 259 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/4-31.jpg', 258 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/4-21.jpg', 257 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/4-11.jpg', 256 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/41.jpg', 254 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3-32.jpg', 253 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3-22.jpg', 252 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3-12.jpg', 251 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/32.jpg', 249 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-32.jpg', 248 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-22.jpg', 247 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-12.jpg', 246 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/22.jpg', 244 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-32.jpg', 243 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-22.jpg', 242 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-12.jpg', 241 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/13.jpg', 228 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/grid-home.jpg', 218 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/home-parallax1.jpg', 202 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/featured3.jpg', 201 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/featured1.jpg', 200 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/featured2.jpg', 190 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/home-parallax.jpg', 186 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/featured31.jpg', 185 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/featured22.jpg', 183 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/featured11.jpg', 166 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/8-3.jpg', 165 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/8-2.jpg', 164 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/8-1.jpg', 163 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/8.jpg', 161 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/7-3.jpg', 160 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/7-2.jpg', 159 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/7-1.jpg', 158 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/7.jpg', 156 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/6-3.jpg', 155 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/6-2.jpg', 154 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/6-1.jpg', 153 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/6.jpg', 151 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/5-3.jpg', 150 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/5-2.jpg', 149 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/5-1.jpg', 148 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/5.jpg', 146 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/4-3.jpg', 145 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/4-2.jpg', 144 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/4-1.jpg', 143 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/4.jpg', 138 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3-31.jpg', 137 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3-21.jpg', 136 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3-11.jpg', 135 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/31.jpg', 133 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-31.jpg', 132 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-21.jpg', 131 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-11.jpg', 130 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/21.jpg', 124 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-31.jpg', 123 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-21.jpg', 122 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-11.jpg', 121 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/12.jpg', 94 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/logo1.png', 90 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/11.jpg', 79 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3-3.jpg', 78 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3-2.jpg', 77 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3-1.jpg', 76 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/3.jpg', 74 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-3.jpg', 73 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-2.jpg', 72 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2-1.jpg', 71 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/2.jpg', 69 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-3.jpg', 68 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-2.jpg', 67 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1-1.jpg', 66 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/1.jpg', 61 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/15.jpg', 35 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/06/4-1.jpg', 32 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/04/blog002.jpg', 30 => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/06/blog001.jpg')), 'snapshop-boxed' => array('options' => array('blog_layout' => '3', 'blog_excerpt' => '223', 'snpshpwp_hide_featarea' => '0', 'snpshpwp_hide_title' => '0', 'snpshpwp_hide_tags' => '0', 'snpshpwp_hide_related_main' => '0', 'snpshpwp_related_columns' => '3', 'snpshpwp_hide_meta' => '0', 'snpshpwp_hide_author' => '0', 'snpshpwp_hide_postmeta' => '0', 'snpshpwp_hide_share' => '0', 'snpshpwp_hide_related_side' => '1', 'contactform_message' => '', 'contact' => array(1 => array('order' => '1', 'url' => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/82.jpg', 'name' => 'James McMilan', 'email' => '*****@*****.**', 'job' => 'Web Designer', 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'contact' => array(1 => array('socialnetworksurl' => '#', 'socialnetworks' => 'facebook.png'), 2 => array('socialnetworksurl' => '#', 'socialnetworks' => 'twitter.png'), 3 => array('socialnetworksurl' => '#', 'socialnetworks' => 'google.png'))), 2 => array('order' => '2', 'url' => '', 'name' => 'Trisha Takinawa', 'email' => '*****@*****.**', 'job' => 'Sales Manager', 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'contact' => array(1 => array('socialnetworksurl' => '#', 'socialnetworks' => 'facebook.png'), 2 => array('socialnetworksurl' => '#', 'socialnetworks' => 'white_spotify.png')))), 'favicon' => 'http://www.shindiristudio.com/snapshop/shop-boxed/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti57' => 'http://www.shindiristudio.com/snapshop/shop-boxed/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti72' => 'http://www.shindiristudio.com/snapshop/shop-boxed/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti114' => 'http://www.shindiristudio.com/snapshop/shop-boxed/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti144' => 'http://www.shindiristudio.com/snapshop/shop-boxed/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'header_bar' => '0', 'header_bar_height' => '30', 'header_bar_left' => array('disabled' => array('placebo' => 'placebo', 'language-bar' => 'language-bar', 'login-link' => 'login-link', 'network-icons' => 'network-icons', 'tagline-alt' => 'tagline-alt', 'menu' => 'menu'), 'enabled' => array('placebo' => 'placebo', 'tagline' => 'tagline')), 'header_bar_right' => array('disabled' => array('placebo' => 'placebo', 'menu' => 'menu', 'tagline' => 'tagline', 'network-icons' => 'network-icons', 'login-link' => 'login-link'), 'enabled' => array('placebo' => 'placebo', 'language-bar' => 'language-bar', 'tagline-alt' => 'tagline-alt')), 'header_bar_menu' => 'side-menu-1', 'header_bar_networks' => '1', 'header_bar_tagline' => '<i class="fa fa-phone-square"></i> REACH OUT TO US: <STRONG>+381 (0) 63 255 7004</STRONG>', 'header_bar_tagline_alt' => 'Write us at: <STRONG><a href="#">info@yourdomain.com</a></STRONG>', 's_header_bar_bg' => '#111111', 's_header_bar_txt' => '#ffffff', 's_header_bar_lnk' => '#ffffff', 's_header_bar_lnkhvr' => '#c74c44', 's_header_bar_brdr' => '#c74c44', 'f_header_bar_mn' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_header_bar_mnggl_on' => '1', 'f_header_bar_mnggl' => array('face' => 'Rokkitt', 'size' => '14px', 'style' => 'normal', 'weight' => '400'), 'header_height' => '60', 'header_sticky' => '0', 'header_width' => '1920', 'header_mode' => 'center', 'header_left' => array('disabled' => array('placebo' => 'placebo', 'tagline' => 'tagline', 'tagline-alt' => 'tagline-alt', 'woo-login-link' => 'woo-login-link', 'woo-cart' => 'woo-cart', 'network-icons' => 'network-icons', 'sidenav' => 'sidenav', 'search' => 'search', 'login-link' => 'login-link', 'logo' => 'logo'), 'enabled' => array('placebo' => 'placebo', 'menu' => 'menu')), 'header_right' => array('disabled' => array('placebo' => 'placebo', 'logo' => 'logo', 'menu' => 'menu', 'tagline-alt' => 'tagline-alt', 'woo-login-link' => 'woo-login-link', 'tagline' => 'tagline', 'network-icons' => 'network-icons', 'login-link' => 'login-link', 'sidenav' => 'sidenav'), 'enabled' => array('placebo' => 'placebo', 'woo-cart' => 'woo-cart', 'search' => 'search')), 'header_logo' => 'http://www.shindiristudio.com/snapshop/shop-boxed/wp-content/uploads/2014/07/logo1.png', 'header_tagline' => 'FramedWP by br0', 'header_tagline_alt' => 'WordPress', 'header_left_sidenav' => 'header-left-sidenav', 'header_right_sidenav' => 'header-right-sidenav', 'header_menu' => 'header-1', 'header_networks' => '1', 'header_custom' => 'http://www.shindiristudio.com/snapshop/shop-boxed/wp-content/uploads/sites/6/2014/08/logo-boxed-slider.png', 'header_custom_height' => '160', 's_header_bg' => '#ffffff', 's_header_txt' => '#222222', 's_header_lnk' => '#222222', 's_header_lnkhvr' => '#c74c44', 's_header_brdr' => '#cccccc', 's_header_tpbrdr' => '#222222', 's_header_drpdwn_bg' => '#222222', 's_header_drpdwn_lnk' => '#ffffff', 's_header_drpdwn_lnkhvr' => '#c74c44', 's_header_ldbr' => '#c74c44', 'f_header_mn' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_header_mnggl_on' => '1', 'f_header_mnggl' => array('face' => 'Rokkitt', 'size' => '17px', 'style' => 'normal', 'weight' => '500'), 'f_header_drpdwn' => array('face' => 'Lovelo', 'size' => '17px', 'style' => 'normal', 'weight' => '400'), 'f_header_drpdwnggl_on' => '1', 'f_header_drpdwnggl' => array('face' => 'Rokkitt', 'size' => '15px', 'style' => 'normal', 'weight' => '400'), 'breadcrumbs_active' => '0', 'breadcrumbs_height' => '60', 'breadcrumbs_tagline' => '', 's_breadcrumbs_bg' => '#ffffff', 's_breadcrumbs_txt' => '#808080', 's_breadcrumbs_lnk' => '#222222', 's_breadcrumbs_lnkhvr' => '#c74c44', 's_breadcrumbs_brdr' => '#cccccc', 'f_breadcrumbs' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_breadcrumbs_ggl_on' => '1', 'f_breadcrumbs_ggl' => array('face' => 'Rokkitt', 'size' => '17px', 'style' => 'normal', 'weight' => '400'), 'snpshpwp_hide_page_title' => '0', 'enable_comments' => '0', 's_post_bg' => '#ffffff', 's_post_txt' => '#808080', 's_post_hdr' => '#222222', 's_post_lnk' => '#c74c44', 's_post_lnkhvr' => '#c74c44', 's_post_brdr' => '#cccccc', 's_post_bttn' => '#222222', 's_post_bttnhvr' => '#c74c44', 's_post_bttnlnk' => '#ffffff', 's_post_bttnlnkhvr' => '#ffffff', 'f_post_mn' => array('face' => 'Lovelo', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_post_mnggl_on' => '1', 'f_post_mnggl' => array('face' => 'Rokkitt', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_post_hdr' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_post_hdrggl_on' => '1', 'f_post_hdrggl' => array('face' => 'Rokkitt', 'size' => '17px', 'style' => 'normal', 'weight' => '400'), 'f_post_crsv' => array('face' => 'Lovelo', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_post_crsvggl_on' => '1', 'f_post_crsvggl' => array('face' => 'Rokkitt', 'size' => '16px', 'style' => 'italic', 'weight' => '400'), 'sidebar-size' => '5', 'sidebar-blog' => '1', 'sidebar-blog-position' => '0', 'sidebar-single' => '1', 'sidebar-single-position' => '1', 'sidebar-page' => '1', 'sidebar-page-position' => '0', 'sidebar' => array(1 => array('order' => '1', 'title' => 'Header Left Sidenav'), 2 => array('order' => '2', 'title' => 'Header Right Sidenav'), 3 => array('order' => '3', 'title' => 'Bottom 1'), 4 => array('order' => '4', 'title' => 'Bottom 2'), 5 => array('order' => '5', 'title' => 'Bottom 3'), 6 => array('order' => '6', 'title' => 'Bottom 4'), 7 => array('order' => '7', 'title' => 'Blog Archive - Custom')), 'footer_area' => '0', 'footer_widgets' => '0', 'footer_sidebar' => '3', 'footer_width' => '1301', 's_footer_tpbrdr' => '#222222', 's_footer_bg' => '#222222', 's_footer_txt' => '#808080', 's_footer_hdr' => '#ffffff', 's_footer_lnk' => '#ffffff', 's_footer_lnkhvr' => '#c74c44', 'f_footer_wt' => array('face' => 'Lovelo', 'size' => '15px', 'style' => 'normal', 'weight' => '400'), 'f_footer_wtggl_on' => '1', 'f_footer_wtggl' => array('face' => 'Rokkitt', 'size' => '17px', 'style' => 'normal', 'weight' => '600'), 'f_footer_wtxt' => array('face' => 'Lovelo', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_footer_wtxtggl_on' => '1', 'f_footer_wtxtggl' => array('face' => 'Rokkitt', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'footer_bar' => '0', 'footer_height' => '60', 'footer_left' => array('disabled' => array('placebo' => 'placebo', 'login-link' => 'login-link', 'tagline' => 'tagline', 'network-icons' => 'network-icons', 'tagline-alt' => 'tagline-alt', 'to-the-top' => 'to-the-top'), 'enabled' => array('placebo' => 'placebo', 'menu' => 'menu')), 'footer_right' => array('disabled' => array('placebo' => 'placebo', 'login-link' => 'login-link', 'menu' => 'menu', 'tagline' => 'tagline', 'tagline-alt' => 'tagline-alt', 'network-icons' => 'network-icons'), 'enabled' => array('placebo' => 'placebo', 'to-the-top' => 'to-the-top')), 'footer_menu' => 'header-1', 'footer_networks' => '1', 'footer_tagline' => 'SnapShopWP 2014', 'footer_tagline_alt' => 'WordPress', 'footer_up_text' => '', 's_footer_lmnt_bg' => '#111111', 's_footer_lmnt_txt' => '#808080', 's_footer_lmnt_lnk' => '#808080', 's_footer_lmnt_lnkhvr' => '#c74c44', 's_footer_lmnt_brdr' => '#222222', 'f_footer_fbr' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_footer_fbrggl_on' => '1', 'f_footer_fbrggl' => array('face' => 'Rokkitt', 'size' => '14px', 'style' => 'normal', 'weight' => '400'), 'woo-columns' => '3', 'woo-columns-rel' => '4', 'woo_per_page' => '12', 'woo_rel_per_page' => '4', 'sidebar-woo' => '1', 'sidebar-woo-position' => '1', 'sidebar-woo-single' => '0', 'sidebar-woo-single-position' => '0', 'sidebar-woo-size' => '4', 'shop-widgets-before' => 'none', 'shop-widgets-after' => 'none', 'product-widgets-before' => 'none', 'product-widgets-after' => 'none', 'site_layout' => 'boxed', 'responsive' => '1', 'loader_background' => 'http://www.shindiristudio.com/snapshop/shop-boxed/wp-content/uploads/sites/6/2014/08/logo-newsletter.png', 'tracking-code' => '', 'content_width' => '1360', 'fb_hres_c' => '36', 'fb_bmargin' => '36', 'fb_hres_w' => '1200', 'fb_mres_c' => '18', 'custom-css-high' => '', 'fb_mres_w' => '1024', 'fb_lres_c' => '6', 'fb_mres_s' => '1', 'custom-css-med' => '', 'fb_lres_w' => '768', 'fb_lres_s' => '1', 'custom-css-low' => '', 'fimage_width' => '960', 'fimage_height' => '400', 'fimage_override' => '0', 'single_fimage_width' => '1200', 'single_fimage_height' => '400', 'single_fimage_override' => '1', 'twitter_ck' => 'WTpkUO8EKqFf7LIufyxymw', 'twitter_cs' => 'FTTyvUgl576OSiA86aFL4s3Mo3Ym7XmRoccOsN4xqU', 'twitter_at' => '966576138-B4gBnApgj9Khbt7931uowPw6KVHfBb4fB1Njp5SC', 'twitter_ats' => 'gBqkVVG6cW2qC9sInSVKYBD0N0IpXgmauPsifhSg8wg4J', 'mailchimp' => '0', 'mailchimp_override' => '', 'language' => array(1 => array('order' => '1', 'flag' => 'uk.png', 'language' => 'English', 'langurl' => '#'), 2 => array('order' => '2', 'flag' => 'france.png', 'language' => 'French', 'langurl' => '#'), 3 => array('order' => '3', 'flag' => 'germany.png', 'language' => 'German', 'langurl' => '#')), 'custom-css' => '', 'custom-css-snpshp_limit_width' => '1301'), 'home' => '2', 'widgets' => array('sidebars_widgets' => array('sidebar-1' => array(0 => 'text-3', 1 => 'search-2', 2 => 'recent-posts-2', 3 => 'recent-comments-2', 4 => 'archives-2', 5 => 'meta-2'), 'wp_inactive_widgets' => array(), 'sidebar-blog' => array(0 => 'snpshpwp_category-3', 1 => 'recent-posts-5'), 'sidebar-single' => array(0 => 'snpshpwp_category-6', 1 => 'categories-4', 2 => 'tag_cloud-3'), 'sidebar-page' => array(0 => 'text-4', 1 => 'text-5', 2 => 'snpshpwp_category-5', 3 => 'woocommerce_products-6', 4 => 'snpshpwp_twitter-2'), 'footer-1' => array(0 => 'text-2'), 'footer-2' => array(0 => 'text-9', 1 => 'woocommerce_product_search-2'), 'footer-3' => array(0 => 'text-7', 1 => 'socialbro-3'), 'footer-4' => array(), 'footer-5' => array(), 'sidebar-woo' => array(0 => 'woocommerce_product_categories-2'), 'sidebar-woo-single' => array(0 => 'woocommerce_product_categories-3'), 'header-left-sidenav' => array(0 => 'snpshpwp_category-4', 1 => 'nav_menu-2', 2 => 'recent-posts-3'), 'header-right-sidenav' => array(0 => 'nav_menu-3', 1 => 'nav_menu-4', 2 => 'socialbro-2'), 'bottom-1' => array(0 => 'woocommerce_top_rated_products-2'), 'bottom-2' => array(0 => 'woocommerce_recent_reviews-2'), 'bottom-3' => array(0 => 'woocommerce_products-5'), 'bottom-4' => array(0 => 'woocommerce_product_categories-4'), 'blog-archive-custom' => array(0 => 'snpshpwp_category-7', 1 => 'tag_cloud-4', 2 => 'text-6'), 'array_version' => 3), 'widget_categories' => array(4 => array('title' => '', 'count' => 1, 'hierarchical' => 0, 'dropdown' => 0), '_multiwidget' => 1), 'widget_text' => array(2 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/snapshop/shop-boxed/wp-content/uploads/sites/6/2014/08/logo-boxed-footer1.png"></img> <br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), 3 => array('title' => 'OUR LINKS', 'text' => '<a href="#">Envato.com</h3></a><BR> <a href="#">Themeforest.net</a><BR> <a href="#">Codecanyon.net</a><BR> <a href="#">Videohive.net</a><BR> <a href="#">Shindiristudio.com</a><BR>', 'filter' => false), 4 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/envato/logo-footer.png"></img> <br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean erat lacus, vulputate sit amet lacinia vestibulum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), 5 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/sidebar-ad.jpg"></img><br><img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/ad21.jpg"></img><br><img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/ad13.jpg"></img>', 'filter' => false), 6 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/sidebar-ad.jpg">', 'filter' => false), 7 => array('title' => 'GET IN TOUCH', 'text' => 'Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), 9 => array('title' => 'Search Products', 'text' => 'Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), '_multiwidget' => 1), 'widget_rss' => array(1 => array(), '_multiwidget' => 1), 'widget_search' => array(2 => array('title' => ''), '_multiwidget' => 1), 'widget_recent-posts' => array(2 => array('title' => '', 'number' => 5), 3 => array('title' => '', 'number' => 5, 'show_date' => false), 5 => array('title' => '', 'number' => 5, 'show_date' => false), '_multiwidget' => 1), 'widget_recent-comments' => array(2 => array('title' => '', 'number' => 5), '_multiwidget' => 1), 'widget_archives' => array(2 => array('title' => '', 'count' => 0, 'dropdown' => 0), '_multiwidget' => 1), 'widget_meta' => array(2 => array('title' => ''), '_multiwidget' => 1), 'widget_nav_menu' => array(2 => array('title' => '', 'nav_menu' => 13), 3 => array('title' => 'THIS IS SNAPSHOP', 'nav_menu' => 32), 4 => array('title' => 'CLOSE AND PERSONAL', 'nav_menu' => 33), '_multiwidget' => 1), 'widget_pages' => array(1 => array(), '_multiwidget' => 1), 'widget_snpshpwp_twitter' => array(1 => array(), 2 => array('title' => 'LATEST FROM TWITTER', 'user' => '', 'count' => '1'), '_multiwidget' => 1), 'widget_snpshpwp_category' => array(3 => array('title' => 'Fresh', 'order' => 'date', 'category' => '-1', 'number' => '5'), 4 => array('title' => 'Fresh', 'order' => 'date', 'category' => '-1', 'number' => '3'), 5 => array('title' => 'LATEST BLOG POSTS', 'order' => 'date', 'category' => '-1', 'number' => '3'), 6 => array('title' => 'LATEST POSTS', 'order' => 'date', 'category' => '-1', 'number' => '5'), 7 => array('title' => 'LATEST POSTS', 'order' => 'date', 'category' => '-1', 'number' => '5'), '_multiwidget' => 1), 'widget_woocommerce_products' => array(5 => array('title' => '', 'number' => '4', 'show' => '', 'orderby' => 'date', 'order' => 'desc', 'hide_free' => 0, 'show_hidden' => 0), 6 => array('title' => 'FEATURED PRODUCTS', 'number' => '3', 'show' => '', 'orderby' => 'date', 'order' => 'desc', 'hide_free' => 0, 'show_hidden' => 0), '_multiwidget' => 1), 'widget_woocommerce_product_categories' => array(2 => array('title' => 'Product Categories', 'orderby' => 'order', 'dropdown' => 0, 'count' => '1', 'hierarchical' => 0, 'show_children_only' => 0), 3 => array('title' => 'Product Categories', 'orderby' => 'name', 'dropdown' => 0, 'count' => '1', 'hierarchical' => '1', 'show_children_only' => 0), 4 => array('title' => '', 'orderby' => 'order', 'dropdown' => 0, 'count' => '1', 'hierarchical' => 0, 'show_children_only' => 0), '_multiwidget' => 1), 'widget_woocommerce_product_search' => array(2 => array('title' => ''), '_multiwidget' => 1), 'widget_tag_cloud' => array(3 => array('title' => '', 'taxonomy' => 'post_tag'), 4 => array('title' => 'POPULAR TAGS', 'taxonomy' => 'post_tag'), '_multiwidget' => 1), 'widget_woocommerce_price_filter' => array('_multiwidget' => 1, 1 => array()), 'widget_woocommerce_recently_viewed_products' => array('_multiwidget' => 1, 1 => array()), 'widget_woocommerce_product_tag_cloud' => array(1 => array(), '_multiwidget' => 1), 'widget_socialbro' => array(2 => array('title' => 'CONNECT WITH SNAPSHOP', 'opacity' => '50', 'hover_opacity' => '100', 'icons' => 'http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0067_Vector-Smart-Object.png::#::Like Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0066_Vector-Smart-Object.png::#::Follow Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0064_Vector-Smart-Object.png::#::Plus Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0069_Vector-Smart-Object.png::#::Rate Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0063_Vector-Smart-Object.png::#::Pin Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0055_Vector-Smart-Object.png::#::Digg Us'), 3 => array('title' => '', 'opacity' => '100', 'hover_opacity' => '70', 'icons' => 'http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0067_Vector-Smart-Object.png::#::Facebook||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0064_Vector-Smart-Object.png::#::Google +||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0066_Vector-Smart-Object.png::#::Twitter||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0063_Vector-Smart-Object.png::#::Pinteresr||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0055_Vector-Smart-Object.png::#::DiggIt||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0059_Vector-Smart-Object.png::#::Flickr||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0069_Vector-Smart-Object.png::#::Envato||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0015_Vector-Smart-Object.png::#::RSS'), '_multiwidget' => 1), 'widget_calendar' => array(1 => array(), '_multiwidget' => 1), 'widget_rev-slider-widget' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_widget_cart' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_layered_nav' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_layered_nav_filters' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_recent_reviews' => array(1 => array(), 2 => array('title' => '', 'number' => '4'), '_multiwidget' => 1), 'widget_woocommerce_top_rated_products' => array(1 => array(), 2 => array('title' => '', 'number' => '4'), '_multiwidget' => 1))), 'snapshop-creative' => array('options' => array('blog_layout' => '3', 'blog_excerpt' => '223', 'snpshpwp_hide_featarea' => '0', 'snpshpwp_hide_title' => '0', 'snpshpwp_hide_tags' => '0', 'snpshpwp_hide_related_main' => '0', 'snpshpwp_related_columns' => '3', 'snpshpwp_hide_meta' => '0', 'snpshpwp_hide_author' => '0', 'snpshpwp_hide_postmeta' => '0', 'snpshpwp_hide_share' => '0', 'snpshpwp_hide_related_side' => '1', 'contactform_message' => '', 'contact' => array(1 => array('order' => '1', 'url' => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/82.jpg', 'name' => 'James McMilan', 'email' => '*****@*****.**', 'job' => 'Web Designer', 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'contact' => array(1 => array('socialnetworksurl' => '#', 'socialnetworks' => 'facebook.png'), 2 => array('socialnetworksurl' => '#', 'socialnetworks' => 'twitter.png'), 3 => array('socialnetworksurl' => '#', 'socialnetworks' => 'google.png'))), 2 => array('order' => '2', 'url' => '', 'name' => 'Trisha Takinawa', 'email' => '*****@*****.**', 'job' => 'Sales Manager', 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'contact' => array(1 => array('socialnetworksurl' => '#', 'socialnetworks' => 'facebook.png'), 2 => array('socialnetworksurl' => '#', 'socialnetworks' => 'white_spotify.png')))), 'favicon' => 'http://www.shindiristudio.com/snapshop/shop-creative/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti57' => 'http://www.shindiristudio.com/snapshop/shop-creative/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti72' => 'http://www.shindiristudio.com/snapshop/shop-creative/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti114' => 'http://www.shindiristudio.com/snapshop/shop-creative/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti144' => 'http://www.shindiristudio.com/snapshop/shop-creative/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'header_bar' => '1', 'header_bar_height' => '30', 'header_bar_left' => array('disabled' => array('placebo' => 'placebo', 'language-bar' => 'language-bar', 'login-link' => 'login-link', 'network-icons' => 'network-icons', 'menu' => 'menu', 'tagline-alt' => 'tagline-alt'), 'enabled' => array('placebo' => 'placebo', 'tagline' => 'tagline')), 'header_bar_right' => array('disabled' => array('placebo' => 'placebo', 'menu' => 'menu', 'tagline' => 'tagline', 'network-icons' => 'network-icons', 'login-link' => 'login-link'), 'enabled' => array('placebo' => 'placebo', 'language-bar' => 'language-bar', 'tagline-alt' => 'tagline-alt')), 'header_bar_menu' => 'side-menu', 'header_bar_networks' => '1', 'header_bar_tagline' => '<i class="fa fa-phone-square"></i> REACH OUT TO US: <STRONG>+381 (0) 63 255 7004</STRONG>', 'header_bar_tagline_alt' => 'Write us at: <STRONG><a href="#">info@yourdomain.com</a></STRONG>', 's_header_bar_bg' => '#ffffff', 's_header_bar_txt' => '#222222', 's_header_bar_lnk' => '#222222', 's_header_bar_lnkhvr' => '#c74c44', 's_header_bar_brdr' => '#cccccc', 'f_header_bar_mn' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_header_bar_mnggl_on' => '1', 'f_header_bar_mnggl' => array('face' => 'PT Sans', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'header_height' => '68', 'header_sticky' => '1', 'header_width' => '1860', 'header_mode' => 'default', 'header_left' => array('disabled' => array('placebo' => 'placebo', 'tagline' => 'tagline', 'tagline-alt' => 'tagline-alt', 'woo-login-link' => 'woo-login-link', 'woo-cart' => 'woo-cart', 'network-icons' => 'network-icons', 'search' => 'search', 'login-link' => 'login-link', 'menu' => 'menu', 'sidenav' => 'sidenav'), 'enabled' => array('placebo' => 'placebo', 'logo' => 'logo')), 'header_right' => array('disabled' => array('placebo' => 'placebo', 'logo' => 'logo', 'menu' => 'menu', 'tagline-alt' => 'tagline-alt', 'woo-login-link' => 'woo-login-link', 'tagline' => 'tagline', 'network-icons' => 'network-icons', 'login-link' => 'login-link', 'search' => 'search', 'woo-cart' => 'woo-cart'), 'enabled' => array('placebo' => 'placebo', 'sidenav' => 'sidenav')), 'header_logo' => 'http://www.shindiristudio.com/snapshop/shop-creative/wp-content/uploads/sites/7/2014/08/logo-creative.png', 'header_tagline' => 'FramedWP by br0', 'header_tagline_alt' => 'WordPress', 'header_left_sidenav' => 'right-main-menu', 'header_right_sidenav' => 'right-main-menu', 'header_menu' => 'header-1', 'header_networks' => '1', 'header_custom' => '', 'header_custom_height' => '100', 's_header_bg' => '#222222', 's_header_txt' => '#ffffff', 's_header_lnk' => '#ffffff', 's_header_lnkhvr' => '#c74c44', 's_header_brdr' => '#222222', 's_header_tpbrdr' => '#000000', 's_header_drpdwn_bg' => '#333333', 's_header_drpdwn_lnk' => '#f2f2f2', 's_header_drpdwn_lnkhvr' => '#c74c44', 's_header_ldbr' => '#c74c44', 'f_header_mn' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_header_mnggl_on' => '1', 'f_header_mnggl' => array('face' => 'Open Sans', 'size' => '16px', 'style' => 'normal', 'weight' => '700'), 'f_header_drpdwn' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_header_drpdwnggl_on' => '1', 'f_header_drpdwnggl' => array('face' => 'Open Sans', 'size' => '14px', 'style' => 'normal', 'weight' => '400'), 'breadcrumbs_active' => '0', 'breadcrumbs_height' => '60', 'breadcrumbs_tagline' => '', 's_breadcrumbs_bg' => '#ffffff', 's_breadcrumbs_txt' => '#222222', 's_breadcrumbs_lnk' => '#222222', 's_breadcrumbs_lnkhvr' => '#c74c44', 's_breadcrumbs_brdr' => '#cccccc', 'f_breadcrumbs' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_breadcrumbs_ggl_on' => '0', 'f_breadcrumbs_ggl' => array('face' => 'PT Serif', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'snpshpwp_hide_page_title' => '0', 'enable_comments' => '0', 's_post_bg' => '#ffffff', 's_post_txt' => '#808080', 's_post_hdr' => '#222222', 's_post_lnk' => '#c74c44', 's_post_lnkhvr' => '#c74c44', 's_post_brdr' => '#ffffff', 's_post_bttn' => '#222222', 's_post_bttnhvr' => '#c74c44', 's_post_bttnlnk' => '#ffffff', 's_post_bttnlnkhvr' => '#ffffff', 'f_post_mn' => array('face' => 'Lovelo', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_post_mnggl_on' => '1', 'f_post_mnggl' => array('face' => 'Open Sans', 'size' => '14px', 'style' => 'normal', 'weight' => '400'), 'f_post_hdr' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_post_hdrggl_on' => '0', 'f_post_hdrggl' => array('face' => 'PT Serif', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_post_crsv' => array('face' => 'Lovelo', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_post_crsvggl_on' => '1', 'f_post_crsvggl' => array('face' => 'Open Sans', 'size' => '14px', 'style' => 'italic', 'weight' => '400'), 'sidebar-size' => '5', 'sidebar-blog' => '1', 'sidebar-blog-position' => '0', 'sidebar-single' => '1', 'sidebar-single-position' => '1', 'sidebar-page' => '1', 'sidebar-page-position' => '0', 'sidebar' => array(1 => array('order' => '1', 'title' => 'Header Left Sidenav'), 2 => array('order' => '2', 'title' => 'Header Right Sidenav'), 3 => array('order' => '3', 'title' => 'Bottom 1'), 4 => array('order' => '4', 'title' => 'Bottom 2'), 5 => array('order' => '5', 'title' => 'Bottom 3'), 6 => array('order' => '6', 'title' => 'Bottom 4'), 7 => array('order' => '7', 'title' => 'Blog Archive - Custom'), 8 => array('order' => '8', 'title' => 'Right Main Menu')), 'footer_area' => '0', 'footer_widgets' => '1', 'footer_sidebar' => '3', 'footer_width' => '1301', 's_footer_tpbrdr' => '#222222', 's_footer_bg' => '#ffffff', 's_footer_txt' => '#808080', 's_footer_hdr' => '#222222', 's_footer_lnk' => '#222222', 's_footer_lnkhvr' => '#c74c44', 'f_footer_wt' => array('face' => 'Lovelo', 'size' => '15px', 'style' => 'normal', 'weight' => '400'), 'f_footer_wtggl_on' => '0', 'f_footer_wtggl' => array('face' => 'PT Serif', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_footer_wtxt' => array('face' => 'Lovelo', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_footer_wtxtggl_on' => '1', 'f_footer_wtxtggl' => array('face' => 'Open Sans', 'size' => '14px', 'style' => 'normal', 'weight' => '400'), 'footer_bar' => '0', 'footer_height' => '60', 'footer_left' => array('disabled' => array('placebo' => 'placebo', 'login-link' => 'login-link', 'tagline' => 'tagline', 'network-icons' => 'network-icons', 'tagline-alt' => 'tagline-alt', 'to-the-top' => 'to-the-top'), 'enabled' => array('placebo' => 'placebo', 'menu' => 'menu')), 'footer_right' => array('disabled' => array('placebo' => 'placebo', 'login-link' => 'login-link', 'menu' => 'menu', 'tagline' => 'tagline', 'tagline-alt' => 'tagline-alt', 'network-icons' => 'network-icons'), 'enabled' => array('placebo' => 'placebo', 'to-the-top' => 'to-the-top')), 'footer_menu' => 'header-1', 'footer_networks' => '1', 'footer_tagline' => 'SnapShopWP 2014', 'footer_tagline_alt' => 'WordPress', 'footer_up_text' => '', 's_footer_lmnt_bg' => '#222222', 's_footer_lmnt_txt' => '#f2f2f2', 's_footer_lmnt_lnk' => '#f2f2f2', 's_footer_lmnt_lnkhvr' => '#c74c44', 's_footer_lmnt_brdr' => '#222222', 'f_footer_fbr' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_footer_fbrggl_on' => '1', 'f_footer_fbrggl' => array('face' => 'Open Sans', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'woo-columns' => '4', 'woo-columns-rel' => '4', 'woo_per_page' => '12', 'woo_rel_per_page' => '4', 'sidebar-woo' => '1', 'sidebar-woo-position' => '1', 'sidebar-woo-single' => '0', 'sidebar-woo-single-position' => '0', 'sidebar-woo-size' => '5', 'shop-widgets-before' => '1', 'shop-widgets-after' => 'none', 'product-widgets-before' => 'none', 'product-widgets-after' => 'none', 'site_layout' => 'contained', 'responsive' => '1', 'loader_background' => 'http://www.shindiristudio.com/snapshop/shop-creative/wp-content/uploads/sites/7/2014/08/logo-bllurred-11.jpg', 'tracking-code' => '', 'content_width' => '1400', 'fb_hres_c' => '36', 'fb_bmargin' => '36', 'fb_hres_w' => '1200', 'fb_mres_c' => '18', 'custom-css-high' => '', 'fb_mres_w' => '1024', 'fb_lres_c' => '6', 'fb_mres_s' => '1', 'custom-css-med' => '', 'fb_lres_w' => '768', 'fb_lres_s' => '1', 'custom-css-low' => '', 'fimage_width' => '960', 'fimage_height' => '400', 'fimage_override' => '0', 'single_fimage_width' => '1200', 'single_fimage_height' => '400', 'single_fimage_override' => '1', 'twitter_ck' => 'WTpkUO8EKqFf7LIufyxymw', 'twitter_cs' => 'FTTyvUgl576OSiA86aFL4s3Mo3Ym7XmRoccOsN4xqU', 'twitter_at' => '966576138-B4gBnApgj9Khbt7931uowPw6KVHfBb4fB1Njp5SC', 'twitter_ats' => 'gBqkVVG6cW2qC9sInSVKYBD0N0IpXgmauPsifhSg8wg4J', 'mailchimp' => '0', 'mailchimp_override' => '', 'language' => array(1 => array('order' => '1', 'flag' => 'uk.png', 'language' => 'English', 'langurl' => '#'), 2 => array('order' => '2', 'flag' => 'france.png', 'language' => 'French', 'langurl' => '#'), 3 => array('order' => '3', 'flag' => 'germany.png', 'language' => 'German', 'langurl' => '#')), 'custom-css' => '', 'custom-css-snpshp_limit_width' => '1301'), 'home' => '1284', 'widgets' => array('sidebars_widgets' => array('sidebar-1' => array(0 => 'text-3', 1 => 'search-2', 2 => 'recent-posts-2', 3 => 'recent-comments-2', 4 => 'archives-2', 5 => 'meta-2'), 'wp_inactive_widgets' => array(), 'sidebar-blog' => array(0 => 'snpshpwp_category-3', 1 => 'recent-posts-5'), 'sidebar-single' => array(0 => 'snpshpwp_category-6', 1 => 'categories-4', 2 => 'tag_cloud-3'), 'sidebar-page' => array(0 => 'text-4', 1 => 'text-5', 2 => 'snpshpwp_category-5', 3 => 'woocommerce_products-6', 4 => 'snpshpwp_twitter-2'), 'footer-1' => array(0 => 'text-2'), 'footer-2' => array(0 => 'text-9', 1 => 'woocommerce_product_search-2'), 'footer-3' => array(0 => 'text-7', 1 => 'socialbro-3'), 'footer-4' => array(), 'footer-5' => array(), 'sidebar-woo' => array(0 => 'woocommerce_product_categories-2'), 'sidebar-woo-single' => array(0 => 'woocommerce_product_categories-3'), 'shop-widgets-before-1' => array(), 'header-left-sidenav' => array(0 => 'snpshpwp_category-4', 1 => 'nav_menu-2', 2 => 'recent-posts-3'), 'header-right-sidenav' => array(0 => 'nav_menu-3', 1 => 'nav_menu-4', 2 => 'socialbro-2'), 'bottom-1' => array(0 => 'woocommerce_top_rated_products-2'), 'bottom-2' => array(0 => 'woocommerce_recent_reviews-2'), 'bottom-3' => array(0 => 'woocommerce_products-5'), 'bottom-4' => array(0 => 'woocommerce_product_categories-4'), 'blog-archive-custom' => array(0 => 'snpshpwp_category-7', 1 => 'tag_cloud-4', 2 => 'text-6'), 'right-main-menu' => array(0 => 'nav_menu-5', 1 => 'nav_menu-7', 2 => 'nav_menu-8', 3 => 'nav_menu-6', 4 => 'socialbro-4'), 'array_version' => 3), 'widget_categories' => array(4 => array('title' => '', 'count' => 1, 'hierarchical' => 0, 'dropdown' => 0), '_multiwidget' => 1), 'widget_text' => array(2 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/envato/logo-footer.png"></img> <br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), 3 => array('title' => 'OUR LINKS', 'text' => '<a href="#">Envato.com</h3></a><BR> <a href="#">Themeforest.net</a><BR> <a href="#">Codecanyon.net</a><BR> <a href="#">Videohive.net</a><BR> <a href="#">Shindiristudio.com</a><BR>', 'filter' => false), 4 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/envato/logo-footer.png"></img> <br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean erat lacus, vulputate sit amet lacinia vestibulum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), 5 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/sidebar-ad.jpg"></img><br><img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/ad21.jpg"></img><br><img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/ad13.jpg"></img>', 'filter' => false), 6 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/sidebar-ad.jpg">', 'filter' => false), 7 => array('title' => 'GET IN TOUCH', 'text' => 'Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), 9 => array('title' => 'Search Products', 'text' => 'Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), '_multiwidget' => 1), 'widget_rss' => array(1 => array(), '_multiwidget' => 1), 'widget_search' => array(2 => array('title' => ''), '_multiwidget' => 1), 'widget_recent-posts' => array(2 => array('title' => '', 'number' => 5), 3 => array('title' => '', 'number' => 5, 'show_date' => false), 5 => array('title' => '', 'number' => 5, 'show_date' => false), '_multiwidget' => 1), 'widget_recent-comments' => array(2 => array('title' => '', 'number' => 5), '_multiwidget' => 1), 'widget_archives' => array(2 => array('title' => '', 'count' => 0, 'dropdown' => 0), '_multiwidget' => 1), 'widget_meta' => array(2 => array('title' => ''), '_multiwidget' => 1), 'widget_nav_menu' => array(2 => array('title' => '', 'nav_menu' => 32), 3 => array('title' => 'THIS IS SNAPSHOP', 'nav_menu' => 32), 4 => array('title' => 'CLOSE AND PERSONAL', 'nav_menu' => 33), 5 => array('title' => 'SNAPSHOP WP THEME', 'nav_menu' => 32), 6 => array('title' => 'YOUR ITEMS', 'nav_menu' => 33), 7 => array('title' => 'FEATURED ITEMS', 'nav_menu' => 33), 8 => array('title' => 'THIS IS SNAPSHOP', 'nav_menu' => 33), '_multiwidget' => 1), 'widget_pages' => array(1 => array(), '_multiwidget' => 1), 'widget_snpshpwp_twitter' => array(1 => array(), 2 => array('title' => 'LATEST FROM TWITTER', 'user' => '', 'count' => '1'), '_multiwidget' => 1), 'widget_snpshpwp_category' => array(3 => array('title' => 'Fresh', 'order' => 'date', 'category' => '-1', 'number' => '5'), 4 => array('title' => 'Fresh', 'order' => 'date', 'category' => '-1', 'number' => '3'), 5 => array('title' => 'LATEST BLOG POSTS', 'order' => 'date', 'category' => '-1', 'number' => '3'), 6 => array('title' => 'LATEST POSTS', 'order' => 'date', 'category' => '-1', 'number' => '5'), 7 => array('title' => 'LATEST POSTS', 'order' => 'date', 'category' => '-1', 'number' => '5'), '_multiwidget' => 1), 'widget_woocommerce_products' => array(5 => array('title' => '', 'number' => '4', 'show' => '', 'orderby' => 'date', 'order' => 'desc', 'hide_free' => 0, 'show_hidden' => 0), 6 => array('title' => 'FEATURED PRODUCTS', 'number' => '3', 'show' => '', 'orderby' => 'date', 'order' => 'desc', 'hide_free' => 0, 'show_hidden' => 0), '_multiwidget' => 1), 'widget_woocommerce_product_categories' => array(2 => array('title' => 'Product Categories', 'orderby' => 'order', 'dropdown' => 0, 'count' => '1', 'hierarchical' => '1', 'show_children_only' => 0), 3 => array('title' => 'Product Categories', 'orderby' => 'name', 'dropdown' => 0, 'count' => '1', 'hierarchical' => '1', 'show_children_only' => 0), 4 => array('title' => '', 'orderby' => 'order', 'dropdown' => 0, 'count' => '1', 'hierarchical' => '1', 'show_children_only' => 0), '_multiwidget' => 1), 'widget_woocommerce_product_search' => array(2 => array('title' => ''), '_multiwidget' => 1), 'widget_tag_cloud' => array(3 => array('title' => '', 'taxonomy' => 'post_tag'), 4 => array('title' => 'POPULAR TAGS', 'taxonomy' => 'post_tag'), '_multiwidget' => 1), 'widget_woocommerce_price_filter' => array('_multiwidget' => 1, 1 => array()), 'widget_woocommerce_recently_viewed_products' => array('_multiwidget' => 1, 1 => array()), 'widget_woocommerce_product_tag_cloud' => array(1 => array(), '_multiwidget' => 1), 'widget_socialbro' => array(2 => array('title' => 'CONNECT WITH SNAPSHOP', 'opacity' => '50', 'hover_opacity' => '100', 'icons' => 'http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0067_Vector-Smart-Object.png::#::Like Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0066_Vector-Smart-Object.png::#::Follow Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0064_Vector-Smart-Object.png::#::Plus Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0069_Vector-Smart-Object.png::#::Rate Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0063_Vector-Smart-Object.png::#::Pin Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0055_Vector-Smart-Object.png::#::Digg Us'), 3 => array('title' => '', 'opacity' => '100', 'hover_opacity' => '70', 'icons' => 'http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0067_Vector-Smart-Object.png::#::Facebook||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0064_Vector-Smart-Object.png::#::Google +||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0066_Vector-Smart-Object.png::#::Twitter||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0063_Vector-Smart-Object.png::#::Pinteresr||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0055_Vector-Smart-Object.png::#::DiggIt||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0059_Vector-Smart-Object.png::#::Flickr||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0069_Vector-Smart-Object.png::#::Envato||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0015_Vector-Smart-Object.png::#::RSS'), 4 => array('title' => '', 'opacity' => '70', 'hover_opacity' => '100', 'icons' => 'http://www.shindiristudio.com/snapshop/shop-creative/wp-content/themes/snapshopWP/widgets/socialbro/images/Style2/Style2_0067_Vector-Smart-Object.png::#::Facebook||http://www.shindiristudio.com/snapshop/shop-creative/wp-content/themes/snapshopWP/widgets/socialbro/images/Style2/Style2_0064_Vector-Smart-Object.png::#::Google +||http://www.shindiristudio.com/snapshop/shop-creative/wp-content/themes/snapshopWP/widgets/socialbro/images/Style2/Style2_0066_Vector-Smart-Object.png::#::Twitter||http://www.shindiristudio.com/snapshop/shop-creative/wp-content/themes/snapshopWP/widgets/socialbro/images/Style2/Style2_0059_Vector-Smart-Object.png::#::Flickr||http://www.shindiristudio.com/snapshop/shop-creative/wp-content/themes/snapshopWP/widgets/socialbro/images/Style2/Style2_0063_Vector-Smart-Object.png::#::Pinterest||http://www.shindiristudio.com/snapshop/shop-creative/wp-content/themes/snapshopWP/widgets/socialbro/images/Style2/Style2_0043_Vector-Smart-Object.png::#::MySpace'), '_multiwidget' => 1), 'widget_calendar' => array(1 => array(), '_multiwidget' => 1), 'widget_rev-slider-widget' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_widget_cart' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_layered_nav' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_layered_nav_filters' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_recent_reviews' => array(1 => array(), 2 => array('title' => '', 'number' => '4'), '_multiwidget' => 1), 'widget_woocommerce_top_rated_products' => array(1 => array(), 2 => array('title' => '', 'number' => '4'), '_multiwidget' => 1))), 'snapshop-classic' => array('options' => array('blog_layout' => '3', 'blog_excerpt' => '223', 'snpshpwp_hide_featarea' => '0', 'snpshpwp_hide_title' => '0', 'snpshpwp_hide_tags' => '0', 'snpshpwp_hide_related_main' => '0', 'snpshpwp_related_columns' => '3', 'snpshpwp_hide_meta' => '0', 'snpshpwp_hide_author' => '0', 'snpshpwp_hide_postmeta' => '0', 'snpshpwp_hide_share' => '0', 'snpshpwp_hide_related_side' => '1', 'contactform_message' => '', 'contact' => array(1 => array('order' => '1', 'url' => 'http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/82.jpg', 'name' => 'James McMilan', 'email' => '*****@*****.**', 'job' => 'Web Designer', 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'contact' => array(1 => array('socialnetworksurl' => '#', 'socialnetworks' => 'facebook.png'), 2 => array('socialnetworksurl' => '#', 'socialnetworks' => 'twitter.png'), 3 => array('socialnetworksurl' => '#', 'socialnetworks' => 'google.png'))), 2 => array('order' => '2', 'url' => '', 'name' => 'Trisha Takinawa', 'email' => '*****@*****.**', 'job' => 'Sales Manager', 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'contact' => array(1 => array('socialnetworksurl' => '#', 'socialnetworks' => 'facebook.png'), 2 => array('socialnetworksurl' => '#', 'socialnetworks' => 'white_spotify.png')))), 'favicon' => 'http://www.shindiristudio.com/snapshop/shop-classic/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti57' => 'http://www.shindiristudio.com/snapshop/shop-classic/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti72' => 'http://www.shindiristudio.com/snapshop/shop-classic/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti114' => 'http://www.shindiristudio.com/snapshop/shop-classic/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'apple_ti144' => 'http://www.shindiristudio.com/snapshop/shop-classic/wp-content/themes/snapshopWP/images/snpshpwp_favicon.png', 'header_bar' => '0', 'header_bar_height' => '30', 'header_bar_left' => array('disabled' => array('placebo' => 'placebo', 'language-bar' => 'language-bar', 'login-link' => 'login-link', 'network-icons' => 'network-icons', 'menu' => 'menu', 'tagline-alt' => 'tagline-alt'), 'enabled' => array('placebo' => 'placebo', 'tagline' => 'tagline')), 'header_bar_right' => array('disabled' => array('placebo' => 'placebo', 'menu' => 'menu', 'tagline' => 'tagline', 'network-icons' => 'network-icons'), 'enabled' => array('placebo' => 'placebo', 'login-link' => 'login-link', 'language-bar' => 'language-bar', 'tagline-alt' => 'tagline-alt')), 'header_bar_menu' => 'side-menu', 'header_bar_networks' => '1', 'header_bar_tagline' => '<i class="fa fa-phone-square"></i> REACH OUT TO US: <STRONG>+381 (0) 63 255 7004</STRONG>', 'header_bar_tagline_alt' => 'Write us at: <STRONG><a href="#">info@yourdomain.com</a></STRONG>', 's_header_bar_bg' => '#020202', 's_header_bar_txt' => '#ffffff', 's_header_bar_lnk' => '#d0b369', 's_header_bar_lnkhvr' => '#ffffff', 's_header_bar_brdr' => '#020202', 'f_header_bar_mn' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_header_bar_mnggl_on' => '1', 'f_header_bar_mnggl' => array('face' => 'PT Sans', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'header_height' => '70', 'header_sticky' => '1', 'header_width' => '1400', 'header_mode' => 'default', 'header_left' => array('disabled' => array('placebo' => 'placebo', 'tagline' => 'tagline', 'tagline-alt' => 'tagline-alt', 'woo-login-link' => 'woo-login-link', 'woo-cart' => 'woo-cart', 'network-icons' => 'network-icons', 'sidenav' => 'sidenav', 'search' => 'search', 'login-link' => 'login-link'), 'enabled' => array('placebo' => 'placebo', 'logo' => 'logo', 'menu' => 'menu')), 'header_right' => array('disabled' => array('placebo' => 'placebo', 'logo' => 'logo', 'menu' => 'menu', 'tagline-alt' => 'tagline-alt', 'woo-login-link' => 'woo-login-link', 'tagline' => 'tagline', 'network-icons' => 'network-icons', 'login-link' => 'login-link', 'sidenav' => 'sidenav'), 'enabled' => array('placebo' => 'placebo', 'woo-cart' => 'woo-cart', 'search' => 'search')), 'header_logo' => 'http://www.shindiristudio.com/snapshop/shop-classic/wp-content/uploads/sites/8/2014/08/logo-classic2.png', 'header_tagline' => 'FramedWP by br0', 'header_tagline_alt' => 'WordPress', 'header_left_sidenav' => 'header-left-sidenav', 'header_right_sidenav' => 'header-right-sidenav', 'header_menu' => 'header-1', 'header_networks' => '1', 'header_custom' => '', 'header_custom_height' => '100', 's_header_bg' => '#333333', 's_header_txt' => '#ffffff', 's_header_lnk' => '#ffffff', 's_header_lnkhvr' => '#d0b369', 's_header_brdr' => '#222222', 's_header_tpbrdr' => '#111111', 's_header_drpdwn_bg' => '#222222', 's_header_drpdwn_lnk' => '#ffffff', 's_header_drpdwn_lnkhvr' => '#d0b369', 's_header_ldbr' => '#d0b369', 'f_header_mn' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_header_mnggl_on' => '1', 'f_header_mnggl' => array('face' => 'Raleway', 'size' => '14px', 'style' => 'normal', 'weight' => '500'), 'f_header_drpdwn' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_header_drpdwnggl_on' => '1', 'f_header_drpdwnggl' => array('face' => 'Raleway', 'size' => '13px', 'style' => 'normal', 'weight' => '300'), 'breadcrumbs_active' => '0', 'breadcrumbs_height' => '60', 'breadcrumbs_tagline' => '', 's_breadcrumbs_bg' => '#ffffff', 's_breadcrumbs_txt' => '#222222', 's_breadcrumbs_lnk' => '#222222', 's_breadcrumbs_lnkhvr' => '#c74c44', 's_breadcrumbs_brdr' => '#cccccc', 'f_breadcrumbs' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_breadcrumbs_ggl_on' => '0', 'f_breadcrumbs_ggl' => array('face' => 'PT Serif', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'snpshpwp_hide_page_title' => '0', 'enable_comments' => '0', 's_post_bg' => '#ffffff', 's_post_txt' => '#808080', 's_post_hdr' => '#222222', 's_post_lnk' => '#d0b369', 's_post_lnkhvr' => '#d1ab4d', 's_post_brdr' => '#cccccc', 's_post_bttn' => '#222222', 's_post_bttnhvr' => '#d0b369', 's_post_bttnlnk' => '#ffffff', 's_post_bttnlnkhvr' => '#ffffff', 'f_post_mn' => array('face' => 'Lovelo', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_post_mnggl_on' => '1', 'f_post_mnggl' => array('face' => 'Open Sans', 'size' => '14px', 'style' => 'normal', 'weight' => '400'), 'f_post_hdr' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_post_hdrggl_on' => '1', 'f_post_hdrggl' => array('face' => 'Raleway', 'size' => '16px', 'style' => 'normal', 'weight' => '300'), 'f_post_crsv' => array('face' => 'Lovelo', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_post_crsvggl_on' => '1', 'f_post_crsvggl' => array('face' => 'Open Sans', 'size' => '14px', 'style' => 'italic', 'weight' => '400'), 'sidebar-size' => '5', 'sidebar-blog' => '1', 'sidebar-blog-position' => '0', 'sidebar-single' => '1', 'sidebar-single-position' => '1', 'sidebar-page' => '1', 'sidebar-page-position' => '0', 'sidebar' => array(1 => array('order' => '1', 'title' => 'Header Left Sidenav'), 2 => array('order' => '2', 'title' => 'Header Right Sidenav'), 3 => array('order' => '3', 'title' => 'Bottom 1'), 4 => array('order' => '4', 'title' => 'Bottom 2'), 5 => array('order' => '5', 'title' => 'Bottom 3'), 6 => array('order' => '6', 'title' => 'Bottom 4'), 7 => array('order' => '7', 'title' => 'Blog Archive - Custom')), 'footer_area' => '0', 'footer_widgets' => '0', 'footer_sidebar' => '3', 'footer_width' => '1301', 's_footer_tpbrdr' => '#222222', 's_footer_bg' => '#222222', 's_footer_txt' => '#808080', 's_footer_hdr' => '#ffffff', 's_footer_lnk' => '#d0b369', 's_footer_lnkhvr' => '#ffffff', 'f_footer_wt' => array('face' => 'Lovelo', 'size' => '15px', 'style' => 'normal', 'weight' => '400'), 'f_footer_wtggl_on' => '0', 'f_footer_wtggl' => array('face' => 'PT Serif', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_footer_wtxt' => array('face' => 'Lovelo', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'f_footer_wtxtggl_on' => '1', 'f_footer_wtxtggl' => array('face' => 'Open Sans', 'size' => '14px', 'style' => 'normal', 'weight' => '400'), 'footer_bar' => '0', 'footer_height' => '40', 'footer_left' => array('disabled' => array('placebo' => 'placebo', 'login-link' => 'login-link', 'tagline' => 'tagline', 'network-icons' => 'network-icons', 'tagline-alt' => 'tagline-alt', 'to-the-top' => 'to-the-top'), 'enabled' => array('placebo' => 'placebo', 'menu' => 'menu')), 'footer_right' => array('disabled' => array('placebo' => 'placebo', 'login-link' => 'login-link', 'menu' => 'menu', 'tagline' => 'tagline', 'tagline-alt' => 'tagline-alt', 'network-icons' => 'network-icons'), 'enabled' => array('placebo' => 'placebo', 'to-the-top' => 'to-the-top')), 'footer_menu' => 'header-1', 'footer_networks' => '1', 'footer_tagline' => 'SnapShopWP 2014', 'footer_tagline_alt' => 'WordPress', 'footer_up_text' => '', 's_footer_lmnt_bg' => '#d0b369', 's_footer_lmnt_txt' => '#222222', 's_footer_lmnt_lnk' => '#222222', 's_footer_lmnt_lnkhvr' => '#ffffff', 's_footer_lmnt_brdr' => '#222222', 'f_footer_fbr' => array('face' => 'Lovelo', 'size' => '16px', 'style' => 'normal', 'weight' => '400'), 'f_footer_fbrggl_on' => '1', 'f_footer_fbrggl' => array('face' => 'Open Sans', 'size' => '12px', 'style' => 'normal', 'weight' => '400'), 'woo-columns' => '3', 'woo-columns-rel' => '4', 'woo_per_page' => '12', 'woo_rel_per_page' => '4', 'sidebar-woo' => '1', 'sidebar-woo-position' => '1', 'sidebar-woo-single' => '0', 'sidebar-woo-single-position' => '0', 'sidebar-woo-size' => '4', 'shop-widgets-before' => 'none', 'shop-widgets-after' => 'none', 'product-widgets-before' => 'none', 'product-widgets-after' => 'none', 'site_layout' => 'contained', 'responsive' => '1', 'loader_background' => 'http://www.shindiristudio.com/snapshop/shop-classic/wp-content/uploads/2014/07/logo-clean.png', 'tracking-code' => '', 'content_width' => '1400', 'fb_hres_c' => '36', 'fb_bmargin' => '36', 'fb_hres_w' => '1200', 'fb_mres_c' => '18', 'custom-css-high' => '', 'fb_mres_w' => '1024', 'fb_lres_c' => '6', 'fb_mres_s' => '1', 'custom-css-med' => '', 'fb_lres_w' => '768', 'fb_lres_s' => '1', 'custom-css-low' => '.snpshpwp_element_woo-cart {display:none;}', 'fimage_width' => '960', 'fimage_height' => '400', 'fimage_override' => '0', 'single_fimage_width' => '1200', 'single_fimage_height' => '400', 'single_fimage_override' => '1', 'twitter_ck' => 'WTpkUO8EKqFf7LIufyxymw', 'twitter_cs' => 'FTTyvUgl576OSiA86aFL4s3Mo3Ym7XmRoccOsN4xqU', 'twitter_at' => '966576138-B4gBnApgj9Khbt7931uowPw6KVHfBb4fB1Njp5SC', 'twitter_ats' => 'gBqkVVG6cW2qC9sInSVKYBD0N0IpXgmauPsifhSg8wg4J', 'mailchimp' => '0', 'mailchimp_override' => '', 'language' => array(1 => array('order' => '1', 'flag' => 'uk.png', 'language' => 'English', 'langurl' => '#'), 2 => array('order' => '2', 'flag' => 'france.png', 'language' => 'French', 'langurl' => '#'), 3 => array('order' => '3', 'flag' => 'germany.png', 'language' => 'German', 'langurl' => '#')), 'custom-css' => '', 'custom-css-snpshp_limit_width' => '1301'), 'home' => '631', 'widgets' => array('sidebars_widgets' => array('sidebar-1' => array(0 => 'text-3', 1 => 'search-2', 2 => 'recent-posts-2', 3 => 'recent-comments-2', 4 => 'archives-2', 5 => 'meta-2'), 'wp_inactive_widgets' => array(), 'sidebar-blog' => array(0 => 'snpshpwp_category-3', 1 => 'recent-posts-5'), 'sidebar-single' => array(0 => 'snpshpwp_category-6', 1 => 'categories-4', 2 => 'tag_cloud-3'), 'sidebar-page' => array(0 => 'text-4', 1 => 'text-5', 2 => 'snpshpwp_category-5', 3 => 'woocommerce_products-6', 4 => 'snpshpwp_twitter-2'), 'footer-1' => array(0 => 'text-2'), 'footer-2' => array(0 => 'text-9', 1 => 'woocommerce_product_search-2'), 'footer-3' => array(0 => 'text-7', 1 => 'socialbro-3'), 'footer-4' => array(), 'footer-5' => array(), 'sidebar-woo' => array(0 => 'woocommerce_product_categories-2'), 'sidebar-woo-single' => array(0 => 'woocommerce_product_categories-3'), 'header-left-sidenav' => array(0 => 'snpshpwp_category-4', 1 => 'nav_menu-2', 2 => 'recent-posts-3'), 'header-right-sidenav' => array(0 => 'nav_menu-3', 1 => 'nav_menu-4', 2 => 'socialbro-2'), 'bottom-1' => array(0 => 'woocommerce_top_rated_products-2'), 'bottom-2' => array(0 => 'woocommerce_recent_reviews-2'), 'bottom-3' => array(0 => 'woocommerce_products-5'), 'bottom-4' => array(0 => 'woocommerce_product_categories-4'), 'blog-archive-custom' => array(0 => 'snpshpwp_category-7', 1 => 'tag_cloud-4', 2 => 'text-6'), 'array_version' => 3), 'widget_categories' => array(4 => array('title' => '', 'count' => 1, 'hierarchical' => 0, 'dropdown' => 0), '_multiwidget' => 1), 'widget_text' => array(2 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/snapshop/shop-classic/wp-content/uploads/sites/8/2014/08/logo-classic-footer1.png"></img> <br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), 3 => array('title' => 'OUR LINKS', 'text' => '<a href="#">Envato.com</h3></a><BR> <a href="#">Themeforest.net</a><BR> <a href="#">Codecanyon.net</a><BR> <a href="#">Videohive.net</a><BR> <a href="#">Shindiristudio.com</a><BR>', 'filter' => false), 4 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/envato/logo-footer.png"></img> <br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean erat lacus, vulputate sit amet lacinia vestibulum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), 5 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/sidebar-ad.jpg"></img><br><img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/ad21.jpg"></img><br><img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/ad13.jpg"></img>', 'filter' => false), 6 => array('title' => '', 'text' => '<img src="http://www.shindiristudio.com/snapshop/wp-content/uploads/2014/07/sidebar-ad.jpg">', 'filter' => false), 7 => array('title' => 'GET IN TOUCH', 'text' => 'Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), 9 => array('title' => 'Search Products', 'text' => 'Aenean erat lacus, vulputate sit amet lacinia vestibulum, ornare a augue.', 'filter' => false), '_multiwidget' => 1), 'widget_rss' => array(1 => array(), '_multiwidget' => 1), 'widget_search' => array(2 => array('title' => ''), '_multiwidget' => 1), 'widget_recent-posts' => array(2 => array('title' => '', 'number' => 5), 3 => array('title' => '', 'number' => 5, 'show_date' => false), 5 => array('title' => '', 'number' => 5, 'show_date' => false), '_multiwidget' => 1), 'widget_recent-comments' => array(2 => array('title' => '', 'number' => 5), '_multiwidget' => 1), 'widget_archives' => array(2 => array('title' => '', 'count' => 0, 'dropdown' => 0), '_multiwidget' => 1), 'widget_meta' => array(2 => array('title' => ''), '_multiwidget' => 1), 'widget_nav_menu' => array(2 => array('title' => '', 'nav_menu' => 13), 3 => array('title' => 'THIS IS SNAPSHOP', 'nav_menu' => 32), 4 => array('title' => 'CLOSE AND PERSONAL', 'nav_menu' => 33), '_multiwidget' => 1), 'widget_pages' => array(1 => array(), '_multiwidget' => 1), 'widget_snpshpwp_twitter' => array(1 => array(), 2 => array('title' => 'LATEST FROM TWITTER', 'user' => '', 'count' => '1'), '_multiwidget' => 1), 'widget_snpshpwp_category' => array(3 => array('title' => 'Fresh', 'order' => 'date', 'category' => '-1', 'number' => '5'), 4 => array('title' => 'Fresh', 'order' => 'date', 'category' => '-1', 'number' => '3'), 5 => array('title' => 'LATEST BLOG POSTS', 'order' => 'date', 'category' => '-1', 'number' => '3'), 6 => array('title' => 'LATEST POSTS', 'order' => 'date', 'category' => '-1', 'number' => '5'), 7 => array('title' => 'LATEST POSTS', 'order' => 'date', 'category' => '-1', 'number' => '5'), '_multiwidget' => 1), 'widget_woocommerce_products' => array(5 => array('title' => '', 'number' => '4', 'show' => '', 'orderby' => 'date', 'order' => 'desc', 'hide_free' => 0, 'show_hidden' => 0), 6 => array('title' => 'FEATURED PRODUCTS', 'number' => '3', 'show' => '', 'orderby' => 'date', 'order' => 'desc', 'hide_free' => 0, 'show_hidden' => 0), '_multiwidget' => 1), 'widget_woocommerce_product_categories' => array(2 => array('title' => 'Product Categories', 'orderby' => 'order', 'dropdown' => 0, 'count' => '1', 'hierarchical' => '1', 'show_children_only' => 0), 3 => array('title' => 'Product Categories', 'orderby' => 'name', 'dropdown' => 0, 'count' => '1', 'hierarchical' => '1', 'show_children_only' => 0), 4 => array('title' => '', 'orderby' => 'order', 'dropdown' => 0, 'count' => '1', 'hierarchical' => 0, 'show_children_only' => 0), '_multiwidget' => 1), 'widget_woocommerce_product_search' => array(2 => array('title' => ''), '_multiwidget' => 1), 'widget_tag_cloud' => array(3 => array('title' => '', 'taxonomy' => 'post_tag'), 4 => array('title' => 'POPULAR TAGS', 'taxonomy' => 'post_tag'), '_multiwidget' => 1), 'widget_woocommerce_price_filter' => array('_multiwidget' => 1), 'widget_woocommerce_recently_viewed_products' => array('_multiwidget' => 1, 1 => array()), 'widget_woocommerce_product_tag_cloud' => array(1 => array(), '_multiwidget' => 1), 'widget_socialbro' => array(2 => array('title' => 'CONNECT WITH SNAPSHOP', 'opacity' => '50', 'hover_opacity' => '100', 'icons' => 'http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0067_Vector-Smart-Object.png::#::Like Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0066_Vector-Smart-Object.png::#::Follow Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0064_Vector-Smart-Object.png::#::Plus Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0069_Vector-Smart-Object.png::#::Rate Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0063_Vector-Smart-Object.png::#::Pin Us||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0055_Vector-Smart-Object.png::#::Digg Us'), 3 => array('title' => '', 'opacity' => '100', 'hover_opacity' => '70', 'icons' => 'http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0067_Vector-Smart-Object.png::#::Facebook||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0064_Vector-Smart-Object.png::#::Google +||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0066_Vector-Smart-Object.png::#::Twitter||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0063_Vector-Smart-Object.png::#::Pinteresr||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0055_Vector-Smart-Object.png::#::DiggIt||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0059_Vector-Smart-Object.png::#::Flickr||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0069_Vector-Smart-Object.png::#::Envato||http://www.shindiristudio.com/snapshop/wp-content/themes/snapshopWP/widgets/socialbro/images/Style1/Style1_0015_Vector-Smart-Object.png::#::RSS'), '_multiwidget' => 1), 'widget_calendar' => array(1 => array(), '_multiwidget' => 1), 'widget_rev-slider-widget' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_widget_cart' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_layered_nav' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_layered_nav_filters' => array(1 => array(), '_multiwidget' => 1), 'widget_woocommerce_recent_reviews' => array(1 => array(), 2 => array('title' => '', 'number' => '4'), '_multiwidget' => 1), 'widget_woocommerce_top_rated_products' => array(1 => array(), 2 => array('title' => '', 'number' => '4'), '_multiwidget' => 1))));
        if ($curr_images == 'yes') {
            if (isset($snpshpwp_options['snapshop']['images'])) {
                foreach ($snpshpwp_options['snapshop']['images'] as $k => $v) {
                    media_sideload_image($v, $k);
                }
            }
        }
        if ($curr_theme == 'yes') {
            $curr_snpshpwp_options = $snpshpwp_options[$curr_style]['options'];
            foreach ($curr_snpshpwp_options as $k => $v) {
                set_theme_mod($k, $v);
            }
            $curr_snpshpwp_widgets = $snpshpwp_options[$curr_style]['widgets'];
            foreach ($curr_snpshpwp_widgets as $k => $v) {
                update_option($k, $v);
            }
            if (SNPSHPWP_FBUILDER === true) {
                global $fbuilder;
                $options = array('bottom_margin' => $snpshpwp_options[$curr_style]['options']['fb_bmargin'], 'high_rezolution_width' => $snpshpwp_options[$curr_style]['options']['fb_hres_w'], 'high_rezolution_margin' => $snpshpwp_options[$curr_style]['options']['fb_hres_c'], 'med_rezolution_width' => $snpshpwp_options[$curr_style]['options']['fb_mres_w'], 'med_rezolution_margin' => $snpshpwp_options[$curr_style]['options']['fb_mres_c'], 'med_rezolution_hide_sidebar' => $snpshpwp_options[$curr_style]['options']['fb_mres_s'] == 1 ? 'true' : 'false', 'low_rezolution_width' => $snpshpwp_options[$curr_style]['options']['fb_lres_w'], 'low_rezolution_margin' => $snpshpwp_options[$curr_style]['options']['fb_lres_c'], 'low_rezolution_hide_sidebar' => $snpshpwp_options[$curr_style]['options']['fb_lres_s'] == 1 ? 'true' : 'false');
                $fbuilder->set_options($options);
            }
        }
        if ($curr_pages == 'yes') {
            include_once dirname(__FILE__) . '/../demo/snapshop.inc';
            update_option('show_on_front', 'page');
            update_option('page_on_front', $snpshpwp_options[$curr_style]['home']);
            update_option('permalink_structure', '/%postname%/');
            global $wp_rewrite;
            $wp_rewrite->set_permalink_structure('/%postname%/');
        }
        /*		set_transient('SnapShopWP_Demo_Installation', 'installed');*/
        die('1');
    }
    die;
}
Ejemplo n.º 9
0
function ajax_save_style()
{
    if (!is_user_logged_in()) {
        die('You do not have sufficient permissions to do this action.');
    } else {
        if (!current_user_can('manage_options')) {
            wp_die(__('You do not have sufficient permissions to do this action.', 'wpdance'));
        } else {
            //TODO : check nonce & do font save
            if (empty($_POST) || !wp_verify_nonce($_POST['ajax_preview'], 'ajax_save_style')) {
                wp_die(__('Something goes wrong!Please login again', 'wpdance'));
            } else {
                // process form data
                $_default_font_arr = array("arial", "verdana", "trebuchet", "georgia", "times new roman", "tahoma", "palatino", "helvetica");
                global $wd_data;
                if (isset($_POST['@font_body']) && strlen(trim($_POST['@font_body'])) > 0) {
                    if (in_array(trim($_POST['@font_body']), $_default_font_arr)) {
                        $wd_data['wd_body_font1_googlefont_enable'] = 1;
                        $wd_data['wd_body_font1_family'] = wp_kses_data($_POST['@font_body']);
                    } else {
                        $wd_data['wd_body_font1_googlefont_enable'] = 0;
                        $wd_data['wd_body_font1_googlefont'] = wp_kses_data($_POST['@font_body']);
                    }
                }
                if (isset($_POST['@font_verticalmenu']) && strlen(trim($_POST['@font_verticalmenu'])) > 0) {
                    if (in_array(trim($_POST['@font_verticalmenu']), $_default_font_arr)) {
                        $wd_data['wd_vertical_menu_font_enable'] = 1;
                        $wd_data['wd_vertical_menu_family_font'] = wp_kses_data($_POST['@font_verticalmenu']);
                    } else {
                        $wd_data['wd_vertical_menu_font_enable'] = 0;
                        $wd_data['wd_vertical_menu_googlefont'] = wp_kses_data($_POST['@font_verticalmenu']);
                    }
                }
                if (isset($_POST['@font_heading']) && strlen(trim($_POST['@font_heading'])) > 0) {
                    if (in_array(trim($_POST['@font_heading']), $_default_font_arr)) {
                        $wd_data['wd_heading_font_googlefont_enable'] = 1;
                        $wd_data['wd_heading_fontfamily'] = wp_kses_data($_POST['@font_heading']);
                    } else {
                        $wd_data['wd_heading_font_googlefont_enable'] = 0;
                        $wd_data['wd_heading_font_googlefont'] = wp_kses_data($_POST['@font_heading']);
                    }
                }
                if (isset($_POST['@font_horizontalmenu']) && strlen(trim($_POST['@font_horizontalmenu'])) > 0) {
                    if (in_array(trim($_POST['@font_horizontalmenu']), $_default_font_arr)) {
                        $wd_data['wd_horizontal_menu_font_googlefont_enable'] = 1;
                        $wd_data['wd_menu_fontfamily'] = wp_kses_data($_POST['@font_horizontalmenu']);
                    } else {
                        $wd_data['wd_horizontal_menu_font_googlefont_enable'] = 0;
                        $wd_data['wd_menu_font_googlefont'] = wp_kses_data($_POST['@font_horizontalmenu']);
                    }
                }
                $wd_data['wd_layout_styles'] = strlen($_POST['wd_layout_styles']) > 0 ? wp_kses_data($_POST['wd_layout_styles']) : $wd_data['wd_layout_styles'];
                foreach ($_POST as $_key => $_value) {
                    if (strpos($_key, '@') == 0 && strpos($_key, '@') !== false) {
                        $_old_key = 'wd_' . substr($_key, 1, strlen($_key) - 1);
                        if (array_key_exists($_old_key, $wd_data)) {
                            $wd_data[$_old_key] = strlen($_POST[$_key]) > 0 ? wp_kses_data($_POST[$_key]) : $wd_data[$_old_key];
                        }
                    }
                }
                of_save_options($wd_data);
                wp_die("1");
            }
        }
    }
}
Ejemplo n.º 10
0
function cupid_setup_options()
{
    // reset Theme options
    global $of_options, $options_machine;
    $smof_data = of_get_options();
    if (!isset($smof_data) || !array_key_exists('smof_init', $smof_data) || empty($smof_data['smof_init'])) {
        $options_machine = new Options_Machine($of_options);
        of_save_options($options_machine->Defaults);
    }
    // generate less to css
    require get_template_directory() . '/lib/inc-generate-less/generate-less.php';
    cupid_generate_less();
}
Ejemplo n.º 11
0
 public function migrate_theme_options()
 {
     // Getting Options
     global $smof_data, $of_options;
     if (!isset($of_options) or empty($of_options)) {
         // Forcing options to be loaded even before the main init
         remove_action('init', 'of_options');
         of_options();
     }
     $options_changed = FALSE;
     foreach ($this->translators as $version => $translator) {
         if (method_exists($translator, 'translate_theme_options')) {
             $options_changed = ($translator->translate_theme_options($smof_data) or $options_changed);
         }
     }
     if ($options_changed) {
         // Filling the missed options with default values
         $options_machine = new Options_Machine($of_options);
         $smof_data = array_merge($options_machine->Defaults, $smof_data);
         $smof_data['generate_css_file'] = FALSE;
         // Saving the changed options
         of_save_options($smof_data);
         //update_option( OPTIONS, $smof_data );
         us_save_styles($smof_data);
     }
 }
Ejemplo n.º 12
0
    /**
     * Process options data and build option fields
     *
     * @uses get_theme_mod()
     *
     * @access public
     * @since 1.0.0
     *
     * @return array
     */
    public static function optionsframework_machine($options)
    {
        global $smof_output, $smof_details, $smof_data;
        if (empty($options)) {
            return;
        }
        if (empty($smof_data)) {
            $smof_data = of_get_options();
        }
        $data = $smof_data;
        $defaults = array();
        $counter = 0;
        $menu = '';
        $output = '';
        $update_data = false;
        do_action('optionsframework_machine_before', array('options' => $options, 'smof_data' => $smof_data));
        if ($smof_output != "") {
            $output .= $smof_output;
            $smof_output = "";
        }
        foreach ($options as $value) {
            // sanitize option
            if ($value['type'] != "heading" && $value['type'] != "toggle_start" && $value['type'] != "toggle_end" && $value['type'] != "customizer_tab" && $value['type'] != "customizer_start" && $value['type'] != "customizer_end") {
                $value = self::sanitize_option($value);
            }
            $counter++;
            $val = '';
            //create array of defaults
            if ($value['type'] == 'multicheck') {
                if (is_array($value['std'])) {
                    foreach ($value['std'] as $i => $key) {
                        $defaults[$value['id']][$key] = true;
                    }
                } else {
                    $defaults[$value['id']][$value['std']] = true;
                }
            } else {
                if (isset($value['id'])) {
                    $defaults[$value['id']] = $value['std'];
                }
            }
            /* condition start */
            if (!empty($smof_data) || !empty($data)) {
                if (array_key_exists('id', $value) && !isset($smof_data[$value['id']])) {
                    $smof_data[$value['id']] = $value['std'];
                    if ($value['type'] == "checkbox" && $value['std'] == 0) {
                        $smof_data[$value['id']] = 0;
                    } else {
                        $update_data = true;
                    }
                }
                if (array_key_exists('id', $value) && !isset($smof_details[$value['id']])) {
                    $smof_details[$value['id']] = $smof_data[$value['id']];
                }
                //Start Heading
                if ($value['type'] != "heading" && $value['type'] != "customizer_tab" && $value['type'] != "toggle_start" && $value['type'] != "toggle_end" && $value['type'] != "customizer_start" && $value['type'] != "customizer_end") {
                    $class = '';
                    if (isset($value['class'])) {
                        $class = $value['class'];
                    }
                    //hide items in checkbox group
                    $fold = '';
                    if (array_key_exists("fold", $value) && !array_key_exists("folded", $value)) {
                        if (isset($smof_data[$value['fold']]) && $smof_data[$value['fold']]) {
                            $fold = "f_" . $value['fold'] . " ";
                        } else {
                            $fold = "f_" . $value['fold'] . " temphide ";
                        }
                    }
                    $folded = '';
                    if (array_key_exists("folded", $value)) {
                        $fold_class = "folded-" . $value['fold'] . " folded-" . $value['fold'] . "-" . $value['folded'] . " ";
                        $fold .= $fold_class;
                        if ($value['folded'] == "not_empty") {
                            if (array_key_exists($value['fold'], $smof_data)) {
                                if (!$smof_data[$value['fold']]) {
                                    $fold .= "temphide ";
                                }
                            }
                        } elseif ($value['folded'] != $smof_data[$value['fold']]) {
                            $fold .= "temphide ";
                        }
                    }
                    $output .= '<div id="section-' . $value['id'] . '" class="' . $fold . 'section section-' . $value['type'] . ' ' . $class . '">' . "\n";
                    //only show header if 'name' value exists
                    if ($value['name']) {
                        $output .= '<h3 class="heading">' . $value['name'] . '</h3>' . "\n";
                    }
                    if ($value['type'] != 'theme_preview') {
                        $output .= '<div class="option">' . "\n" . '<div class="controls">' . "\n";
                    } else {
                        $output .= '<div class="option">' . "\n" . '<div class="controls-full">' . "\n";
                    }
                }
                //End Heading
                //if (!isset($smof_data[$value['id']]) && $value['type'] != "heading")
                //	continue;
                //switch statement to handle various options type
                switch ($value['type']) {
                    //text input
                    case 'text':
                        $t_value = '';
                        $t_value = stripslashes($smof_data[$value['id']]);
                        $mini = '';
                        if (!isset($value['mod'])) {
                            $value['mod'] = '';
                        }
                        if ($value['mod'] == 'mini') {
                            $mini = 'mini';
                        }
                        $output .= '<input class="of-input ' . $mini . ' input-text" name="' . $value['id'] . '" id="' . $value['id'] . '" type="' . $value['type'] . '" value="' . $t_value . '" />';
                        break;
                        //select option
                    //select option
                    case 'select':
                        $mini = '';
                        if (!isset($value['mod'])) {
                            $value['mod'] = '';
                        }
                        if ($value['mod'] == 'mini') {
                            $mini = 'mini';
                        }
                        $fold = '';
                        if (array_key_exists("folds", $value)) {
                            $fold = "fld ";
                        }
                        $extra_class = '';
                        if (array_key_exists("class", $value)) {
                            $extra_class = 'select-' . $value['class'];
                        }
                        $output .= '<select class="' . $fold . ' ' . $extra_class . ' select of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" data-dependency="' . $value['dep'] . '">';
                        foreach ($value['options'] as $select_ID => $option) {
                            $theValue = $option;
                            if (!is_numeric($select_ID)) {
                                $theValue = $select_ID;
                            }
                            $output .= '<option id="' . $select_ID . '" value="' . $theValue . '" ' . selected($smof_data[$value['id']], $theValue, false) . ' />' . $option . '</option>';
                        }
                        $output .= '</select>';
                        break;
                        //textarea option
                    //textarea option
                    case 'textarea':
                        $cols = '8';
                        $ta_value = '';
                        $rows = '';
                        if (isset($value['rows'])) {
                            $rows = $value['rows'];
                        }
                        if (isset($value['options'])) {
                            $ta_options = $value['options'];
                            if (isset($ta_options['cols'])) {
                                $cols = $ta_options['cols'];
                            }
                        }
                        $ta_value = stripslashes($smof_data[$value['id']]);
                        $output .= '<textarea class="of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" cols="' . $cols . '" rows="' . $rows . '">' . $ta_value . '</textarea>';
                        break;
                    case 'text_separator':
                        break;
                        //radiobox option
                    //radiobox option
                    case "radio":
                        $checked = isset($smof_data[$value['id']]) ? checked($smof_data[$value['id']], $option, false) : '';
                        foreach ($value['options'] as $option => $name) {
                            $output .= '<input class="of-input of-radio" name="' . $value['id'] . '" type="radio" value="' . $option . '" ' . checked($smof_data[$value['id']], $option, false) . ' /><label class="radio">' . $name . '</label><br/>';
                        }
                        break;
                        //checkbox option
                    //checkbox option
                    case 'checkbox':
                        if (!isset($smof_data[$value['id']])) {
                            $smof_data[$value['id']] = 0;
                        }
                        $fold = '';
                        if (array_key_exists("folds", $value)) {
                            $fold = "fld ";
                        }
                        $output .= '<input type="hidden" class="' . $fold . 'checkbox of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" value="0"/>';
                        $output .= '<input type="checkbox" class="' . $fold . 'checkbox of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" value="1" ' . checked($smof_data[$value['id']], 1, false) . ' />';
                        break;
                        //multiple checkbox option
                    //multiple checkbox option
                    case 'multicheck':
                        isset($smof_data[$value['id']]) ? $multi_stored = $smof_data[$value['id']] : ($multi_stored = "");
                        foreach ($value['options'] as $key => $option) {
                            if (!isset($multi_stored[$key])) {
                                $multi_stored[$key] = '';
                            }
                            $of_key_string = $value['id'] . '_' . $key;
                            $output .= '<input type="checkbox" class="checkbox of-input" name="' . $value['id'] . '[' . $key . ']' . '" id="' . $of_key_string . '" value="1" ' . checked($multi_stored[$key], 1, false) . ' /><label class="multicheck" for="' . $of_key_string . '">' . $option . '</label><br />';
                        }
                        break;
                        // Color picker
                    // Color picker
                    case "color":
                        $default_color = '';
                        if (isset($value['std'])) {
                            $default_color = ' data-default-color="' . $value['std'] . '" ';
                        }
                        $output .= '<input name="' . $value['id'] . '" id="' . $value['id'] . '" class="of-color" data-dependency="' . $value['dep'] . '" type="text" value="' . $smof_data[$value['id']] . '"' . $default_color . ' />';
                        break;
                        // Background color picker
                    // Background color picker
                    case "background-color":
                        $default_color = '';
                        if (isset($value['std'])) {
                            $default_color = ' data-default-color="' . $value['std'] . '" ';
                        }
                        $output .= '<input name="' . $value['id'] . '" id="' . $value['id'] . '" class="of-bg-color" data-dependency="' . $value['dep'] . '" type="text" value="' . $smof_data[$value['id']] . '"' . $default_color . ' />';
                        break;
                        // Background color picker
                    // Background color picker
                    case "border-color":
                        $default_color = '';
                        if (isset($value['std'])) {
                            $default_color = ' data-default-color="' . $value['std'] . '" ';
                        }
                        $output .= '<input name="' . $value['id'] . '" id="' . $value['id'] . '" class="of-border-color" data-dependency="' . $value['dep'] . '" type="text" value="' . $smof_data[$value['id']] . '"' . $default_color . ' />';
                        break;
                        //typography option
                    //typography option
                    case 'typography':
                        $typography_stored = isset($smof_data[$value['id']]) ? $smof_data[$value['id']] : $value['std'];
                        /* Font Size */
                        if (isset($typography_stored['size'])) {
                            $output .= '<select class="of-typography of-typography-size select" name="' . $value['id'] . '[size]" id="' . $value['id'] . '_size">';
                            for ($i = 9; $i < 20; $i++) {
                                $test = $i . 'px';
                                $output .= '<option value="' . $i . 'px" ' . selected($typography_stored['size'], $test, false) . '>' . $i . 'px</option>';
                            }
                            $output .= '</select>';
                        }
                        /* Line Height */
                        if (isset($typography_stored['height'])) {
                            $output .= '<div class="select_wrapper typography-height" original-title="Line height">';
                            $output .= '<select class="of-typography of-typography-height select" name="' . $value['id'] . '[height]" id="' . $value['id'] . '_height">';
                            for ($i = 20; $i < 38; $i++) {
                                $test = $i . 'px';
                                $output .= '<option value="' . $i . 'px" ' . selected($typography_stored['height'], $test, false) . '>' . $i . 'px</option>';
                            }
                            $output .= '</select></div>';
                        }
                        /* Font Face */
                        if (isset($typography_stored['face'])) {
                            $output .= '<div class="select_wrapper typography-face" original-title="Font family">';
                            $output .= '<select class="of-typography of-typography-face select" name="' . $value['id'] . '[face]" id="' . $value['id'] . '_face">';
                            $faces = array('arial' => 'Arial', 'verdana' => 'Verdana, Geneva', 'trebuchet' => 'Trebuchet', 'georgia' => 'Georgia', 'times' => 'Times New Roman', 'tahoma' => 'Tahoma, Geneva', 'palatino' => 'Palatino', 'helvetica' => 'Helvetica');
                            foreach ($faces as $i => $face) {
                                $output .= '<option value="' . $i . '" ' . selected($typography_stored['face'], $i, false) . '>' . $face . '</option>';
                            }
                            $output .= '</select></div>';
                        }
                        /* Font Weight */
                        if (isset($typography_stored['style'])) {
                            $output .= '<div class="select_wrapper typography-style" original-title="Font style">';
                            $output .= '<select class="of-typography of-typography-style select" name="' . $value['id'] . '[style]" id="' . $value['id'] . '_style">';
                            $styles = array('normal' => 'Normal', 'italic' => 'Italic', 'bold' => 'Bold', 'bold italic' => 'Bold Italic');
                            foreach ($styles as $i => $style) {
                                $output .= '<option value="' . $i . '" ' . selected($typography_stored['style'], $i, false) . '>' . $style . '</option>';
                            }
                            $output .= '</select></div>';
                        }
                        /* Font Color */
                        if (isset($typography_stored['color'])) {
                            $output .= '<div id="' . $value['id'] . '_color_picker" class="colorSelector typography-color"><div style="background-color: ' . $typography_stored['color'] . '"></div></div>';
                            $output .= '<input class="of-color of-typography of-typography-color" original-title="Font color" name="' . $value['id'] . '[color]" id="' . $value['id'] . '_color" type="text" value="' . $typography_stored['color'] . '" />';
                        }
                        break;
                        //border option
                    //border option
                    case 'border':
                        /* Border Width */
                        $border_stored = $smof_data[$value['id']];
                        $output .= '<div class="select_wrapper border-width">';
                        $output .= '<select class="of-border of-border-width select" name="' . $value['id'] . '[width]" id="' . $value['id'] . '_width">';
                        for ($i = 0; $i < 21; $i++) {
                            $output .= '<option value="' . $i . '" ' . selected($border_stored['width'], $i, false) . '>' . $i . '</option>';
                        }
                        $output .= '</select></div>';
                        /* Border Style */
                        $output .= '<div class="select_wrapper border-style">';
                        $output .= '<select class="of-border of-border-style select" name="' . $value['id'] . '[style]" id="' . $value['id'] . '_style">';
                        $styles = array('none' => 'None', 'solid' => 'Solid', 'dashed' => 'Dashed', 'dotted' => 'Dotted');
                        foreach ($styles as $i => $style) {
                            $output .= '<option value="' . $i . '" ' . selected($border_stored['style'], $i, false) . '>' . $style . '</option>';
                        }
                        $output .= '</select></div>';
                        /* Border Color */
                        $output .= '<div id="' . $value['id'] . '_color_picker" class="colorSelector"><div style="background-color: ' . $border_stored['color'] . '"></div></div>';
                        $output .= '<input class="of-color of-border of-border-color" name="' . $value['id'] . '[color]" id="' . $value['id'] . '_color" type="text" value="' . $border_stored['color'] . '" />';
                        break;
                        //images checkbox - use image as checkboxes
                    //images checkbox - use image as checkboxes
                    case 'images':
                        $i = 0;
                        $fold = '';
                        if (array_key_exists("folds", $value)) {
                            $fold = "fld ";
                        }
                        $select_value = isset($smof_data[$value['id']]) ? $smof_data[$value['id']] : '';
                        foreach ($value['options'] as $key => $option) {
                            $i++;
                            $checked = '';
                            $selected = '';
                            if (NULL != checked($select_value, $key, false)) {
                                $checked = checked($select_value, $key, false);
                                $selected = 'of-radio-img-selected';
                            }
                            $output .= '<span>';
                            $output .= '<input type="radio" id="of-radio-img-' . $value['id'] . $i . '" class="' . $fold . ' checkbox of-radio-img-radio" value="' . $key . '" name="' . $value['id'] . '" ' . $checked . ' />';
                            $output .= '<div class="of-radio-img-label">' . $key . '</div>';
                            $output .= '<img title="' . $key . '" src="' . $option . '" alt="" class="of-radio-img-img ' . $selected . '" onClick="document.getElementById(\'of-radio-img-' . $value['id'] . $i . '\').checked = true;" />';
                            $output .= '</span>';
                        }
                        break;
                    case 'color-blocks':
                        $i = 0;
                        $select_value = isset($smof_data[$value['id']]) ? $smof_data[$value['id']] : '';
                        foreach ($value['options'] as $key => $option) {
                            $i++;
                            $checked = '';
                            $selected = '';
                            if (NULL != checked($select_value, $key, false)) {
                                $checked = checked($select_value, $key, false);
                                $selected = 'color-block-selected';
                            }
                            $output .= '<span class="color-block-holder">';
                            $output .= '<input type="radio" id="color-block-' . $value['id'] . $i . '" class="checkbox color-block-radio" value="' . $key . '" name="' . $value['id'] . '" ' . $checked . ' />';
                            $output .= '<label for="color-block-' . $value['id'] . $i . '" class="color-block-label" style="background-color:' . $option . ';">' . $key . '</label>';
                            //$output .= '<img title="'.$key.'" src="'.$option.'" alt="" class="of-radio-img-img '. $selected .'" onClick="document.getElementById(\'of-radio-img-'. $value['id'] . $i.'\').checked = true;" />';
                            $output .= '</span>';
                        }
                        break;
                        //info (for small intro box etc)
                    //info (for small intro box etc)
                    case "info":
                        $info_text = $value['std'];
                        $output .= '<div class="of-info">' . $info_text . '</div>';
                        break;
                        //display a single image
                    //display a single image
                    case "image":
                        $src = $value['std'];
                        $output .= '<img src="' . $src . '">';
                        break;
                        //tab heading
                    //tab heading
                    case 'heading':
                        if ($counter >= 2) {
                            $output .= '</div>' . "\n";
                        }
                        $header_class = str_replace(' ', '', strtolower($value['name']));
                        $jquery_click_hook = str_replace(' ', '', strtolower($value['name']));
                        $jquery_click_hook = "of-option-" . trim(preg_replace('/ +/', '', preg_replace('/[^A-Za-z0-9 ]/', '', urldecode(html_entity_decode(strip_tags($jquery_click_hook))))));
                        $icon = $visible = '';
                        if ($header_class == 'general') {
                            $header_class .= ' current';
                            $visible = 'style="display:block;"';
                        }
                        $menu .= '<li class="' . $header_class . '"><a title="' . $value['name'] . '" href="#' . $jquery_click_hook . '"' . $icon . '><i class="fa fa-' . $value['icon'] . '"></i>' . $value['name'] . '</a></li>';
                        $output .= '<div class="group" id="' . $jquery_click_hook . '"' . $visible . '><h2>' . $value['name'] . '</h2>' . "\n";
                        break;
                        //drag & drop slide manager
                    //drag & drop slide manager
                    case 'slider':
                        $output .= '<div class="slider"><ul id="' . $value['id'] . '">';
                        $slides = $smof_data[$value['id']];
                        $count = count($slides);
                        if ($count < 1) {
                            $oldorder = 1;
                            $order = 1;
                            //$output .= Options_Machine::optionsframework_slider_function($value['id'],$value['std'],$oldorder,$order);
                        } else {
                            if ($count < 2) {
                                $oldorder = 1;
                                $order = 1;
                                $output .= Options_Machine::optionsframework_slider_function($value['id'], $value['std'], $oldorder, $order);
                            } else {
                                $i = 0;
                                foreach ($slides as $slide) {
                                    $oldorder = $slide['order'];
                                    $i++;
                                    $order = $i;
                                    $output .= Options_Machine::optionsframework_slider_function($value['id'], $value['std'], $oldorder, $order);
                                }
                            }
                        }
                        $output .= '</ul>';
                        $output .= '<a class="button slide_add_button">Add New Sidebar</a></div>';
                        break;
                    case 'socials':
                        $_id = strip_tags(strtolower($value['id']));
                        $output .= '<div class="slider"><ul id="' . $value['id'] . '">';
                        $slides = $smof_data[$value['id']];
                        $count = count($slides);
                        if ($count < 2) {
                            $oldorder = 1;
                            $order = 1;
                            $output .= Options_Machine::optionsframework_socials_function($value['id'], $value['std'], $oldorder, $order);
                        } else {
                            $i = 0;
                            foreach ($slides as $slide) {
                                $oldorder = $slide['order'];
                                $i++;
                                $order = $i;
                                $output .= Options_Machine::optionsframework_socials_function($value['id'], $value['std'], $oldorder, $order);
                            }
                        }
                        $output .= '</ul>';
                        $output .= '<a href="#" class="button socials_add_button">Add New Icon</a></div>';
                        break;
                    case 'custom_headers':
                        $_id = strip_tags(strtolower($value['id']));
                        $output .= '<div class="slider"><ul id="' . $value['id'] . '">';
                        $slides = $smof_data[$value['id']];
                        $count = count($slides);
                        if ($count < 2) {
                            $oldorder = 1;
                            $order = 1;
                            $output .= Options_Machine::optionsframework_headers_function($value['id'], $value['std'], $oldorder, $order);
                        } else {
                            $i = 0;
                            foreach ($slides as $slide) {
                                $oldorder = $slide['order'];
                                $i++;
                                $order = $i;
                                $output .= Options_Machine::optionsframework_headers_function($value['id'], $value['std'], $oldorder, $order);
                            }
                        }
                        $output .= '</ul>';
                        $output .= '<a href="#" class="button headers_add_button">Add New</a></div>';
                        break;
                        //drag & drop block manager
                    //drag & drop block manager
                    case 'sorter':
                        // Make sure to get list of all the default blocks first
                        $all_blocks = $value['std'];
                        $temp = array();
                        // holds default blocks
                        $temp2 = array();
                        // holds saved blocks
                        foreach ($all_blocks as $blocks) {
                            $temp = array_merge($temp, $blocks);
                        }
                        $sortlists = isset($data[$value['id']]) && !empty($data[$value['id']]) ? $data[$value['id']] : $value['std'];
                        foreach ($sortlists as $sortlist) {
                            $temp2 = array_merge($temp2, $sortlist);
                        }
                        // now let's compare if we have anything missing
                        foreach ($temp as $k => $v) {
                            if (!array_key_exists($k, $temp2)) {
                                $sortlists['disabled'][$k] = $v;
                            }
                        }
                        // now check if saved blocks has blocks not registered under default blocks
                        foreach ($sortlists as $key => $sortlist) {
                            foreach ($sortlist as $k => $v) {
                                if (!array_key_exists($k, $temp)) {
                                    unset($sortlist[$k]);
                                }
                            }
                            $sortlists[$key] = $sortlist;
                        }
                        // assuming all sync'ed, now get the correct naming for each block
                        foreach ($sortlists as $key => $sortlist) {
                            foreach ($sortlist as $k => $v) {
                                $sortlist[$k] = $temp[$k];
                            }
                            $sortlists[$key] = $sortlist;
                        }
                        $output .= '<div id="' . $value['id'] . '" class="sorter">';
                        if ($sortlists) {
                            foreach ($sortlists as $group => $sortlist) {
                                $output .= '<ul id="' . $value['id'] . '_' . $group . '" class="sortlist_' . $value['id'] . '">';
                                $output .= '<h3>' . $group . '</h3>';
                                foreach ($sortlist as $key => $list) {
                                    $output .= '<input class="sorter-placebo" type="hidden" name="' . $value['id'] . '[' . $group . '][placebo]" value="placebo">';
                                    if ($key != "placebo") {
                                        $output .= '<li id="' . $key . '" class="sortee">';
                                        $output .= '<input class="position" type="hidden" name="' . $value['id'] . '[' . $group . '][' . $key . ']" value="' . $list . '">';
                                        $output .= $list;
                                        $output .= '</li>';
                                    }
                                }
                                $output .= '</ul>';
                            }
                        }
                        $output .= '</div>';
                        break;
                        //background images option
                    //background images option
                    case 'tiles':
                        $i = 0;
                        $select_value = isset($smof_data[$value['id']]) && !empty($smof_data[$value['id']]) ? $smof_data[$value['id']] : '';
                        if (is_array($value['options'])) {
                            foreach ($value['options'] as $key => $option) {
                                $i++;
                                $checked = '';
                                $selected = '';
                                if (NULL != checked($select_value, $option, false)) {
                                    $checked = checked($select_value, $option, false);
                                    $selected = 'of-radio-tile-selected';
                                }
                                $output .= '<span>';
                                $output .= '<input type="radio" id="of-radio-tile-' . $value['id'] . $i . '" class="checkbox of-radio-tile-radio" value="' . $option . '" name="' . $value['id'] . '" ' . $checked . ' />';
                                $output .= '<div class="of-radio-tile-img ' . $selected . '" style="background: url(' . $option . ')" onClick="document.getElementById(\'of-radio-tile-' . $value['id'] . $i . '\').checked = true;"></div>';
                                $output .= '</span>';
                            }
                        }
                        break;
                        //backup and restore options data
                    //backup and restore options data
                    case 'backup':
                        $instructions = $value['desc'];
                        $backup = of_get_options(BACKUPS);
                        $init = of_get_options('smof_init');
                        if (!isset($backup['backup_log'])) {
                            $log = 'No backups yet';
                        } else {
                            $log = $backup['backup_log'];
                        }
                        $output .= '<div class="backup-box">';
                        $output .= '<div class="instructions">' . $instructions . "\n";
                        $output .= '<p><strong>' . __('Last Backup', 'veented_backend') . ': <span class="backup-log">' . $log . '</span></strong></p></div>' . "\n";
                        $output .= '<a href="#" id="of_backup_button" class="button" title="Backup Options">Backup Options</a>';
                        $output .= '<a href="#" id="of_restore_button" class="button" title="Restore Options">Restore Options</a>';
                        $output .= '</div>';
                        break;
                        //export or import data between different installs
                    //export or import data between different installs
                    case 'transfer':
                        $instructions = $value['desc'];
                        $output .= '<textarea id="export_data" rows="8">' . base64_encode(serialize($smof_data)) . '</textarea>' . "\n";
                        $output .= '<a href="#" id="of_import_button" class="button" title="Restore Options">Import Options</a>';
                        break;
                        // google font field
                    // google font field
                    case 'select_google_font':
                        $output .= '<select class="select of-input google_font_select" name="' . $value['id'] . '" id="' . $value['id'] . '" data-dependency=' . $value['dep'] . '>';
                        foreach ($value['options'] as $select_key => $option) {
                            $output .= '<option value="' . $select_key . '" ' . selected(isset($smof_data[$value['id']]) ? $smof_data[$value['id']] : "", $option, false) . ' />' . $option . '</option>';
                        }
                        $output .= '</select>';
                        if (isset($value['preview']['text'])) {
                            $g_text = $value['preview']['text'];
                        } else {
                            $g_text = '0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz';
                        }
                        if (isset($value['preview']['size'])) {
                            $g_size = 'style="font-size: ' . $value['preview']['size'] . ';"';
                        } else {
                            $g_size = '';
                        }
                        $hide = " hide";
                        if ($smof_data[$value['id']] != "none" && $smof_data[$value['id']] != "") {
                            $hide = "";
                        }
                        //$output .= '<p class="'.$value['id'].'_ggf_previewer google_font_preview'.$hide.'" '. $g_size .'>'. $g_text .'</p>';
                        break;
                        //JQuery UI Slider
                    //JQuery UI Slider
                    case 'sliderui':
                        $s_val = $s_min = $s_max = $s_step = $s_edit = '';
                        //no errors, please
                        $s_val = stripslashes($smof_data[$value['id']]);
                        if (!isset($value['min'])) {
                            $s_min = '0';
                        } else {
                            $s_min = $value['min'];
                        }
                        if (!isset($value['max'])) {
                            $s_max = $s_min + 1;
                        } else {
                            $s_max = $value['max'];
                        }
                        if (!isset($value['step'])) {
                            $s_step = '1';
                        } else {
                            $s_step = $value['step'];
                        }
                        if (!isset($value['edit'])) {
                            $s_edit = ' readonly="readonly"';
                        } else {
                            $s_edit = '';
                        }
                        if ($s_val == '') {
                            $s_val = $s_min;
                        }
                        //values
                        $s_data = 'data-id="' . $value['id'] . '" data-val="' . $s_val . '" data-min="' . $s_min . '" data-max="' . $s_max . '" data-step="' . $s_step . '"';
                        //html output
                        $output .= '<input type="text" name="' . $value['id'] . '" id="' . $value['id'] . '" data-dependency="' . $value['dep'] . '" value="' . $s_val . '" class="mini" ' . $s_edit . ' />';
                        $output .= '<div id="' . $value['id'] . '-slider" class="smof_sliderui" style="margin-left: 7px;" ' . $s_data . '></div>';
                        break;
                        //text input
                    //text input
                    case 'theme_preview':
                        $t_value = '';
                        $t_value = stripslashes($smof_data[$value['id']]);
                        $mini = $boxed_styling = $topbar_disabled = '';
                        if (!isset($value['mod'])) {
                            $value['mod'] = '';
                        }
                        if ($value['mod'] == 'mini') {
                            $mini = 'mini';
                        }
                        global $smof_data;
                        if (array_key_exists('vntd_website_layout', $smof_data)) {
                            if ($smof_data['vntd_website_layout'] == 'boxed') {
                                $boxed_styling = '#theme-preview .browser-wrapper { width:85%; border-width:0 1px 0 1px; }#theme-preview .browser-wrapper > div { padding:15px 30px; }';
                            }
                        }
                        if (array_key_exists('vntd_topbar', $smof_data)) {
                            if (!$smof_data['vntd_topbar']) {
                                $topbar_disabled = 'style="display:none;"';
                            }
                        }
                        if (array_key_exists('vntd_accent_color', $smof_data)) {
                            $output .= '
					<style type="text/css">
						
						' . $boxed_styling . '
						#theme-preview .accent { color: ' . $smof_data['vntd_accent_color'] . '; }
						#theme-preview .browser-content {
							background-color: ' . $smof_data['vntd_bg_color'] . ';';
                            $output .= '
							
						}
						
						#theme-preview .header {
							background-color: ' . $smof_data['vntd_header_bg_color'] . ';';
                            $output .= '							
							
						}
						#theme-preview .preview-navigation {
							color: ' . $smof_data['vntd_header_nav_color'] . ';
							font-size: ' . $smof_data['vntd_fs_navigation'] . 'px;
							font-weight: ' . $smof_data['vntd_navigation_font_weight'] . ';
							text-transform: ' . $smof_data['vntd_navigation_font_transform'] . ';
						}
						
						#theme-preview .page-title {
							background-color: ' . $smof_data['vntd_pagetitle_bg_color'] . ';
							font-size: ' . $smof_data['vntd_fs_page_title'] . 'px;
							border-color: ' . $smof_data['vntd_pagetitle_border_color'] . ';';
                            $output .= '
							
						}
						
						#theme-preview .preview-page-title { color: ' . $smof_data['vntd_pagetitle_color'] . '; }
						#theme-preview .preview-page-tagline {
							color: ' . $smof_data['vntd_pagetitle_tagline_color'] . ';
							font-size: ' . $smof_data['vntd_fs_page_tagline'] . 'px;
						}
						#theme-preview .preview-breadcrumbs {
							color: ' . $smof_data['vntd_breadcrumbs_color'] . ';
							font-size: ' . $smof_data['vntd_fs_breadcrumbs'] . 'px;
						}
						
						#theme-preview .body {
							color: ' . $smof_data['vntd_body_color'] . ';
							font-size: ' . $smof_data['vntd_fs_body'] . 'px;';
                            $output .= '
							
						}
						
						#theme-preview .preview-heading { 
							color: ' . $smof_data['vntd_heading_color'] . '; 
							text-transform:' . $smof_data['vntd_heading_font_transform'] . '; 
							font-weight:' . $smof_data['vntd_heading_font_weight'] . '; 
						} 
						#theme-preview .body-hover-color { color: ' . $smof_data['vntd_content_hover_color'] . '; }
						
						#theme-preview .footer {
							color: ' . $smof_data['vntd_footer_color'] . ';
							background-color: ' . $smof_data['vntd_footer_bg_color'] . ';
							border-color: ' . $smof_data['vntd_footer_border_color'] . ';							
							font-size: ' . $smof_data['vntd_fs_copyright'] . 'px;
							
						}					

						#theme-preview .preview-special-heading { font-size: ' . $smof_data['vntd_fs_special'] . 'px; } 
						#theme-preview .preview-h1 { font-size: ' . $smof_data['vntd_fs_h1'] . 'px; } 
						#theme-preview .preview-h2 { font-size: ' . $smof_data['vntd_fs_h2'] . 'px; } 
						#theme-preview .preview-h3 { font-size: ' . $smof_data['vntd_fs_h3'] . 'px; } 
						#theme-preview .preview-h4 { font-size: ' . $smof_data['vntd_fs_h4'] . 'px; } 
						#theme-preview .preview-h5 { font-size: ' . $smof_data['vntd_fs_h5'] . 'px; } 
						#theme-preview .preview-h6 { font-size: ' . $smof_data['vntd_fs_h6'] . 'px; } 
					</style>';
                        }
                        $output .= '<div id="theme-preview" class="browser-window">
									
									<div class="browser-header">' . get_bloginfo('name') . '</div>
									<div class="browser-content">
									<div class="browser-wrapper">										
										<div class="header">' . get_bloginfo('name') . '											
											<div class="preview-navigation primary-font"><ul><li class="accent">Home</li><li>Blog</li><li>Contact</li></ul></div>
										</div>
										
										<div class="page-title">
											<h2 class="preview-page-title primary-font">Page Title</h2><span class="preview-breadcrumbs">back to home</span>
											<div class="preview-page-tagline">Beautiful page tagline</div>											
										</div>
										
										<div class="body">
											<div class="two-third">
											<h1 class="primary-font preview-special-heading preview-heading">Special</h1>
											<p class="body">The first parameter is a unique ID for the section that you\'ll need later (when you’re putting controls into it).</p>
											<h1 class="primary-font preview-h1 preview-heading">Heading 1</h1>
											<p class="body">The first parameter is a unique ID for the section that you\'ll need later (when you’re putting controls into it).</p>
											<h2 class="primary-font preview-h2 preview-heading">Heading 2</h2>
											<p class="body"><span class="accent">This is a link</span> and <span class="body-hover-color">this is a link hover color</span></p>
											<h3 class="primary-font preview-h3 preview-heading">Heading 3</h3>			
											
											</div>
											<div class="one-third">
												<h3 class="sidebar-heading primary-font preview-heading preview-h3">Widget Title</h3>
												<p class="widget-content body">Fusce a odio in neque congue feugiat fusce a odio in neque congue feugiat.</p>
												<h4 class="primary-font preview-h4 preview-heading">Heading 4</h4>
												<h5 class="primary-font preview-h5 preview-heading">Heading 5</h5>
												<h6 class="primary-font preview-h6 preview-heading">Heading 6</h6>												
											</div>
										</div>
										
										<div class="footer">
											2014 Your Site - All rights reserved. <span class="subfooter-link">Link</span> and <span class="subfooter-hover">Hover state</span>.
										</div>
									</div>
									</div>

							</div>';
                        break;
                        // Theme Customizer Start
                    // Theme Customizer Start
                    case 'customizer_start':
                        $output .= '<div class="theme-customizer-nav"><ul class="customizer-tabs-nav">
						<li class="tab-current"><span>General</span></li>																		
						<li><span>Header</span></li>
						<li><span>Page Title</span></li>
						<li><span>Page Content</span></li>									
						<li><span>Footer</span></li>
						<li><span>Typography</span></li>					
					</ul><div class="clear"></div></div>
					<div class="theme-customizer">								
								<div class="customizer-tabs-content" onmouseover="document.body.style.overflow=\'hidden\';" onmouseout="document.body.style.overflow=\'auto\';">';
                        break;
                        // Theme Customizer Single Tab
                    // Theme Customizer Single Tab
                    case 'customizer_tab':
                        if ($value['name'] != 'General') {
                            $output .= '</div>';
                        }
                        $output .= '<div id="customizer-tab-' . $value['name'] . '" class="customizer-tab">';
                        break;
                        // Theme Customizer End
                    // Theme Customizer End
                    case 'customizer_end':
                        $output .= '</div></div></div>';
                        break;
                        // Toggle Start
                    // Toggle Start
                    case 'toggle_start':
                        $output .= '<div class="of-toggle-wrap f_st_custom_headers"><div class="of-toggle-heading">' . $value['name'] . '<i class="icon-plus"></i></div><div class="of-toggle-content">';
                        break;
                        // Toggle End
                    // Toggle End
                    case 'toggle_end':
                        $output .= '</div></div>';
                        break;
                        //Switch option
                    //Switch option
                    case 'switch':
                        if (!isset($smof_data[$value['id']])) {
                            $smof_data[$value['id']] = 0;
                        }
                        $fold = $fold_checkbox = '';
                        if (array_key_exists("folds", $value)) {
                            $fold = "s_fld ";
                            $fold_checkbox = "fld ";
                        }
                        $cb_enabled = $cb_disabled = '';
                        //no errors, please
                        //Get selected
                        if ($smof_data[$value['id']] == 1) {
                            $cb_enabled = ' selected';
                            $cb_disabled = '';
                        } else {
                            $cb_enabled = '';
                            $cb_disabled = ' selected';
                        }
                        //Label ON
                        if (!isset($value['on'])) {
                            $on = "On";
                        } else {
                            $on = $value['on'];
                        }
                        //Label OFF
                        if (!isset($value['off'])) {
                            $off = "Off";
                        } else {
                            $off = $value['off'];
                        }
                        //$output .= '<p class="switch-options">';
                        $output .= '<p>';
                        //						$output .= '<label class="'.$fold.'cb-enable'. $cb_enabled .'" data-id="'.$value['id'].'"><span>'. $on .'</span></label>';
                        //						$output .= '<label class="'.$fold.'cb-disable'. $cb_disabled .'" data-id="'.$value['id'].'"><span>'. $off .'</span></label>';
                        //$output .= '<input type="hidden" class="'.$fold.'checkbox of-input" name="'.$value['id'].'" id="'. $value['id'] .'" value="0"/>';
                        $output .= '<div class="toggle-checkbox"></div>';
                        $output .= '<input type="checkbox" id="' . $value['id'] . '" class="' . $fold_checkbox . 'checkbox of-input main_checkbox hidden" data-dependency="' . $value['dep'] . '" name="' . $value['id'] . '"  value="1" ' . checked($smof_data[$value['id']], 1, false) . ' />';
                        $output .= '</p>';
                        break;
                        // Uploader 3.5
                    // Uploader 3.5
                    case "upload":
                    case "media":
                        if (!isset($value['mod'])) {
                            $value['mod'] = '';
                        }
                        $u_val = '';
                        if ($smof_data[$value['id']]) {
                            $u_val = stripslashes($smof_data[$value['id']]);
                        }
                        $output .= Options_Machine::optionsframework_media_uploader_function($value['id'], $u_val, $value['mod'], $value['dep']);
                        break;
                }
                do_action('optionsframework_machine_loop', array('options' => $options, 'smof_data' => $smof_data, 'defaults' => $defaults, 'counter' => $counter, 'menu' => $menu, 'output' => $output, 'value' => $value));
                if ($smof_output != "") {
                    $output .= $smof_output;
                    $smof_output = "";
                }
                //description of each option
                if ($value['type'] != 'heading' && $value['type'] != "toggle_start" && $value['type'] != "toggle_end" && $value['type'] != "customizer_tab" && $value['type'] != "customizer_start" && $value['type'] != "customizer_end") {
                    if (!isset($value['desc'])) {
                        $explain_value = '';
                    } else {
                        $explain_value = '<div class="explain">' . $value['desc'] . '</div>' . "\n";
                    }
                    $output .= '</div>' . $explain_value . "\n";
                    $output .= '<div class="clear"> </div></div></div>' . "\n";
                }
            }
            /* condition empty end */
        }
        if ($update_data == true) {
            of_save_options($smof_data);
        }
        $output .= '</div>';
        do_action('optionsframework_machine_after', array('options' => $options, 'smof_data' => $smof_data, 'defaults' => $defaults, 'counter' => $counter, 'menu' => $menu, 'output' => $output, 'value' => $value));
        if ($smof_output != "") {
            $output .= $smof_output;
            $smof_output = "";
        }
        return array($output, $menu, $defaults);
    }
Ejemplo n.º 13
0
/**
 * Get options from the database and process them with the load filter hook.
 *
 * @author Jonah Dahlquist
 * @since 1.4.0
 * @return array
 */
function of_get_options($key = OPTIONS)
{
    $data = get_option($key);
    if (!$data && $key == OPTIONS && OPTIONS != OPTIONS_BASE) {
        $data = get_option(OPTIONS_BASE);
        if (is_admin()) {
            if ($data) {
                of_save_options($data);
            }
        }
    }
    $data = apply_filters('of_options_after_load', $data);
    return $data;
}
 /**
  * Process options data and build option fields
  *
  * @uses get_theme_mod()
  *
  * @access public
  * @since 1.0.0
  *
  * @return array
  */
 public static function optionsframework_machine($options)
 {
     global $smof_output, $smof_details, $smof_data;
     if (empty($options)) {
         return;
     }
     if (empty($smof_data)) {
         $smof_data = of_get_options();
     }
     $data = $smof_data;
     $defaults = array();
     $counter = 0;
     $menu = '';
     $output = '';
     $update_data = false;
     do_action('optionsframework_machine_before', array('options' => $options, 'smof_data' => $smof_data));
     if ($smof_output != "") {
         $output .= $smof_output;
         $smof_output = "";
     }
     foreach ($options as $value) {
         // sanitize option
         if ($value['type'] != "heading") {
             $value = self::sanitize_option($value);
         }
         $counter++;
         $val = '';
         //create array of defaults
         if ($value['type'] == 'multicheck') {
             if (is_array($value['std'])) {
                 foreach ($value['std'] as $i => $key) {
                     $defaults[$value['id']][$key] = true;
                 }
             } else {
                 $defaults[$value['id']][$value['std']] = true;
             }
         } else {
             if (isset($value['id'])) {
                 $defaults[$value['id']] = $value['std'];
             }
         }
         /* condition start */
         if (!empty($smof_data) || !empty($data)) {
             if (array_key_exists('id', $value) && !isset($smof_data[$value['id']])) {
                 $smof_data[$value['id']] = $value['std'];
                 if ($value['type'] == "checkbox" && $value['std'] == 0) {
                     $smof_data[$value['id']] = 0;
                 } else {
                     $update_data = true;
                 }
             }
             if (array_key_exists('id', $value) && !isset($smof_details[$value['id']])) {
                 $smof_details[$value['id']] = $smof_data[$value['id']];
             }
             //Start Heading
             if ($value['type'] != "heading") {
                 $class = '';
                 if (isset($value['class'])) {
                     $class = $value['class'];
                 }
                 //hide items in checkbox group
                 $fold = '';
                 if (array_key_exists("fold", $value)) {
                     if (isset($smof_data[$value['fold']]) && $smof_data[$value['fold']]) {
                         $fold = "f_" . $value['fold'] . " ";
                     } else {
                         $fold = "f_" . $value['fold'] . " temphide ";
                     }
                 }
                 $output .= '<div id="section-' . $value['id'] . '" class="' . $fold . 'section section-' . $value['type'] . ' ' . $class . '">' . "\n";
                 //only show header if 'name' value exists
                 if ($value['name']) {
                     $output .= '<h3 class="heading">' . $value['name'] . '</h3>' . "\n";
                 }
                 $output .= '<div class="option">' . "\n" . '<div class="controls">' . "\n";
             }
             //End Heading
             //if (!isset($smof_data[$value['id']]) && $value['type'] != "heading")
             //	continue;
             //switch statement to handle various options type
             switch ($value['type']) {
                 //text input
                 case 'text':
                     $t_value = '';
                     $t_value = stripslashes($smof_data[$value['id']]);
                     $mini = '';
                     if (!isset($value['mod'])) {
                         $value['mod'] = '';
                     }
                     if ($value['mod'] == 'mini') {
                         $mini = 'mini';
                     }
                     $output .= '<input class="of-input ' . $mini . '" name="' . $value['id'] . '" id="' . $value['id'] . '" type="' . $value['type'] . '" value="' . $t_value . '" />';
                     break;
                     //select option
                 //select option
                 case 'select':
                     $mini = '';
                     if (!isset($value['mod'])) {
                         $value['mod'] = '';
                     }
                     if ($value['mod'] == 'mini') {
                         $mini = 'mini';
                     }
                     $output .= '<div class="select_wrapper ' . $mini . '">';
                     $output .= '<select class="select of-input" name="' . $value['id'] . '" id="' . $value['id'] . '">';
                     foreach ($value['options'] as $select_ID => $option) {
                         $theValue = $option;
                         if (!is_numeric($select_ID)) {
                             $theValue = $select_ID;
                         }
                         $output .= '<option id="' . $select_ID . '" value="' . $theValue . '" ' . selected($smof_data[$value['id']], $theValue, false) . ' />' . $option . '</option>';
                     }
                     $output .= '</select></div>';
                     break;
                     //textarea option
                 //textarea option
                 case 'textarea':
                     $cols = '8';
                     $ta_value = '';
                     if (isset($value['options'])) {
                         $ta_options = $value['options'];
                         if (isset($ta_options['cols'])) {
                             $cols = $ta_options['cols'];
                         }
                     }
                     $ta_value = stripslashes($smof_data[$value['id']]);
                     $output .= '<textarea class="of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" cols="' . $cols . '" rows="8">' . $ta_value . '</textarea>';
                     break;
                     //radiobox option
                 //radiobox option
                 case "radio":
                     $checked = isset($smof_data[$value['id']]) ? checked($smof_data[$value['id']], $option, false) : '';
                     foreach ($value['options'] as $option => $name) {
                         $output .= '<input class="of-input of-radio" name="' . $value['id'] . '" type="radio" value="' . $option . '" ' . checked($smof_data[$value['id']], $option, false) . ' /><label class="radio">' . $name . '</label><br/>';
                     }
                     break;
                     //checkbox option
                 //checkbox option
                 case 'checkbox':
                     if (!isset($smof_data[$value['id']])) {
                         $smof_data[$value['id']] = 0;
                     }
                     $fold = '';
                     if (array_key_exists("folds", $value)) {
                         $fold = "fld ";
                     }
                     $output .= '<input type="hidden" class="' . $fold . 'checkbox of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" value="0"/>';
                     $output .= '<input type="checkbox" class="' . $fold . 'checkbox of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" value="1" ' . checked($smof_data[$value['id']], 1, false) . ' />';
                     break;
                     //multiple checkbox option
                 //multiple checkbox option
                 case 'multicheck':
                     isset($smof_data[$value['id']]) ? $multi_stored = $smof_data[$value['id']] : ($multi_stored = "");
                     foreach ($value['options'] as $key => $option) {
                         if (!isset($multi_stored[$key])) {
                             $multi_stored[$key] = '';
                         }
                         $of_key_string = $value['id'] . '_' . $key;
                         $output .= '<input type="checkbox" class="checkbox of-input" name="' . $value['id'] . '[' . $key . ']' . '" id="' . $of_key_string . '" value="1" ' . checked($multi_stored[$key], 1, false) . ' /><label class="multicheck" for="' . $of_key_string . '">' . $option . '</label><br />';
                     }
                     break;
                     // Color picker
                 // Color picker
                 case "color":
                     $default_color = '';
                     if (isset($value['std'])) {
                         $default_color = ' data-default-color="' . $value['std'] . '" ';
                     }
                     $output .= '<input name="' . $value['id'] . '" id="' . $value['id'] . '" class="of-color"  type="text" value="' . $smof_data[$value['id']] . '"' . $default_color . ' />';
                     break;
                     //typography option
                 //typography option
                 case 'typography':
                     $typography_stored = isset($smof_data[$value['id']]) ? $smof_data[$value['id']] : $value['std'];
                     /* Font Size */
                     if (isset($typography_stored['size'])) {
                         $output .= '<div class="select_wrapper typography-size" original-title="Font size">';
                         $output .= '<select class="of-typography of-typography-size select" name="' . $value['id'] . '[size]" id="' . $value['id'] . '_size">';
                         for ($i = 9; $i < 20; $i++) {
                             $test = $i . 'px';
                             $output .= '<option value="' . $i . 'px" ' . selected($typography_stored['size'], $test, false) . '>' . $i . 'px</option>';
                         }
                         $output .= '</select></div>';
                     }
                     /* Line Height */
                     if (isset($typography_stored['height'])) {
                         $output .= '<div class="select_wrapper typography-height" original-title="Line height">';
                         $output .= '<select class="of-typography of-typography-height select" name="' . $value['id'] . '[height]" id="' . $value['id'] . '_height">';
                         for ($i = 20; $i < 38; $i++) {
                             $test = $i . 'px';
                             $output .= '<option value="' . $i . 'px" ' . selected($typography_stored['height'], $test, false) . '>' . $i . 'px</option>';
                         }
                         $output .= '</select></div>';
                     }
                     /* Font Face */
                     if (isset($typography_stored['face'])) {
                         $output .= '<div class="select_wrapper typography-face" original-title="Font family">';
                         $output .= '<select class="of-typography of-typography-face select" name="' . $value['id'] . '[face]" id="' . $value['id'] . '_face">';
                         $faces = array('arial' => 'Arial', 'verdana' => 'Verdana, Geneva', 'trebuchet' => 'Trebuchet', 'georgia' => 'Georgia', 'times' => 'Times New Roman', 'tahoma' => 'Tahoma, Geneva', 'palatino' => 'Palatino', 'helvetica' => 'Helvetica');
                         foreach ($faces as $i => $face) {
                             $output .= '<option value="' . $i . '" ' . selected($typography_stored['face'], $i, false) . '>' . $face . '</option>';
                         }
                         $output .= '</select></div>';
                     }
                     /* Font Weight */
                     if (isset($typography_stored['style'])) {
                         $output .= '<div class="select_wrapper typography-style" original-title="Font style">';
                         $output .= '<select class="of-typography of-typography-style select" name="' . $value['id'] . '[style]" id="' . $value['id'] . '_style">';
                         $styles = array('normal' => 'Normal', 'italic' => 'Italic', 'bold' => 'Bold', 'bold italic' => 'Bold Italic');
                         foreach ($styles as $i => $style) {
                             $output .= '<option value="' . $i . '" ' . selected($typography_stored['style'], $i, false) . '>' . $style . '</option>';
                         }
                         $output .= '</select></div>';
                     }
                     /* Font Color */
                     if (isset($typography_stored['color'])) {
                         $output .= '<div id="' . $value['id'] . '_color_picker" class="colorSelector typography-color"><div style="background-color: ' . $typography_stored['color'] . '"></div></div>';
                         $output .= '<input class="of-color of-typography of-typography-color" original-title="Font color" name="' . $value['id'] . '[color]" id="' . $value['id'] . '_color" type="text" value="' . $typography_stored['color'] . '" />';
                     }
                     break;
                     //border option
                 //border option
                 case 'border':
                     /* Border Width */
                     $border_stored = $smof_data[$value['id']];
                     $output .= '<div class="select_wrapper border-width">';
                     $output .= '<select class="of-border of-border-width select" name="' . $value['id'] . '[width]" id="' . $value['id'] . '_width">';
                     for ($i = 0; $i < 21; $i++) {
                         $output .= '<option value="' . $i . '" ' . selected($border_stored['width'], $i, false) . '>' . $i . '</option>';
                     }
                     $output .= '</select></div>';
                     /* Border Style */
                     $output .= '<div class="select_wrapper border-style">';
                     $output .= '<select class="of-border of-border-style select" name="' . $value['id'] . '[style]" id="' . $value['id'] . '_style">';
                     $styles = array('none' => 'None', 'solid' => 'Solid', 'dashed' => 'Dashed', 'dotted' => 'Dotted');
                     foreach ($styles as $i => $style) {
                         $output .= '<option value="' . $i . '" ' . selected($border_stored['style'], $i, false) . '>' . $style . '</option>';
                     }
                     $output .= '</select></div>';
                     /* Border Color */
                     $output .= '<div id="' . $value['id'] . '_color_picker" class="colorSelector"><div style="background-color: ' . $border_stored['color'] . '"></div></div>';
                     $output .= '<input class="of-color of-border of-border-color" name="' . $value['id'] . '[color]" id="' . $value['id'] . '_color" type="text" value="' . $border_stored['color'] . '" />';
                     break;
                     //images checkbox - use image as checkboxes
                 //images checkbox - use image as checkboxes
                 case 'images':
                     $i = 0;
                     $select_value = isset($smof_data[$value['id']]) ? $smof_data[$value['id']] : '';
                     foreach ($value['options'] as $key => $option) {
                         $i++;
                         $checked = '';
                         $selected = '';
                         if (NULL != checked($select_value, $key, false)) {
                             $checked = checked($select_value, $key, false);
                             $selected = 'of-radio-img-selected';
                         }
                         $output .= '<span>';
                         $output .= '<input type="radio" id="of-radio-img-' . $value['id'] . $i . '" class="checkbox of-radio-img-radio" value="' . $key . '" name="' . $value['id'] . '" ' . $checked . ' />';
                         $output .= '<div class="of-radio-img-label">' . $key . '</div>';
                         $output .= '<img src="' . $option . '" alt="" class="of-radio-img-img ' . $selected . '" onClick="document.getElementById(\'of-radio-img-' . $value['id'] . $i . '\').checked = true;" />';
                         $output .= '</span>';
                     }
                     break;
                     //info (for small intro box etc)
                 //info (for small intro box etc)
                 case "info":
                     $info_text = $value['std'];
                     $output .= '<div class="of-info">' . $info_text . '</div>';
                     break;
                     //display a single image
                 //display a single image
                 case "image":
                     $src = $value['std'];
                     $output .= '<img src="' . $src . '">';
                     break;
                     //tab heading
                 //tab heading
                 case 'heading':
                     if ($counter >= 2) {
                         $output .= '</div>' . "\n";
                     }
                     //custom icon
                     $icon = '';
                     if (isset($value['icon'])) {
                         $icon = ' style="background-image: url(' . $value['icon'] . ');"';
                     }
                     $header_class = str_replace(' ', '', strtolower($value['name']));
                     $jquery_click_hook = str_replace(' ', '', strtolower($value['name']));
                     $jquery_click_hook = "of-option-" . trim(preg_replace('/ +/', '', preg_replace('/[^A-Za-z0-9 ]/', '', urldecode(html_entity_decode(strip_tags($jquery_click_hook))))));
                     $menu .= '<li class="' . $header_class . '"><a title="' . $value['name'] . '" href="#' . $jquery_click_hook . '"' . $icon . '>' . $value['name'] . '</a></li>';
                     $output .= '<div class="group" id="' . $jquery_click_hook . '"><h2>' . $value['name'] . '</h2>' . "\n";
                     break;
                     //drag & drop slide manager
                 //drag & drop slide manager
                 case 'slider':
                     $output .= '<div class="slider"><ul id="' . $value['id'] . '">';
                     $slides = $smof_data[$value['id']];
                     $count = count($slides);
                     if ($count < 2) {
                         $oldorder = 1;
                         $order = 1;
                         $output .= Options_Machine::optionsframework_slider_function($value['id'], $value['std'], $oldorder, $order);
                     } else {
                         $i = 0;
                         foreach ($slides as $slide) {
                             $oldorder = $slide['order'];
                             $i++;
                             $order = $i;
                             $output .= Options_Machine::optionsframework_slider_function($value['id'], $value['std'], $oldorder, $order);
                         }
                     }
                     $output .= '</ul>';
                     $output .= '<a href="#" class="button slide_add_button">Add New Slide</a></div>';
                     break;
                     //drag & drop block manager
                 //drag & drop block manager
                 case 'sorter':
                     // Make sure to get list of all the default blocks first
                     $all_blocks = $value['std'];
                     $temp = array();
                     // holds default blocks
                     $temp2 = array();
                     // holds saved blocks
                     foreach ($all_blocks as $blocks) {
                         $temp = array_merge($temp, $blocks);
                     }
                     $sortlists = isset($data[$value['id']]) && !empty($data[$value['id']]) ? $data[$value['id']] : $value['std'];
                     foreach ($sortlists as $sortlist) {
                         $temp2 = array_merge($temp2, $sortlist);
                     }
                     // now let's compare if we have anything missing
                     foreach ($temp as $k => $v) {
                         if (!array_key_exists($k, $temp2)) {
                             $sortlists['disabled'][$k] = $v;
                         }
                     }
                     // now check if saved blocks has blocks not registered under default blocks
                     foreach ($sortlists as $key => $sortlist) {
                         foreach ($sortlist as $k => $v) {
                             if (!array_key_exists($k, $temp)) {
                                 unset($sortlist[$k]);
                             }
                         }
                         $sortlists[$key] = $sortlist;
                     }
                     // assuming all sync'ed, now get the correct naming for each block
                     foreach ($sortlists as $key => $sortlist) {
                         foreach ($sortlist as $k => $v) {
                             $sortlist[$k] = $temp[$k];
                         }
                         $sortlists[$key] = $sortlist;
                     }
                     $output .= '<div id="' . $value['id'] . '" class="sorter">';
                     if ($sortlists) {
                         foreach ($sortlists as $group => $sortlist) {
                             $output .= '<ul id="' . $value['id'] . '_' . $group . '" class="sortlist_' . $value['id'] . '">';
                             $output .= '<h3>' . $group . '</h3>';
                             foreach ($sortlist as $key => $list) {
                                 $output .= '<input class="sorter-placebo" type="hidden" name="' . $value['id'] . '[' . $group . '][placebo]" value="placebo">';
                                 if ($key != "placebo") {
                                     $output .= '<li id="' . $key . '" class="sortee">';
                                     $output .= '<input class="position" type="hidden" name="' . $value['id'] . '[' . $group . '][' . $key . ']" value="' . $list . '">';
                                     $output .= $list;
                                     $output .= '</li>';
                                 }
                             }
                             $output .= '</ul>';
                         }
                     }
                     $output .= '</div>';
                     break;
                     //background images option
                 //background images option
                 case 'tiles':
                     $i = 0;
                     $select_value = isset($smof_data[$value['id']]) && !empty($smof_data[$value['id']]) ? $smof_data[$value['id']] : '';
                     if (is_array($value['options'])) {
                         foreach ($value['options'] as $key => $option) {
                             $i++;
                             $checked = '';
                             $selected = '';
                             if (NULL != checked($select_value, $option, false)) {
                                 $checked = checked($select_value, $option, false);
                                 $selected = 'of-radio-tile-selected';
                             }
                             $output .= '<span>';
                             $output .= '<input type="radio" id="of-radio-tile-' . $value['id'] . $i . '" class="checkbox of-radio-tile-radio" value="' . $option . '" name="' . $value['id'] . '" ' . $checked . ' />';
                             $output .= '<div class="of-radio-tile-img ' . $selected . '" style="background: url(' . $option . ')" onClick="document.getElementById(\'of-radio-tile-' . $value['id'] . $i . '\').checked = true;"></div>';
                             $output .= '</span>';
                         }
                     }
                     break;
                     //backup and restore options data
                 //backup and restore options data
                 case 'backup':
                     $instructions = $value['desc'];
                     $backup = of_get_options(BACKUPS);
                     $init = of_get_options('smof_init');
                     if (!isset($backup['backup_log'])) {
                         $log = 'No backups yet';
                     } else {
                         $log = $backup['backup_log'];
                     }
                     $output .= '<div class="backup-box">';
                     $output .= '<div class="instructions">' . $instructions . "\n";
                     $output .= '<p><strong>' . __('Last Backup : ', 'calm') . '<span class="backup-log">' . $log . '</span></strong></p></div>' . "\n";
                     $output .= '<a href="#" id="of_backup_button" class="button" title="Backup Options">Backup Options</a>';
                     $output .= '<a href="#" id="of_restore_button" class="button" title="Restore Options">Restore Options</a>';
                     $output .= '</div>';
                     break;
                     //export or import data between different installs
                 //export or import data between different installs
                 case 'transfer':
                     $instructions = $value['desc'];
                     $output .= '<textarea id="export_data" rows="8">' . base64_encode(serialize($smof_data)) . '</textarea>' . "\n";
                     $output .= '<a href="#" id="of_import_button" class="button" title="Restore Options">Import Options</a>';
                     break;
                     // google font field
                 // google font field
                 case 'select_google_font':
                     $output .= '<div class="select_wrapper">';
                     $output .= '<select class="select of-input google_font_select" name="' . $value['id'] . '" id="' . $value['id'] . '">';
                     foreach ($value['options'] as $select_key => $option) {
                         $output .= '<option value="' . $select_key . '" ' . selected(isset($smof_data[$value['id']]) ? $smof_data[$value['id']] : "", $option, false) . ' />' . $option . '</option>';
                     }
                     $output .= '</select></div>';
                     if (isset($value['preview']['text'])) {
                         $g_text = $value['preview']['text'];
                     } else {
                         $g_text = '0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz';
                     }
                     if (isset($value['preview']['size'])) {
                         $g_size = 'style="font-size: ' . $value['preview']['size'] . ';"';
                     } else {
                         $g_size = '';
                     }
                     $hide = " hide";
                     if ($smof_data[$value['id']] != "none" && $smof_data[$value['id']] != "") {
                         $hide = "";
                     }
                     $output .= '<p class="' . $value['id'] . '_ggf_previewer google_font_preview' . $hide . '" ' . $g_size . '>' . $g_text . '</p>';
                     break;
                     //JQuery UI Slider
                 //JQuery UI Slider
                 case 'sliderui':
                     $s_val = $s_min = $s_max = $s_step = $s_edit = '';
                     //no errors, please
                     $s_val = stripslashes($smof_data[$value['id']]);
                     if (!isset($value['min'])) {
                         $s_min = '0';
                     } else {
                         $s_min = $value['min'];
                     }
                     if (!isset($value['max'])) {
                         $s_max = $s_min + 1;
                     } else {
                         $s_max = $value['max'];
                     }
                     if (!isset($value['step'])) {
                         $s_step = '1';
                     } else {
                         $s_step = $value['step'];
                     }
                     if (!isset($value['edit'])) {
                         $s_edit = ' readonly="readonly"';
                     } else {
                         $s_edit = '';
                     }
                     if ($s_val == '') {
                         $s_val = $s_min;
                     }
                     //values
                     $s_data = 'data-id="' . $value['id'] . '" data-val="' . $s_val . '" data-min="' . $s_min . '" data-max="' . $s_max . '" data-step="' . $s_step . '"';
                     //html output
                     $output .= '<input type="text" name="' . $value['id'] . '" id="' . $value['id'] . '" value="' . $s_val . '" class="mini" ' . $s_edit . ' />';
                     $output .= '<div id="' . $value['id'] . '-slider" class="smof_sliderui" style="margin-left: 7px;" ' . $s_data . '></div>';
                     break;
                     //Switch option
                 //Switch option
                 case 'switch':
                     if (!isset($smof_data[$value['id']])) {
                         $smof_data[$value['id']] = 0;
                     }
                     $fold = '';
                     if (array_key_exists("folds", $value)) {
                         $fold = "s_fld ";
                     }
                     $cb_enabled = $cb_disabled = '';
                     //no errors, please
                     //Get selected
                     if ($smof_data[$value['id']] == 1) {
                         $cb_enabled = ' selected';
                         $cb_disabled = '';
                     } else {
                         $cb_enabled = '';
                         $cb_disabled = ' selected';
                     }
                     //Label ON
                     if (!isset($value['on'])) {
                         $on = "On";
                     } else {
                         $on = $value['on'];
                     }
                     //Label OFF
                     if (!isset($value['off'])) {
                         $off = "Off";
                     } else {
                         $off = $value['off'];
                     }
                     $output .= '<p class="switch-options">';
                     $output .= '<label class="' . $fold . 'cb-enable' . $cb_enabled . '" data-id="' . $value['id'] . '"><span>' . $on . '</span></label>';
                     $output .= '<label class="' . $fold . 'cb-disable' . $cb_disabled . '" data-id="' . $value['id'] . '"><span>' . $off . '</span></label>';
                     $output .= '<input type="hidden" class="' . $fold . 'checkbox of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" value="0"/>';
                     $output .= '<input type="checkbox" id="' . $value['id'] . '" class="' . $fold . 'checkbox of-input main_checkbox" name="' . $value['id'] . '"  value="1" ' . checked($smof_data[$value['id']], 1, false) . ' />';
                     $output .= '</p>';
                     break;
                     // Uploader 3.5
                 // Uploader 3.5
                 case "upload":
                 case "media":
                     if (!isset($value['mod'])) {
                         $value['mod'] = '';
                     }
                     $u_val = '';
                     if ($smof_data[$value['id']]) {
                         $u_val = stripslashes($smof_data[$value['id']]);
                     }
                     $output .= Options_Machine::optionsframework_media_uploader_function($value['id'], $u_val, $value['mod']);
                     break;
             }
             do_action('optionsframework_machine_loop', array('options' => $options, 'smof_data' => $smof_data, 'defaults' => $defaults, 'counter' => $counter, 'menu' => $menu, 'output' => $output, 'value' => $value));
             if ($smof_output != "") {
                 $output .= $smof_output;
                 $smof_output = "";
             }
             //description of each option
             if ($value['type'] != 'heading') {
                 if (!isset($value['desc'])) {
                     $explain_value = '';
                 } else {
                     $explain_value = '<div class="explain">' . $value['desc'] . '</div>' . "\n";
                 }
                 $output .= '</div>' . $explain_value . "\n";
                 $output .= '<div class="clear"> </div></div></div>' . "\n";
             }
         }
         /* condition empty end */
     }
     if ($update_data == true) {
         of_save_options($smof_data);
     }
     $output .= '</div>';
     do_action('optionsframework_machine_after', array('options' => $options, 'smof_data' => $smof_data, 'defaults' => $defaults, 'counter' => $counter, 'menu' => $menu, 'output' => $output, 'value' => $value));
     if ($smof_output != "") {
         $output .= $smof_output;
         $smof_output = "";
     }
     return array($output, $menu, $defaults);
 }
Ejemplo n.º 15
0
function demo_importer_save_hook($param)
{
    if (!class_exists('WP_Import')) {
        require file_require(get_template_directory() . '/framework/addons/wordpress-importer' . '/wordpress-importer.php');
    }
    /* File Paths */
    $options_file = file_require(get_template_directory_uri() . '/framework/addons/wordpress-importer/files/theme-options.txt', true);
    $options_file_path = file_require(dirname(__FILE__) . '/files/theme-options.txt');
    $nav_file = file_require(get_template_directory_uri() . '/framework/addons/wordpress-importer/files/navigation.xml', true);
    $nav_file_path = file_require(dirname(__FILE__) . '/files/navigation.xml', true);
    $widget_file = file_require(get_template_directory_uri() . '/framework/addons/wordpress-importer/files/widgets.txt', true);
    $widget_file_path = file_require(dirname(__FILE__) . '/files/widgets.txt', true);
    if (isset($param['template']) && !empty($param['template'])) {
        /* Import Selected Content */
        $data_file = file_require(dirname(__FILE__) . '/files/data/' . $param['template'] . '.xml');
        preg_match('/\\((.*?)\\)/', $param['template'], $slug_out);
        $home_slug = is_array($slug_out) && !empty($slug_out) ? $slug_out[0] : '';
        $home_slug = str_replace('$', '/', $home_slug);
        $home_slug = str_replace('(', '', $home_slug);
        $home_slug = str_replace(')', '', $home_slug);
        if (file_exists($data_file) && !empty($home_slug)) {
            $d = explode('/', $home_slug);
            $home_slug = isset($d[1]) ? $d[1] : $home_slug;
            $page_id_by_name = _get_page_by_name($home_slug);
            if ($page_id_by_name != '0') {
                wp_delete_post($page_id_by_name, true);
                $wp_import = new WP_Import();
                $wp_import->fetch_attachments = false;
                ob_start();
                set_time_limit(0);
                $wp_import->import($data_file);
                ob_end_clean();
                // Set Home Page
                update_option('show_on_front', 'page');
                update_option('page_on_front', $page_id_by_name);
            }
        }
        /*=== End Contents */
        /* Import Widgets */
        if (file_exists($widget_file_path)) {
            $get_widget_file = wp_remote_get($widget_file);
            $widget_body = $get_widget_file['body'];
            if (!empty($widget_body)) {
                require file_require(get_template_directory() . '/framework/addons/wordpress-importer' . '/widget-importer.php');
                if (base64_decode(trim($widget_body), true)) {
                    $data = unserialize(base64_decode(trim($widget_body)));
                } else {
                    $data = unserialize(trim($widget_body));
                }
                tt_widget_importer($data);
            }
        }
        /*=== End Widgets */
        /* Import Theme Option */
        if (isset($param['import_theme_options']) && $param['import_theme_options'] == '1') {
            if (file_exists($options_file_path)) {
                $get_options_file = wp_remote_get($options_file);
                $options_body = $get_options_file['body'];
                if (!empty($options_body)) {
                    $options_content = $options_body;
                    $smof_data = unserialize(base64_decode($options_content));
                    of_save_options($smof_data);
                    echo '<iframe src="' . admin_url() . 'admin-ajax.php?action=themeton_regenerate_css" style="width:0px;height:0px;visibility:hidden;"></iframe>';
                }
            }
        }
        /*=== End Theme Options */
        /* Revo Sliders */
        if (isset($param['import_revo_slider']) && $param['import_revo_slider'] == '1') {
            require file_require(get_template_directory() . '/framework/addons/wordpress-importer' . '/revo-importer.php');
            tt_revo_importer();
            if (class_exists('MSP_Importer')) {
                require file_require(get_template_directory() . '/framework/addons/wordpress-importer' . '/masterslide-import.php');
                $master_import = new MasterSliderImporter();
                $master_import->import_master_sliders();
            }
        }
        /*=== End Revo Sliders */
        /* Check Navigation Menu */
        $locations = get_theme_mod('nav_menu_locations');
        $menus = wp_get_nav_menus();
        $exist_nav = false;
        if (is_array($menus)) {
            foreach ($menus as $menu) {
                if ($menu->name == 'Main Menu') {
                    $locations['primary'] = $menu->term_id;
                    set_theme_mod('nav_menu_locations', $locations);
                    $exist_nav = true;
                }
            }
        }
        /* Import Main Contents */
        try {
            $main_file = file_require(dirname(__FILE__) . '/files/main-content.xml');
            if (file_exists($main_file) && !$exist_nav) {
                $wp_import = new WP_Import();
                $wp_import->fetch_attachments = false;
                ob_start();
                set_time_limit(0);
                $wp_import->import($main_file);
                ob_end_clean();
            }
        } catch (Exception $e) {
        }
        /*=== End Main Contents */
        /* Import Navigation */
        $locations = get_theme_mod('nav_menu_locations');
        $menus = wp_get_nav_menus();
        $exist_nav = false;
        if (is_array($menus)) {
            foreach ($menus as $menu) {
                if ($menu->name == 'Main Menu') {
                    $locations['primary'] = $menu->term_id;
                    set_theme_mod('nav_menu_locations', $locations);
                    $exist_nav = true;
                }
            }
        }
        if (!$exist_nav) {
            if (file_exists($nav_file_path)) {
                $get_nav_file = wp_remote_get($nav_file);
                $nav_body = $get_nav_file['body'];
                if (!empty($nav_body)) {
                    /* Import Navigation Content */
                    $wp_import = new WP_Import();
                    $wp_import->fetch_attachments = true;
                    ob_start();
                    $wp_import->import($nav_file_path);
                    ob_end_clean();
                    /* Set Main Navigation */
                    $locations = get_theme_mod('nav_menu_locations');
                    $menus = wp_get_nav_menus();
                    if (is_array($menus)) {
                        foreach ($menus as $menu) {
                            if ($menu->name == 'Main Menu') {
                                $locations['primary'] = $menu->term_id;
                            }
                        }
                    }
                    set_theme_mod('nav_menu_locations', $locations);
                    /*=== End Main Navigation */
                }
            }
        }
        /*=== End Navigation */
        //wp_redirect( admin_url( 'admin.php?page=theme-options-importer&msg=success' ) );
    }
}
Ejemplo n.º 16
0
function us_demo_import_options()
{
    global $us_template_directory;
    $config = us_config('demo-import');
    //select which files to import
    $aviable_demos = array_keys($config);
    $demo_version = $aviable_demos[0];
    if (in_array($_POST['demo'], $aviable_demos)) {
        $demo_version = $_POST['demo'];
    }
    $smof_data = unserialize(base64_decode(file_get_contents($us_template_directory . '/demo-import/' . $demo_version . '-options.txt')));
    //100% safe - ignore theme check nag
    of_save_options($smof_data);
    us_save_styles($smof_data);
    wp_send_json_success();
}
Ejemplo n.º 17
0
function getbowtied_demo_importer()
{
    global $wpdb, $getbowtied_settings;
    if (current_user_can('manage_options')) {
        if (!defined('WP_LOAD_IMPORTERS')) {
            define('WP_LOAD_IMPORTERS', true);
        }
        // we are loading importers
        if (!class_exists('WP_Importer')) {
            // if main importer class doesn't exist
            include ABSPATH . 'wp-admin/includes/class-wp-importer.php';
        }
        if (!class_exists('WP_Import')) {
            // if WP importer doesn't exist
            include get_template_directory() . '/backend/functions/wordpress-importer/wordpress-importer.php';
        }
        if (class_exists('WP_Importer') && class_exists('WP_Import')) {
            // check for main import class and wp import class
            $demo_type = $_POST['demo_type'];
            if (THEME_SLUG == 'the_retailer') {
                switch ($demo_type) {
                    default:
                        // reading settings
                        $homepage_title = 'Home V1 - Ecommerce';
                        $blog_title = 'Blog';
                }
            } else {
                if (THEME_SLUG == 'shopkeeper') {
                    switch ($demo_type) {
                        default:
                            // reading settings
                            $homepage_title = 'Home V1 — Full-screen Slider';
                            $blog_title = 'FASHION REPORT';
                    }
                } else {
                    if (THEME_SLUG == 'mr_tailor') {
                        switch ($demo_type) {
                            default:
                                // reading settings
                                $homepage_title = 'Home V1';
                                $blog_title = 'Blog';
                        }
                    } else {
                    }
                }
            }
            add_filter('intermediate_image_sizes_advanced', 'getbowtied_filter_image_sizes');
            if (!is_dir(get_home_path() . '/wp-content/uploads/demos/')) {
                mkdir(get_home_path() . '/wp-content/uploads/demos/');
            }
            /* 
             ** Download and save GZ file
             */
            $theme_demo_xml_file_url = $getbowtied_settings['demo_xml_file_url'];
            $theme_demo_xml_file = get_home_path() . '/wp-content/uploads/demos/demo.gz';
            $remote = gzopen($theme_demo_xml_file_url, "rb");
            $home = fopen($theme_demo_xml_file, "w");
            while ($string = gzread($remote, 4096)) {
                fwrite($home, $string, strlen($string));
            }
            gzclose($remote);
            fclose($home);
            /*
             ** Download and save Theme Options .txt file
             */
            $theme_options_file_url = $getbowtied_settings['options_file_url'];
            $rsp = wp_remote_get($theme_options_file_url);
            $file = $rsp['body'];
            $theme_options_file = get_home_path() . '/wp-content/uploads/demos/theme_options.txt';
            $fp = fopen($theme_options_file, "w");
            fwrite($fp, $file);
            fclose($fp);
            $importer = new WP_Import();
            $importer->fetch_attachments = true;
            ob_start();
            $importer->import($theme_demo_xml_file);
            ob_end_clean();
            if (class_exists('Woocommerce')) {
                $woopages = array('woocommerce_shop_page_id' => 'Shop', 'woocommerce_cart_page_id' => 'Cart', 'woocommerce_checkout_page_id' => 'Checkout', 'woocommerce_myaccount_page_id' => 'My Account');
                foreach ($woopages as $woo_page_name => $woo_page_title) {
                    $woopage = get_page_by_title($woo_page_title);
                    if (isset($woopage) && $woopage->ID) {
                        update_option($woo_page_name, $woopage->ID);
                        // Front Page
                    }
                }
                // We no longer need to install pages
                //delete_option( '_wc_needs_pages' );
                //delete_transient( '_wc_activation_redirect' );
                // Flush rules after install
                flush_rewrite_rules();
            }
            // Set imported menus to registered theme locations
            $locations = get_theme_mod('nav_menu_locations');
            // registered menu locations in theme
            $menus = wp_get_nav_menus();
            // registered menus
            if ($menus) {
                foreach ($menus as $menu) {
                    // assign menus to theme locations
                    if (THEME_SLUG == 'the_retailer') {
                        if ($demo_type == 'default') {
                            if ($menu->name == 'Main Navigation') {
                                $locations['primary'] = $menu->term_id;
                            } else {
                                if ($menu->name == 'Secondary Navigation') {
                                    $locations['secondary'] = $menu->term_id;
                                }
                            }
                        }
                    } else {
                        if (THEME_SLUG == 'shopkeeper') {
                            if ($demo_type == 'default') {
                                if ($menu->name == 'Main Navigation') {
                                    $locations['main-navigation'] = $menu->term_id;
                                }
                            }
                        } else {
                            if (THEME_SLUG == 'mr_tailor') {
                                if ($demo_type == 'default') {
                                    if ($menu->name == 'Main Navigation') {
                                        $locations['main-navigation'] = $menu->term_id;
                                    } else {
                                        if ($menu->name == 'Top Bar Menu') {
                                            $locations['top-bar-navigation'] = $menu->term_id;
                                        }
                                    }
                                }
                            } else {
                            }
                        }
                    }
                }
            }
            // Import Theme Options
            if (THEME_SLUG == 'the_retailer') {
                $theme_options_txt = $theme_options_file;
                // theme options data file
                $theme_options_txt = file_get_contents($theme_options_txt);
                $imported_smof_data = unserialize(base64_decode($theme_options_txt));
                of_save_options($imported_smof_data);
            } else {
                $file_contents = file_get_contents($theme_options_file);
                $options = json_decode($file_contents, true);
                $redux = ReduxFrameworkInstances::get_instance(THEME_SLUG . '_theme_options');
                $redux->set_options($options);
            }
            unlink($theme_options_file);
            unlink($theme_demo_xml_file);
            // Set reading options
            $homepage = get_page_by_title($homepage_title);
            $blog = get_page_by_title($blog_title);
            //echo "Homepage: " . $homepage->ID;
            //echo "Blog: " . $blog->ID;
            if (isset($homepage) && $homepage->ID) {
                update_option('show_on_front', 'page');
                update_option('page_on_front', $homepage->ID);
                // Front Page
                update_option('page_for_posts', $blog->ID);
                // Posts Page
            }
            set_theme_mod('nav_menu_locations', $locations);
            // set menus to locations
            echo 'imported';
            exit;
        }
    }
}
Ejemplo n.º 18
0
 function us_demo_import_options()
 {
     //select which files to import
     //		$aviable_demos = array ('demo1', 'demo2',);
     //		$demo_version = 'demo1';
     //		if (in_array($_POST['demo'], $aviable_demos)) {
     //			$demo_version = $_POST['demo'];
     //		}
     $smof_data = unserialize(base64_decode(file_get_contents(get_template_directory() . '/xml/options.txt')));
     //100% safe - ignore theme check nag
     of_save_options($smof_data);
     us_save_styles($smof_data);
     echo 'ok';
     die;
 }
 /**
  * Process options data and build option fields
  *
  * @uses get_theme_mod()
  *
  * @access public
  * @since 1.0.0
  *
  * @return array
  */
 public static function optionsframework_machine($options)
 {
     global $smof_output, $smof_details;
     if (empty($options)) {
         return;
     }
     $smof_data = of_get_options();
     foreach ($options as $key => $option) {
         if (!isset($option['id']) || empty($option['id'])) {
             continue;
         }
         $option = self::sanitize_option($option);
         $smof_details[$option['id']] = $option;
         if (!isset($smof_data[$option['id']])) {
             of_save_options($option['std'], $option['id']);
             $options[$key] = $option;
             $smof_data[$option['id']] = $option['std'];
         }
     }
     $data = $smof_data;
     $defaults = array();
     $counter = 0;
     $menu = '';
     $output = '';
     do_action('optionsframework_machine_before', array('options' => $options, 'smof_data' => $smof_data));
     $output .= $smof_output;
     foreach ($options as $value) {
         // sanitize option
         $value = self::sanitize_option($value);
         $counter++;
         $val = '';
         //create array of defaults
         if ($value['type'] == 'multicheck') {
             if (is_array($value['std'])) {
                 foreach ($value['std'] as $i => $key) {
                     $defaults[$value['id']][$key] = true;
                 }
             } else {
                 $defaults[$value['id']][$value['std']] = true;
             }
         } else {
             if (isset($value['id'])) {
                 $defaults[$value['id']] = $value['std'];
             }
         }
         /* condition start */
         if (!empty($smof_data) || !empty($data)) {
             //Start Heading
             if ($value['type'] != "heading") {
                 $class = '';
                 if (isset($value['class'])) {
                     $class = $value['class'];
                 }
                 //hide items in checkbox group
                 $fold = '';
                 if (array_key_exists("fold", $value)) {
                     if (isset($smof_data[$value['fold']]) && $smof_data[$value['fold']]) {
                         $fold = "f_" . $value['fold'] . " ";
                     } else {
                         $fold = "f_" . $value['fold'] . " temphide ";
                     }
                 }
                 $output .= '<div id="section-' . $value['id'] . '" class="' . $fold . 'section section-' . $value['type'] . ' ' . $class . '">' . "\n";
                 //only show header if 'name' value exists
                 if ($value['name']) {
                     $output .= '<h3 class="heading">' . $value['name'] . '</h3>' . "\n";
                 }
                 $output .= '<div class="option">' . "\n" . '<div class="controls">' . "\n";
             }
             //End Heading
             //if (!isset($smof_data[$value['id']]) && $value['type'] != "heading")
             //	continue;
             //switch statement to handle various options type
             switch ($value['type']) {
                 //text input
                 case 'text':
                     $t_value = '';
                     $t_value = stripslashes($smof_data[$value['id']]);
                     $mini = '';
                     if (!isset($value['mod'])) {
                         $value['mod'] = '';
                     }
                     if ($value['mod'] == 'mini') {
                         $mini = 'mini';
                     }
                     $output .= '<input class="of-input ' . $mini . '" name="' . $value['id'] . '" id="' . $value['id'] . '" type="' . $value['type'] . '" value="' . $t_value . '" />';
                     break;
                     //select option
                 //select option
                 case 'select':
                     $mini = '';
                     if (!isset($value['mod'])) {
                         $value['mod'] = '';
                     }
                     if ($value['mod'] == 'mini') {
                         $mini = 'mini';
                     }
                     $output .= '<div class="select_wrapper ' . $mini . '">';
                     $output .= '<select class="select of-input" name="' . $value['id'] . '" id="' . $value['id'] . '">';
                     foreach ($value['options'] as $select_ID => $option) {
                         $theValue = $option;
                         if (!is_numeric($select_ID)) {
                             $theValue = $select_ID;
                         }
                         $output .= '<option id="' . $select_ID . '" value="' . $theValue . '" ' . selected($smof_data[$value['id']], $theValue, false) . ' />' . $option . '</option>';
                     }
                     $output .= '</select></div>';
                     break;
                     //textarea option
                 //textarea option
                 case 'textarea':
                     $cols = '8';
                     $ta_value = '';
                     if (isset($value['options'])) {
                         $ta_options = $value['options'];
                         if (isset($ta_options['cols'])) {
                             $cols = $ta_options['cols'];
                         }
                     }
                     $ta_value = stripslashes($smof_data[$value['id']]);
                     $output .= '<textarea class="of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" cols="' . $cols . '" rows="8">' . $ta_value . '</textarea>';
                     break;
                     //radiobox option
                 //radiobox option
                 case "radio":
                     $checked = isset($smof_data[$value['id']]) ? checked($smof_data[$value['id']], $option, false) : '';
                     foreach ($value['options'] as $option => $name) {
                         $output .= '<input class="of-input of-radio" name="' . $value['id'] . '" type="radio" value="' . $option . '" ' . checked($smof_data[$value['id']], $option, false) . ' /><label class="radio">' . $name . '</label><br/>';
                     }
                     break;
                     //checkbox option
                 //checkbox option
                 case 'checkbox':
                     if (!isset($smof_data[$value['id']])) {
                         $smof_data[$value['id']] = 0;
                     }
                     $fold = '';
                     if (array_key_exists("folds", $value)) {
                         $fold = "fld ";
                     }
                     $output .= '<input type="hidden" class="' . $fold . 'checkbox of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" value="0"/>';
                     $output .= '<input type="checkbox" class="' . $fold . 'checkbox of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" value="1" ' . checked($smof_data[$value['id']], 1, false) . ' />';
                     break;
                     //multiple checkbox option
                 //multiple checkbox option
                 case 'multicheck':
                     isset($smof_data[$value['id']]) ? $multi_stored = $smof_data[$value['id']] : ($multi_stored = "");
                     foreach ($value['options'] as $key => $option) {
                         if (!isset($multi_stored[$key])) {
                             $multi_stored[$key] = '';
                         }
                         $of_key_string = $value['id'] . '_' . $key;
                         $output .= '<input type="checkbox" class="checkbox of-input" name="' . $value['id'] . '[' . $key . ']' . '" id="' . $of_key_string . '" value="1" ' . checked($multi_stored[$key], 1, false) . ' /><label class="multicheck" for="' . $of_key_string . '">' . $option . '</label><br />';
                     }
                     break;
                     // Color picker
                 // Color picker
                 case "color":
                     $default_color = '';
                     if (isset($value['std'])) {
                         if ($smof_data[$value['id']] != $value['std']) {
                             $default_color = ' data-default-color="' . $value['std'] . '" ';
                         }
                     }
                     $output .= '<input name="' . $value['id'] . '" id="' . $value['id'] . '" class="of-color"  type="text" value="' . $smof_data[$value['id']] . '"' . $default_color . ' />';
                     break;
                     //typography option
                 //typography option
                 case 'typography':
                     $typography_stored = isset($smof_data[$value['id']]) ? $smof_data[$value['id']] : $value['std'];
                     /* Font Size */
                     if (isset($typography_stored['size'])) {
                         $output .= '<div class="select_wrapper typography-size" original-title="Font size">';
                         $output .= '<select class="of-typography of-typography-size select" name="' . $value['id'] . '[size]" id="' . $value['id'] . '_size">';
                         for ($i = 9; $i < 80; $i++) {
                             $test = $i . 'px';
                             $output .= '<option value="' . $i . 'px" ' . selected($typography_stored['size'], $test, false) . '>' . $i . 'px</option>';
                         }
                         $output .= '</select></div>';
                     }
                     /* Line Height */
                     if (isset($typography_stored['height'])) {
                         $output .= '<div class="select_wrapper typography-height" original-title="Line height">';
                         $output .= '<select class="of-typography of-typography-height select" name="' . $value['id'] . '[height]" id="' . $value['id'] . '_height">';
                         for ($i = 20; $i < 80; $i++) {
                             $test = $i . 'px';
                             $output .= '<option value="' . $i . 'px" ' . selected($typography_stored['height'], $test, false) . '>' . $i . 'px</option>';
                         }
                         $output .= '</select></div>';
                     }
                     /* Font Face */
                     if (isset($typography_stored['face'])) {
                         $output .= '<div class="select_wrapper typography-face" original-title="Font family">';
                         $output .= '<select class="of-typography of-typography-face select" name="' . $value['id'] . '[face]" id="' . $value['id'] . '_face">';
                         $faces = array("ABeeZee" => "ABeeZee", "Abel" => "Abel", "Abril Fatface" => "Abril Fatface", "Aclonica" => "Aclonica", "Acme" => "Acme", "Actor" => "Actor", "Adamina" => "Adamina", "Advent Pro" => "Advent Pro", "Aguafina Script" => "Aguafina Script", "Akronim" => "Akronim", "Aladin" => "Aladin", "Aldrich" => "Aldrich", "Alegreya" => "Alegreya", "Alegreya SC" => "Alegreya SC", "Alex Brush" => "Alex Brush", "Alfa Slab One" => "Alfa Slab One", "Alice" => "Alice", "Alike" => "Alike", "Alike Angular" => "Alike Angular", "Allan" => "Allan", "Allerta" => "Allerta", "Allerta Stencil" => "Allerta Stencil", "Allura" => "Allura", "Almendra" => "Almendra", "Almendra Display" => "Almendra Display", "Almendra SC" => "Almendra SC", "Amarante" => "Amarante", "Amaranth" => "Amaranth", "Amatic SC" => "Amatic SC", "Amethysta" => "Amethysta", "Anaheim" => "Anaheim", "Andada" => "Andada", "Andika" => "Andika", "Angkor" => "Angkor", "Annie Use Your Telescope" => "Annie Use Your Telescope", "Anonymous Pro" => "Anonymous Pro", "Antic" => "Antic", "Antic Didone" => "Antic Didone", "Antic Slab" => "Antic Slab", "Anton" => "Anton", "Arapey" => "Arapey", "Arbutus" => "Arbutus", "Arbutus Slab" => "Arbutus Slab", "Architects Daughter" => "Architects Daughter", "Archivo Black" => "Archivo Black", "Archivo Narrow" => "Archivo Narrow", "Arimo" => "Arimo", "Arizonia" => "Arizonia", "Armata" => "Armata", "Artifika" => "Artifika", "Arvo" => "Arvo", "Asap" => "Asap", "Asset" => "Asset", "Astloch" => "Astloch", "Asul" => "Asul", "Atomic Age" => "Atomic Age", "Aubrey" => "Aubrey", "Audiowide" => "Audiowide", "Autour One" => "Autour One", "Average" => "Average", "Average Sans" => "Average Sans", "Averia Gruesa Libre" => "Averia Gruesa Libre", "Averia Libre" => "Averia Libre", "Averia Sans Libre" => "Averia Sans Libre", "Averia Serif Libre" => "Averia Serif Libre", "Bad Script" => "Bad Script", "Balthazar" => "Balthazar", "Bangers" => "Bangers", "Basic" => "Basic", "BenchNine" => "BenchNine", "Battambang" => "Battambang", "Baumans" => "Baumans", "Bayon" => "Bayon", "Belgrano" => "Belgrano", "Belleza" => "Belleza", "Bentham" => "Bentham", "Berkshire Swash" => "Berkshire Swash", "Bevan" => "Bevan", "Bigelow Rules" => "Bigelow Rules", "Bigshot One" => "Bigshot One", "Bilbo" => "Bilbo", "Bilbo Swash Caps" => "Bilbo Swash Caps", "Bitter" => "Bitter", "Black Ops One" => "Black Ops One", "Bonbon" => "Bonbon", "Boogaloo" => "Boogaloo", "Bowlby One" => "Bowlby One", "Bowlby One SC" => "Bowlby One SC", "Brawler" => "Brawler", "Bree Serif" => "Bree Serif", "Bubblegum Sans" => "Bubblegum Sans", "Buda" => "Buda", "Buenard" => "Buenard", "Butcherman" => "Butcherman", "Butterfly Kids" => "Butterfly Kids", "Cabin" => "Cabin", "Cabin Condensed" => "Cabin Condensed", "Cabin Sketch" => "Cabin Sketch", "Caesar Dressing" => "Caesar Dressing", "Cagliostro" => "Cagliostro", "Calligraffitti" => "Calligraffitti", "Cambo" => "Cambo", "Candal" => "Candal", "Cantarell" => "Cantarell", "Cantata One" => "Cantata One", "Capriola" => "Capriola", "Cardo" => "Cardo", "Carme" => "Carme", "Carrois Gothic" => "Carrois Gothic", "Carrois Gothic SC" => "Carrois Gothic SC", "Carter One" => "Carter One", "Caudex" => "Caudex", "Cedarville Cursive" => "Cedarville Cursive", "Ceviche One" => "Ceviche One", "Changa One" => "Changa One", "Chango" => "Chango", "Chau Philomene One" => "Chau Philomene One", "Chela One" => "Chela One", "Chelsea Market" => "Chelsea Market", "Cherry Cream Soda" => "Cherry Cream Soda", "Cherry Swash" => "Cherry Swash", "Chewy" => "Chewy", "Chicle" => "Chicle", "Chivo" => "Chivo", "Cinzel" => "Cinzel", "Cinzel Decorative" => "Cinzel Decorative", "Clicker Script" => "Clicker Script", "Coda" => "Coda", "Coda Caption" => "Coda Caption", "Codystar" => "Codystar", "Combo" => "Combo", "Comfortaa" => "Comfortaa", "Coming Soon" => "Coming Soon", "Concert One" => "Concert One", "Condiment" => "Condiment", "Contrail One" => "Contrail One", "Convergence" => "Convergence", "Cookie" => "Cookie", "Copse" => "Copse", "Corben" => "Corben", "Courgette" => "Courgette", "Cousine" => "Cousine", "Coustard" => "Coustard", "Covered By Your Grace" => "Covered By Your Grace", "Crafty Girls" => "Crafty Girls", "Creepster" => "Creepster", "Crete Round" => "Crete Round", "Crimson Text" => "Crimson Text", "Croissant One" => "Croissant One", "Crushed" => "Crushed", "Cuprum" => "Cuprum", "Cutive" => "Cutive", "Cutive Mono" => "Cutive Mono", "Damion" => "Damion", "Dancing Script" => "Dancing Script", "Dawning of a New Day" => "Dawning of a New Day", "Days One" => "Days One", "Delius" => "Delius", "Delius Swash Caps" => "Delius Swash Caps", "Delius Unicase" => "Delius Unicase", "Della Respira" => "Della Respira", "Denk One" => "Denk One", "Devonshire" => "Devonshire", "Didact Gothic" => "Didact Gothic", "Diplomata" => "Diplomata", "Diplomata SC" => "Diplomata SC", "Domine" => "Domine", "Donegal One" => "Donegal One", "Doppio One" => "Doppio One", "Dorsa" => "Dorsa", "Dosis" => "Dosis", "Dr Sugiyama" => "Dr Sugiyama", "Droid Sans" => "Droid Sans", "Droid Sans Mono" => "Droid Sans Mono", "Droid Serif" => "Droid Serif", "Duru Sans" => "Duru Sans", "Dynalight" => "Dynalight", "EB Garamond" => "EB Garamond", "Eagle Lake" => "Eagle Lake", "Eater" => "Eater", "Economica" => "Economica", "Electrolize" => "Electrolize", "Elsie" => "Elsie", "Elsie Swash Caps" => "Elsie Swash Caps", "Emblema One" => "Emblema One", "Emilys Candy" => "Emilys Candy", "Engagement" => "Engagement", "Englebert" => "Englebert", "Enriqueta" => "Enriqueta", "Erica One" => "Erica One", "Esteban" => "Esteban", "Euphoria Script" => "Euphoria Script", "Ewert" => "Ewert", "Exo" => "Exo", "Expletus Sans" => "Expletus Sans", "Fanwood Text" => "Fanwood Text", "Fascinate" => "Fascinate", "Fascinate Inline" => "Fascinate Inline", "Faster One" => "Faster One", "Federant" => "Federant", "Federo" => "Federo", "Felipa" => "Felipa", "Fenix" => "Fenix", "Finger Paint" => "Finger Paint", "Fjalla One" => "Fjalla One", "Fjord One" => "Fjord One", "Flamenco" => "Flamenco", "Flavors" => "Flavors", "Fondamento" => "Fondamento", "Fontdiner Swanky" => "Fontdiner Swanky", "Forum" => "Forum", "Francois One" => "Francois One", "Fredericka the Great" => "Fredericka the Great", "Fredoka One" => "Fredoka One", "Fresca" => "Fresca", "Frijole" => "Frijole", "Fruktur" => "Fruktur", "Fugaz One" => "Fugaz One", "Gabriela" => "Gabriela", "Gafata" => "Gafata", "Galdeano" => "Galdeano", "Galindo" => "Galindo", "Gentium Basic" => "Gentium Basic", "Gentium Book Basic" => "Gentium Book Basic", "Geo" => "Geo", "Geostar" => "Geostar", "Geostar Fill" => "Geostar Fill", "Germania One" => "Germania One", "Gilda Display" => "Gilda Display", "Give You Glory" => "Give You Glory", "Glass Antiqua" => "Glass Antiqua", "Glegoo" => "Glegoo", "Gloria Hallelujah" => "Gloria Hallelujah", "Goblin One" => "Goblin One", "Gochi Hand" => "Gochi Hand", "Gorditas" => "Gorditas", "Goudy Bookletter 1911" => "Goudy Bookletter 1911", "Graduate" => "Graduate", "Grand Hotel" => "Grand Hotel", "Gravitas One" => "Gravitas One", "Great Vibes" => "Great Vibes", "Griffy" => "Griffy", "Gruppo" => "Gruppo", "Gudea" => "Gudea", "Habibi" => "Habibi", "Hammersmith One" => "Hammersmith One", "Hanalei" => "Hanalei", "Hanalei Fill" => "Hanalei Fill", "Handlee" => "Handlee", "Happy Monkey" => "Happy Monkey", "Headland One" => "Headland One", "Henny Penny" => "Henny Penny", "Herr Von Muellerhoff" => "Herr Von Muellerhoff", "Holtwood One SC" => "Holtwood One SC", "Homemade Apple" => "Homemade Apple", "Homenaje" => "Homenaje", "IM Fell DW Pica" => "IM Fell DW Pica", "IM Fell DW Pica SC" => "IM Fell DW Pica SC", "IM Fell Double Pica" => "IM Fell Double Pica", "IM Fell Double Pica SC" => "IM Fell Double Pica SC", "IM Fell English" => "IM Fell English", "IM Fell English SC" => "IM Fell English SC", "IM Fell French Canon" => "IM Fell French Canon", "IM Fell French Canon SC" => "IM Fell French Canon SC", "IM Fell Great Primer" => "IM Fell Great Primer", "IM Fell Great Primer SC" => "IM Fell Great Primer SC", "Iceberg" => "Iceberg", "Iceland" => "Iceland", "Imprima" => "Imprima", "Inconsolata" => "Inconsolata", "Inder" => "Inder", "Indie Flower" => "Indie Flower", "Inika" => "Inika", "Irish Grover" => "Irish Grover", "Istok Web" => "Istok Web", "Italiana" => "Italiana", "Italianno" => "Italianno", "Jacques Francois Shadow" => "Jacques Francois Shadow", "Jim Nightshade" => "Jim Nightshade", "Jockey One" => "Jockey One", "Jolly Lodger" => "Jolly Lodger", "Josefin Sans" => "Josefin Sans", "Josefin Slab" => "Josefin Slab", "Joti One" => "Joti One", "Judson" => "Judson", "Julee" => "Julee", "Julius Sans One" => "Julius Sans One", "Junge" => "Junge", "Jura" => "Jura", "Just Another Hand" => "Just Another Hand", "Just Me Again Down Here" => "Just Me Again Down Here", "Kameron" => "Kameron", "Karla" => "Karla", "Kaushan Script" => "Kaushan Script", "Kavoon" => "Kavoon", "Keania One" => "Keania One", "Kelly Slab" => "Kelly Slab", "Kenia" => "Kenia", "Kite One" => "Kite One", "Knewave" => "Knewave", "Kotta One" => "Kotta One", "Kranky" => "Kranky", "Kreon" => "Kreon", "Kristi" => "Kristi", "Krona One" => "Krona One", "La Belle Aurore" => "La Belle Aurore", "Lancelot" => "Lancelot", "Lato" => "Lato", "League Script" => "League Script", "Leckerli One" => "Leckerli One", "Ledger" => "Ledger", "Lekton" => "Lekton", "Lemon" => "Lemon", "Libre Baskerville" => "Libre Baskerville", "Life Savers" => "Life Savers", "Lilita One" => "Lilita One", "Limelight" => "Limelight", "Linden Hill" => "Linden Hill", "Lobster" => "Lobster", "Lobster Two" => "Lobster Two", "Londrina Outline" => "Londrina Outline", "Londrina Shadow" => "Londrina Shadow", "Londrina Sketch" => "Londrina Sketch", "Londrina Solid" => "Londrina Solid", "Lora" => "Lora", "Love Ya Like A Sister" => "Love Ya Like A Sister", "Loved by the King" => "Loved by the King", "Lovers Quarrel" => "Lovers Quarrel", "Luckiest Guy" => "Luckiest Guy", "Lusitana" => "Lusitana", "Lustria" => "Lustria", "Macondo" => "Macondo", "Macondo Swash Caps" => "Macondo Swash Caps", "Magra" => "Magra", "Maiden Orange" => "Maiden Orange", "Mako" => "Mako", "Marcellus" => "Marcellus", "Marcellus SC" => "Marcellus SC", "Marck Script" => "Marck Script", "Margarine" => "Margarine", "Marko One" => "Marko One", "Marmelad" => "Marmelad", "Marvel" => "Marvel", "Mate" => "Mate", "Mate SC" => "Mate SC", "Maven Pro" => "Maven Pro", "McLaren" => "McLaren", "Meddon" => "Meddon", "MedievalSharp" => "MedievalSharp", "Medula One" => "Medula One", "Megrim" => "Megrim", "Meie Script" => "Meie Script", "Merienda" => "Merienda", "Merienda One" => "Merienda One", "Merriweather" => "Merriweather", "Merriweather Sans" => "Merriweather Sans", "Metal Mania" => "Metal Mania", "Metamorphous" => "Metamorphous", "Metrophobic" => "Metrophobic", "Michroma" => "Michroma", "Milonga" => "Milonga", "Miltonian" => "Miltonian", "Miltonian Tattoo" => "Miltonian Tattoo", "Miniver" => "Miniver", "Miss Fajardose" => "Miss Fajardose", "Modern Antiqua" => "Modern Antiqua", "Molengo" => "Molengo", "Molle" => "Molle", "Monda" => "Monda", "Monofett" => "Monofett", "Monoton" => "Monoton", "Monsieur La Doulaise" => "Monsieur La Doulaise", "Montaga" => "Montaga", "Montez" => "Montez", "Montserrat" => "Montserrat", "Montserrat Alternates" => "Montserrat Alternates", "Montserrat Subrayada" => "Montserrat Subrayada", "Mountains of Christmas" => "Mountains of Christmas", "Mouse Memoirs" => "Mouse Memoirs", "Mr Bedfort" => "Mr Bedfort", "Mr Dafoe" => "Mr Dafoe", "Mr De Haviland" => "Mr De Haviland", "Mrs Saint Delafield" => "Mrs Saint Delafield", "Mrs Sheppards" => "Mrs Sheppards", "Muli" => "Muli", "Mystery Quest" => "Mystery Quest", "Neucha" => "Neucha", "Neuton" => "Neuton", "New Rocker" => "New Rocker", "News Cycle" => "News Cycle", "Niconne" => "Niconne", "Nixie One" => "Nixie One", "Nobile" => "Nobile", "Norican" => "Norican", "Nosifer" => "Nosifer", "Nothing You Could Do" => "Nothing You Could Do", "Noticia Text" => "Noticia Text", "Nova Cut" => "Nova Cut", "Nova Flat" => "Nova Flat", "Nova Mono" => "Nova Mono", "Nova Oval" => "Nova Oval", "Nova Round" => "Nova Round", "Nova Script" => "Nova Script", "Nova Slim" => "Nova Slim", "Nova Square" => "Nova Square", "Numans" => "Numans", "Nunito" => "Nunito", "Offside" => "Offside", "Old Standard TT" => "Old Standard TT", "Oldenburg" => "Oldenburg", "Oleo Script" => "Oleo Script", "Oleo Script Swash Caps" => "Oleo Script Swash Caps", "Open Sans" => "Open Sans", "Open Sans Condensed" => "Open Sans Condensed", "Oranienbaum" => "Oranienbaum", "Orbitron" => "Orbitron", "Oregano" => "Oregano", "Orienta" => "Orienta", "Original Surfer" => "Original Surfer", "Oswald" => "Oswald", "Over the Rainbow" => "Over the Rainbow", "Overlock" => "Overlock", "Overlock SC" => "Overlock SC", "Ovo" => "Ovo", "Oxygen" => "Oxygen", "PT Mono" => "PT Mono", "PT Sans" => "PT Sans", "PT Sans Caption" => "PT Sans Caption", "PT Sans Narrow" => "PT Sans Narrow", "PT Serif" => "PT Serif", "PT Serif Caption" => "PT Serif Caption", "Pacifico" => "Pacifico", "Paprika" => "Paprika", "Parisienne" => "Parisienne", "Passero One" => "Passero One", "Passion One" => "Passion One", "Patrick Hand" => "Patrick Hand", "Patrick Hand SC" => "Patrick Hand SC", "Patua One" => "Patua One", "Paytone One" => "Paytone One", "Peralta" => "Peralta", "Permanent Marker" => "Permanent Marker", "Petrona" => "Petrona", "Philosopher" => "Philosopher", "Piedra" => "Piedra", "Pinyon Script" => "Pinyon Script", "Pirata One" => "Pirata One", "Plaster" => "Plaster", "Play" => "Play", "Playball" => "Playball", "Playfair Display" => "Playfair Display", "Playfair Display SC" => "Playfair Display SC", "Podkova" => "Podkova", "Poiret One" => "Poiret One", "Poller One" => "Poller One", "Poly" => "Poly", "Pompiere" => "Pompiere", "Pontano Sans" => "Pontano Sans", "Port Lligat Sans" => "Port Lligat Sans", "Port Lligat Slab" => "Port Lligat Slab", "Prata" => "Prata", "Press Start 2P" => "Press Start 2P", "Princess Sofia" => "Princess Sofia", "Prociono" => "Prociono", "Prosto One" => "Prosto One", "Puritan" => "Puritan", "Quando" => "Quando", "Quantico" => "Quantico", "Quattrocento" => "Quattrocento", "Quattrocento Sans" => "Quattrocento Sans", "Questrial" => "Questrial", "Quicksand" => "Quicksand", "Quintessential" => "Quintessential", "Qwigley" => "Qwigley", "Racing Sans One" => "Racing Sans One", "Radley" => "Radley", "Raleway" => "Raleway", "Raleway Dots" => "Raleway Dots", "Rambla" => "Rambla", "Rammetto One" => "Rammetto One", "Ranchers" => "Ranchers", "Rancho" => "Rancho", "Rationale" => "Rationale", "Redressed" => "Redressed", "Reenie Beanie" => "Reenie Beanie", "Revalia" => "Revalia", "Ribeye" => "Ribeye", "Ribeye Marrow" => "Ribeye Marrow", "Righteous" => "Righteous", "Risque" => "Risque", "Roboto" => "Roboto", "Roboto Condensed" => "Roboto Condensed", "Rochester" => "Rochester", "Rock Salt" => "Rock Salt", "Rokkitt" => "Rokkitt", "Romanesco" => "Romanesco", "Ropa Sans" => "Ropa Sans", "Rosario" => "Rosario", "Rosarivo" => "Rosarivo", "Rouge Script" => "Rouge Script", "Ruda" => "Ruda", "Rufina" => "Rufina", "Ruge Boogie" => "Ruge Boogie", "Ruluko" => "Ruluko", "Rum Raisin" => "Rum Raisin", "Ruslan Display" => "Ruslan Display", "Russo One" => "Russo One", "Ruthie" => "Ruthie", "Rye" => "Rye", "Sacramento" => "Sacramento", "Sail" => "Sail", "Salsa" => "Salsa", "Sanchez" => "Sanchez", "Sancreek" => "Sancreek", "Sansita One" => "Sansita One", "Sarina" => "Sarina", "Satisfy" => "Satisfy", "Scada" => "Scada", "Schoolbell" => "Schoolbell", "Seaweed Script" => "Seaweed Script", "Sevillana" => "Sevillana", "Seymour One" => "Seymour One", "Shadows Into Light" => "Shadows Into Light", "Shadows Into Light Two" => "Shadows Into Light Two", "Shanti" => "Shanti", "Share" => "Share", "Share Tech" => "Share Tech", "Share Tech Mono" => "Share Tech Mono", "Shojumaru" => "Shojumaru", "Short Stack" => "Short Stack", "Sigmar One" => "Sigmar One", "Signika" => "Signika", "Signika Negative" => "Signika Negative", "Simonetta" => "Simonetta", "Sirin Stencil" => "Sirin Stencil", "Six Caps" => "Six Caps", "Slackey" => "Slackey", "Smokum" => "Smokum", "Smythe" => "Smythe", "Sniglet" => "Sniglet", "Snippet" => "Snippet", "Snowburst One" => "Snowburst One", "Sofadi One" => "Sofadi One", "Sofia" => "Sofia", "Sonsie One" => "Sonsie One", "Sorts Mill Goudy" => "Sorts Mill Goudy", "Source Code Pro" => "Source Code Pro", "Source Sans Pro" => "Source Sans Pro", "Special Elite" => "Special Elite", "Spicy Rice" => "Spicy Rice", "Spinnaker" => "Spinnaker", "Spirax" => "Spirax", "Squada One" => "Squada One", "Stalemate" => "Stalemate", "Stalinist One" => "Stalinist One", "Stardos Stencil" => "Stardos Stencil", "Stint Ultra Condensed" => "Stint Ultra Condensed", "Stint Ultra Expanded" => "Stint Ultra Expanded", "Stoke" => "Stoke", "Strait" => "Strait", "Sue Ellen Francisco" => "Sue Ellen Francisco", "Sunshiney" => "Sunshiney", "Supermercado One" => "Supermercado One", "Swanky and Moo Moo" => "Swanky and Moo Moo", "Syncopate" => "Syncopate", "Tangerine" => "Tangerine", "Tauri" => "Tauri", "Telex" => "Telex", "Tenor Sans" => "Tenor Sans", "The Girl Next Door" => "The Girl Next Door", "Tienne" => "Tienne", "Tinos" => "Tinos", "Titan One" => "Titan One", "Titillium Web" => "Titillium Web", "Trade Winds" => "Trade Winds", "Trocchi" => "Trocchi", "Trochut" => "Trochut", "Trykker" => "Trykker", "Tulpen One" => "Tulpen One", "Ubuntu" => "Ubuntu", "Ubuntu Condensed" => "Ubuntu Condensed", "Ubuntu Mono" => "Ubuntu Mono", "Ultra" => "Ultra", "Uncial Antiqua" => "Uncial Antiqua", "Underdog" => "Underdog", "Unica One" => "Unica One", "UnifrakturCook" => "UnifrakturCook", "UnifrakturMaguntia" => "UnifrakturMaguntia", "Unkempt" => "Unkempt", "Unlock" => "Unlock", "Unna" => "Unna", "VT323" => "VT323", "Vampiro One" => "Vampiro One", "Varela" => "Varela", "Varela Round" => "Varela Round", "Vast Shadow" => "Vast Shadow", "Vibur" => "Vibur", "Vidaloka" => "Vidaloka", "Viga" => "Viga", "Voces" => "Voces", "Volkhov" => "Volkhov", "Vollkorn" => "Vollkorn", "Voltaire" => "Voltaire", "Waiting for the Sunrise" => "Waiting for the Sunrise", "Wallpoet" => "Wallpoet", "Walter Turncoat" => "Walter Turncoat", "Warnes" => "Warnes", "Wellfleet" => "Wellfleet", "Wendy One" => "Wendy One", "Wire One" => "Wire One", "Yanone Kaffeesatz" => "Yanone Kaffeesatz", "Yellowtail" => "Yellowtail", "Yeseva One" => "Yeseva One", "Yesteryear" => "Yesteryear", "Zeyada" => "Zeyada");
                         foreach ($faces as $i => $face) {
                             $output .= '<option value="' . $i . '" ' . selected($typography_stored['face'], $i, false) . '>' . $face . '</option>';
                         }
                         $output .= '</select></div>';
                     }
                     /* Font Weight */
                     if (isset($typography_stored['style'])) {
                         $output .= '<div class="select_wrapper typography-style" original-title="Font style">';
                         $output .= '<select class="of-typography of-typography-style select" name="' . $value['id'] . '[style]" id="' . $value['id'] . '_style">';
                         $styles = array('normal' => 'Normal', 'italic' => 'Italic', 'bold' => 'Bold', 'bold italic' => 'Bold Italic');
                         foreach ($styles as $i => $style) {
                             $output .= '<option value="' . $i . '" ' . selected($typography_stored['style'], $i, false) . '>' . $style . '</option>';
                         }
                         $output .= '</select></div>';
                     }
                     /* Font Color */
                     if (isset($typography_stored['color'])) {
                         $output .= '<div id="' . $value['id'] . '_color_picker" class="colorSelector typography-color"><div style="background-color: ' . $typography_stored['color'] . '"></div></div>';
                         $output .= '<input class="of-color of-typography of-typography-color" original-title="Font color" name="' . $value['id'] . '[color]" id="' . $value['id'] . '_color" type="text" value="' . $typography_stored['color'] . '" />';
                     }
                     break;
                     //border option
                 //border option
                 case 'border':
                     /* Border Width */
                     $border_stored = $smof_data[$value['id']];
                     $output .= '<div class="select_wrapper border-width">';
                     $output .= '<select class="of-border of-border-width select" name="' . $value['id'] . '[width]" id="' . $value['id'] . '_width">';
                     for ($i = 0; $i < 21; $i++) {
                         $output .= '<option value="' . $i . '" ' . selected($border_stored['width'], $i, false) . '>' . $i . '</option>';
                     }
                     $output .= '</select></div>';
                     /* Border Style */
                     $output .= '<div class="select_wrapper border-style">';
                     $output .= '<select class="of-border of-border-style select" name="' . $value['id'] . '[style]" id="' . $value['id'] . '_style">';
                     $styles = array('none' => 'None', 'solid' => 'Solid', 'dashed' => 'Dashed', 'dotted' => 'Dotted');
                     foreach ($styles as $i => $style) {
                         $output .= '<option value="' . $i . '" ' . selected($border_stored['style'], $i, false) . '>' . $style . '</option>';
                     }
                     $output .= '</select></div>';
                     /* Border Color */
                     $output .= '<div id="' . $value['id'] . '_color_picker" class="colorSelector"><div style="background-color: ' . $border_stored['color'] . '"></div></div>';
                     $output .= '<input class="of-color of-border of-border-color" name="' . $value['id'] . '[color]" id="' . $value['id'] . '_color" type="text" value="' . $border_stored['color'] . '" />';
                     break;
                     //images checkbox - use image as checkboxes
                 //images checkbox - use image as checkboxes
                 case 'images':
                     $i = 0;
                     $select_value = isset($smof_data[$value['id']]) ? $smof_data[$value['id']] : '';
                     foreach ($value['options'] as $key => $option) {
                         $i++;
                         $checked = '';
                         $selected = '';
                         if (NULL != checked($select_value, $key, false)) {
                             $checked = checked($select_value, $key, false);
                             $selected = 'of-radio-img-selected';
                         }
                         $output .= '<span>';
                         $output .= '<input type="radio" id="of-radio-img-' . $value['id'] . $i . '" class="checkbox of-radio-img-radio" value="' . $key . '" name="' . $value['id'] . '" ' . $checked . ' />';
                         $output .= '<div class="of-radio-img-label">' . $key . '</div>';
                         $output .= '<img src="' . $option . '" alt="" class="of-radio-img-img ' . $selected . '" onClick="document.getElementById(\'of-radio-img-' . $value['id'] . $i . '\').checked = true;" />';
                         $output .= '</span>';
                     }
                     break;
                     //info (for small intro box etc)
                 //info (for small intro box etc)
                 case "info":
                     $info_text = $value['std'];
                     $output .= '<div class="of-info">' . $info_text . '</div>';
                     break;
                     //display a single image
                 //display a single image
                 case "image":
                     $src = $value['std'];
                     $output .= '<img src="' . $src . '">';
                     break;
                     //tab heading
                 //tab heading
                 case 'heading':
                     if ($counter >= 2) {
                         $output .= '</div>' . "\n";
                     }
                     //custom icon
                     $icon = '';
                     if (isset($value['icon'])) {
                         $icon = ' style="background-image: url(' . $value['icon'] . ');"';
                     }
                     $header_class = str_replace(' ', '', strtolower($value['name']));
                     $jquery_click_hook = str_replace(' ', '', strtolower($value['name']));
                     $jquery_click_hook = "of-option-" . trim(preg_replace('/ +/', '', preg_replace('/[^A-Za-z0-9 ]/', '', urldecode(html_entity_decode(strip_tags($jquery_click_hook))))));
                     $menu .= '<li class="' . $header_class . '"><a title="' . $value['name'] . '" href="#' . $jquery_click_hook . '"' . $icon . '>' . $value['name'] . '</a></li>';
                     $output .= '<div class="group" id="' . $jquery_click_hook . '"><h2>' . $value['name'] . '</h2>' . "\n";
                     break;
                     //drag & drop slide manager
                 //drag & drop slide manager
                 case 'slider':
                     $output .= '<div class="slider"><ul id="' . $value['id'] . '">';
                     $slides = $smof_data[$value['id']];
                     $count = count($slides);
                     if ($count < 2) {
                         $oldorder = 1;
                         $order = 1;
                         $output .= Options_Machine::optionsframework_slider_function($value['id'], $value['std'], $oldorder, $order);
                     } else {
                         $i = 0;
                         foreach ($slides as $slide) {
                             $oldorder = $slide['order'];
                             $i++;
                             $order = $i;
                             $output .= Options_Machine::optionsframework_slider_function($value['id'], $value['std'], $oldorder, $order);
                         }
                     }
                     $output .= '</ul>';
                     $output .= '<a href="#" class="button slide_add_button">Add New Slide</a></div>';
                     break;
                     //drag & drop block manager
                 //drag & drop block manager
                 case 'sorter':
                     // Make sure to get list of all the default blocks first
                     $all_blocks = $value['std'];
                     $temp = array();
                     // holds default blocks
                     $temp2 = array();
                     // holds saved blocks
                     foreach ($all_blocks as $blocks) {
                         $temp = array_merge($temp, $blocks);
                     }
                     $sortlists = isset($data[$value['id']]) && !empty($data[$value['id']]) ? $data[$value['id']] : $value['std'];
                     foreach ($sortlists as $sortlist) {
                         $temp2 = array_merge($temp2, $sortlist);
                     }
                     // now let's compare if we have anything missing
                     foreach ($temp as $k => $v) {
                         if (!array_key_exists($k, $temp2)) {
                             $sortlists['disabled'][$k] = $v;
                         }
                     }
                     // now check if saved blocks has blocks not registered under default blocks
                     foreach ($sortlists as $key => $sortlist) {
                         foreach ($sortlist as $k => $v) {
                             if (!array_key_exists($k, $temp)) {
                                 unset($sortlist[$k]);
                             }
                         }
                         $sortlists[$key] = $sortlist;
                     }
                     // assuming all sync'ed, now get the correct naming for each block
                     foreach ($sortlists as $key => $sortlist) {
                         foreach ($sortlist as $k => $v) {
                             $sortlist[$k] = $temp[$k];
                         }
                         $sortlists[$key] = $sortlist;
                     }
                     $output .= '<div id="' . $value['id'] . '" class="sorter">';
                     if ($sortlists) {
                         foreach ($sortlists as $group => $sortlist) {
                             $output .= '<ul id="' . $value['id'] . '_' . $group . '" class="sortlist_' . $value['id'] . '">';
                             $output .= '<h3>' . $group . '</h3>';
                             foreach ($sortlist as $key => $list) {
                                 $output .= '<input class="sorter-placebo" type="hidden" name="' . $value['id'] . '[' . $group . '][placebo]" value="placebo">';
                                 if ($key != "placebo") {
                                     $output .= '<li id="' . $key . '" class="sortee">';
                                     $output .= '<input class="position" type="hidden" name="' . $value['id'] . '[' . $group . '][' . $key . ']" value="' . $list . '">';
                                     $output .= $list;
                                     $output .= '</li>';
                                 }
                             }
                             $output .= '</ul>';
                         }
                     }
                     $output .= '</div>';
                     break;
                     //background images option
                 //background images option
                 case 'tiles':
                     $i = 0;
                     $select_value = isset($smof_data[$value['id']]) && !empty($smof_data[$value['id']]) ? $smof_data[$value['id']] : '';
                     if (is_array($value['options'])) {
                         foreach ($value['options'] as $key => $option) {
                             $i++;
                             $checked = '';
                             $selected = '';
                             if (NULL != checked($select_value, $option, false)) {
                                 $checked = checked($select_value, $option, false);
                                 $selected = 'of-radio-tile-selected';
                             }
                             $output .= '<span>';
                             $output .= '<input type="radio" id="of-radio-tile-' . $value['id'] . $i . '" class="checkbox of-radio-tile-radio" value="' . $option . '" name="' . $value['id'] . '" ' . $checked . ' />';
                             $output .= '<div class="of-radio-tile-img ' . $selected . '" style="background: url(' . $option . ')" onClick="document.getElementById(\'of-radio-tile-' . $value['id'] . $i . '\').checked = true;"></div>';
                             $output .= '</span>';
                         }
                     }
                     break;
                     //backup and restore options data
                 //backup and restore options data
                 case 'backup':
                     $instructions = $value['desc'];
                     $backup = of_get_options(BACKUPS);
                     $init = of_get_options('smof_init');
                     if (!isset($backup['backup_log'])) {
                         $log = 'No backups yet';
                     } else {
                         $log = $backup['backup_log'];
                     }
                     $output .= '<div class="backup-box">';
                     $output .= '<div class="instructions">' . $instructions . "\n";
                     $output .= '<p><strong>' . __('Last Backup : ', 'color-theme-framework') . '<span class="backup-log">' . $log . '</span></strong></p></div>' . "\n";
                     $output .= '<a href="#" id="of_backup_button" class="button" title="Backup Options">Backup Options</a>';
                     $output .= '<a href="#" id="of_restore_button" class="button" title="Restore Options">Restore Options</a>';
                     $output .= '</div>';
                     break;
                     //export or import data between different installs
                 //export or import data between different installs
                 case 'transfer':
                     $instructions = $value['desc'];
                     $output .= '<textarea id="export_data" rows="8">' . base64_encode(serialize($smof_data)) . '</textarea>' . "\n";
                     $output .= '<a href="#" id="of_import_button" class="button" title="Restore Options">Import Options</a>';
                     break;
                     // google font field
                 // google font field
                 case 'select_google_font':
                     $output .= '<div class="select_wrapper">';
                     $output .= '<select class="select of-input google_font_select" name="' . $value['id'] . '" id="' . $value['id'] . '">';
                     foreach ($value['options'] as $select_key => $option) {
                         $output .= '<option value="' . $select_key . '" ' . selected(isset($smof_data[$value['id']]) ? $smof_data[$value['id']] : "", $option, false) . ' />' . $option . '</option>';
                     }
                     $output .= '</select></div>';
                     if (isset($value['preview']['text'])) {
                         $g_text = $value['preview']['text'];
                     } else {
                         $g_text = '0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz';
                     }
                     if (isset($value['preview']['size'])) {
                         $g_size = 'style="font-size: ' . $value['preview']['size'] . ';"';
                     } else {
                         $g_size = '';
                     }
                     $hide = " hide";
                     if ($smof_data[$value['id']] != "none" && $smof_data[$value['id']] != "") {
                         $hide = "";
                     }
                     $output .= '<p class="' . $value['id'] . '_ggf_previewer google_font_preview' . $hide . '" ' . $g_size . '>' . $g_text . '</p>';
                     break;
                     //JQuery UI Slider
                 //JQuery UI Slider
                 case 'sliderui':
                     $s_val = $s_min = $s_max = $s_step = $s_edit = '';
                     //no errors, please
                     $s_val = stripslashes($smof_data[$value['id']]);
                     if (!isset($value['min'])) {
                         $s_min = '0';
                     } else {
                         $s_min = $value['min'];
                     }
                     if (!isset($value['max'])) {
                         $s_max = $s_min + 1;
                     } else {
                         $s_max = $value['max'];
                     }
                     if (!isset($value['step'])) {
                         $s_step = '1';
                     } else {
                         $s_step = $value['step'];
                     }
                     if (!isset($value['edit'])) {
                         $s_edit = ' readonly="readonly"';
                     } else {
                         $s_edit = '';
                     }
                     if ($s_val == '') {
                         $s_val = $s_min;
                     }
                     //values
                     $s_data = 'data-id="' . $value['id'] . '" data-val="' . $s_val . '" data-min="' . $s_min . '" data-max="' . $s_max . '" data-step="' . $s_step . '"';
                     //html output
                     $output .= '<input type="text" name="' . $value['id'] . '" id="' . $value['id'] . '" value="' . $s_val . '" class="mini" ' . $s_edit . ' />';
                     $output .= '<div id="' . $value['id'] . '-slider" class="smof_sliderui" style="margin-left: 7px;" ' . $s_data . '></div>';
                     break;
                     //Switch option
                 //Switch option
                 case 'switch':
                     if (!isset($smof_data[$value['id']])) {
                         $smof_data[$value['id']] = 0;
                     }
                     $fold = '';
                     if (array_key_exists("folds", $value)) {
                         $fold = "s_fld ";
                     }
                     $cb_enabled = $cb_disabled = '';
                     //no errors, please
                     //Get selected
                     if ($smof_data[$value['id']] == 1) {
                         $cb_enabled = ' selected';
                         $cb_disabled = '';
                     } else {
                         $cb_enabled = '';
                         $cb_disabled = ' selected';
                     }
                     //Label ON
                     if (!isset($value['on'])) {
                         $on = "On";
                     } else {
                         $on = $value['on'];
                     }
                     //Label OFF
                     if (!isset($value['off'])) {
                         $off = "Off";
                     } else {
                         $off = $value['off'];
                     }
                     $output .= '<p class="switch-options">';
                     $output .= '<label class="' . $fold . 'cb-enable' . $cb_enabled . '" data-id="' . $value['id'] . '"><span>' . $on . '</span></label>';
                     $output .= '<label class="' . $fold . 'cb-disable' . $cb_disabled . '" data-id="' . $value['id'] . '"><span>' . $off . '</span></label>';
                     $output .= '<input type="hidden" class="' . $fold . 'checkbox of-input" name="' . $value['id'] . '" id="' . $value['id'] . '" value="0"/>';
                     $output .= '<input type="checkbox" id="' . $value['id'] . '" class="' . $fold . 'checkbox of-input main_checkbox" name="' . $value['id'] . '"  value="1" ' . checked($smof_data[$value['id']], 1, false) . ' />';
                     $output .= '</p>';
                     break;
                     // Uploader 3.5
                 // Uploader 3.5
                 case "upload":
                 case "media":
                     if (!isset($value['mod'])) {
                         $value['mod'] = '';
                     }
                     $u_val = '';
                     if ($smof_data[$value['id']]) {
                         $u_val = stripslashes($smof_data[$value['id']]);
                     }
                     $output .= Options_Machine::optionsframework_media_uploader_function($value['id'], $u_val, $value['mod']);
                     break;
             }
             do_action('optionsframework_machine_loop', array('options' => $options, 'smof_data' => $smof_data, 'defaults' => $defaults, 'counter' => $counter, 'menu' => $menu, 'output' => $output, 'value' => $value));
             $output .= $smof_output;
             //description of each option
             if ($value['type'] != 'heading') {
                 if (!isset($value['desc'])) {
                     $explain_value = '';
                 } else {
                     $explain_value = '<div class="explain">' . $value['desc'] . '</div>' . "\n";
                 }
                 $output .= '</div>' . $explain_value . "\n";
                 $output .= '<div class="clear"> </div></div></div>' . "\n";
             }
         }
         /* condition empty end */
     }
     $output .= '</div>';
     do_action('optionsframework_machine_after', array('options' => $options, 'smof_data' => $smof_data, 'defaults' => $defaults, 'counter' => $counter, 'menu' => $menu, 'output' => $output, 'value' => $value));
     $output .= $smof_output;
     return array($output, $menu, $defaults);
 }
Ejemplo n.º 20
0
/**
 * Ajax Save Options
 *
 * @uses get_option()
 *
 * @since 1.0.0
 */
function of_ajax_callback()
{
    global $options_machine, $of_options;
    $nonce = $_POST['security'];
    if (!wp_verify_nonce($nonce, 'of_ajax_nonce')) {
        die('-1');
    }
    //get options array from db
    $all = of_get_options();
    $save_type = $_POST['type'];
    //echo $_POST['data'];
    //Uploads
    if ($save_type == 'upload') {
        $clickedID = $_POST['data'];
        // Acts as the name
        $filename = $_FILES[$clickedID];
        $filename['name'] = preg_replace('/[^a-zA-Z0-9._\\-]/', '', $filename['name']);
        $override['test_form'] = false;
        $override['action'] = 'wp_handle_upload';
        $uploaded_file = wp_handle_upload($filename, $override);
        $upload_tracking[] = $clickedID;
        //update $options array w/ image URL
        $upload_image = $all;
        //preserve current data
        $upload_image[$clickedID] = $uploaded_file['url'];
        of_save_options($upload_image);
        if (!empty($uploaded_file['error'])) {
            echo 'Upload Error: ' . $uploaded_file['error'];
        } else {
            echo $uploaded_file['url'];
        }
        // Is the Response
    } elseif ($save_type == 'image_reset') {
        $id = $_POST['data'];
        // Acts as the name
        $delete_image = $all;
        //preserve rest of data
        $delete_image[$id] = '';
        //update array key with empty value
        of_save_options($delete_image);
    } elseif ($save_type == 'backup_options') {
        $backup = $all;
        $backup['backup_log'] = date('r');
        of_save_options($backup, BACKUPS);
        die('1');
    } elseif ($save_type == 'restore_options') {
        $smof_data = of_get_options(BACKUPS);
        of_save_options($smof_data);
        die('1');
    } elseif ($save_type == 'import_options') {
        $smof_data = unserialize(base64_decode($_POST['data']));
        //100% safe - ignore theme check nag
        of_save_options($smof_data);
        die('1');
    } elseif ($save_type == 'save') {
        wp_parse_str(stripslashes($_POST['data']), $smof_data);
        unset($smof_data['security']);
        unset($smof_data['of_save']);
        of_save_options($smof_data);
        die('1');
    } elseif ($save_type == 'reset') {
        of_save_options($options_machine->Defaults);
        die('1');
        //options reset
    }
    die;
}
function lab_1cl_demo_install_package_content()
{
    $resp = array('success' => false, 'errorMsg' => '');
    $pack_name = $_POST['pack'];
    $source_details = $_POST['contentSourceDetails'];
    $pack = lab_1cl_demo_installer_get_pack($pack_name);
    # Content Source Install by Type
    switch ($source_details['type']) {
        case "xml-wp-content":
        case "xml-products":
            # Run wordpress importer independently
            if (!defined("WP_LOAD_IMPORTERS")) {
                define("WP_LOAD_IMPORTERS", true);
                require dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wordpress-importer/wordpress-importer.php';
            }
            # Demo Content File (XML)
            if ($source_details['type'] == 'xml-products') {
                $xml_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . $pack['products'];
            } else {
                $xml_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . $pack['file'];
            }
            try {
                @set_time_limit(0);
                $wp_importer = new WP_Import();
                $wp_importer->fetch_attachments = isset($source_details['downloadMedia']) && $source_details['downloadMedia'];
                $wp_importer->id = sanitize_title($pack['name']);
                # Download Shop Attachments by Default
                if ($source_details['type'] == 'xml-products') {
                    $wp_importer->fetch_attachments = true;
                }
                ob_start();
                $wp_importer->import($xml_file);
                $content = ob_get_clean();
                $resp['imp'] = $wp_importer;
                $resp['success'] = true;
                # Small but important stuff to setup
                if ($source_details['type'] == 'xml-wp-content') {
                    # Set Frontpage and Posts page
                    if (isset($pack['frontpage']) || isset($pack['postspage'])) {
                        update_option('show_on_front', 'page');
                        if (isset($pack['frontpage'])) {
                            update_option('page_on_front', $pack['frontpage']);
                        }
                        if (isset($pack['postspage'])) {
                            update_option('page_for_posts', $pack['postspage']);
                        }
                    }
                    # Menus
                    if (isset($pack['menus']) && is_array($pack['menus'])) {
                        $nav_menus = wp_get_nav_menus();
                        foreach ($pack['menus'] as $menu_location => $menu_name) {
                            if (is_array($nav_menus)) {
                                foreach ($nav_menus as $term) {
                                    if (strtolower($menu_name) == strtolower($term->name)) {
                                        $nav_menu_locations = get_theme_mod('nav_menu_locations');
                                        if (!is_array($nav_menu_locations)) {
                                            $nav_menu_locations = array();
                                        }
                                        $nav_menu_locations[$menu_location] = $term->term_id;
                                        set_theme_mod('nav_menu_locations', $nav_menu_locations);
                                    }
                                }
                            }
                        }
                    }
                    # Flush rewrite rules
                    flush_rewrite_rules();
                }
            } catch (Exception $e) {
                $resp['errorMsg'] = $e;
            }
            break;
        case "theme-options":
            $theme_options = dirname(__FILE__) . DIRECTORY_SEPARATOR . $pack['options'];
            try {
                if ($theme_options = file_get_contents($theme_options)) {
                    $smof_data = unserialize(base64_decode($theme_options));
                    # Backup Nav Locations
                    $nav_menu_locations = get_theme_mod('nav_menu_locations');
                    # Save Theme Options
                    of_save_options(apply_filters('of_options_before_save', $smof_data));
                    # Restore Nav Locations
                    set_theme_mod('nav_menu_locations', $nav_menu_locations);
                    $resp['success'] = true;
                } else {
                    $resp['errorMsg'] = 'Invalid data serialization for Theme Options. Required format: Base64 Encoded';
                }
            } catch (Exception $e) {
                $resp['errorMsg'] = $e;
            }
            break;
        case "custom-css":
            $custom_css = $pack['custom_css'];
            if ($custom_css) {
                $custom_css = dirname(__FILE__) . DIRECTORY_SEPARATOR . $custom_css;
                try {
                    if ($custom_css = file_get_contents($custom_css)) {
                        $custom_css_options = json_decode(base64_decode($custom_css));
                        lab_1cl_demo_installer_custom_css_save($custom_css_options);
                        $resp['success'] = true;
                    }
                } catch (Exception $e) {
                    $resp['errorMsg'] = $e;
                }
            }
            break;
        case "widgets":
            $widgets = dirname(__FILE__) . DIRECTORY_SEPARATOR . $pack['widgets'];
            if (!class_exists('Widget_Importer_Exporter')) {
                require dirname(__FILE__) . DIRECTORY_SEPARATOR . 'widget-importer-exporter/widget-importer-exporter.php';
            }
            try {
                wie_process_import_file($widgets);
                $resp['success'] = true;
            } catch (Exception $e) {
                $resp['errorMsg'] = $e;
            }
            break;
        case "revslider":
            try {
                # Import Revolution Slider
                if ($pack['revslider'] && class_exists('RevSlider')) {
                    $revslider = dirname(__FILE__) . DIRECTORY_SEPARATOR . $pack['revslider'];
                    $rev = new RevSlider();
                    ob_start();
                    $rev->importSliderFromPost(true, true, $revslider);
                    $content = ob_get_clean();
                    $resp['success'] = true;
                } else {
                    $resp['errorMsg'] = 'Revolution Slider is not installed/activated and thus this content source couldn\'t be imported!';
                }
            } catch (Exception $e) {
                $resp['errorMsg'] = $e;
            }
            break;
        case "layerslider":
            try {
                # Import Layer Slider
                if ($pack['layerslider'] && function_exists('ls_import_sliders')) {
                    $layerslider = dirname(__FILE__) . DIRECTORY_SEPARATOR . $pack['layerslider'];
                    include LS_ROOT_PATH . '/classes/class.ls.importutil.php';
                    $import = new LS_ImportUtil($layerslider, basename($layerslider));
                    $resp['success'] = true;
                } else {
                    $resp['errorMsg'] = 'Layer Slider is not installed/activated and thus this content source couldn\'t be imported!';
                }
            } catch (Exception $e) {
                $resp['errorMsg'] = $e;
            }
            break;
    }
    echo json_encode($resp);
    die;
}