'."\n" . '
'."\n";
}
if($value['type'] == "innerheading"){
$output .= '
'."\n";
$output .= '
'. $value['name'] .' '."\n";
$output .= '
'."\n" . '
'."\n";
}
}
//End Heading
switch ( $value['type'] ) {
case 'innerheading':
$output .= '
'. $value['name'] .' ';
break;
case 'text':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$textvalue = str_replace('\\','',$pmc_data[$value['id']]) ;
$output .= '
';
break;
case 'select':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$output .= '
';
$output .= '';
foreach ($value['options'] as $option) {
$output .= ' '.$option.'';
}
$output .= '
';
break;
case 'select2':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$output .= '
';
$output .= '';
foreach ($value['options'] as $option=>$name) {
$output .= ' '.$name.'';
}
$output .= '
';
break;
case 'select3':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
global $post;
$args = array( 'numberposts' => -1,'post_type' => 'template');
$posts = get_posts($args);
$output .= '
';
$output .= '';
foreach( $posts as $post) {
setup_postdata($post);
$output .= ' '.get_the_title().'';
}
$output .= '
';
break;
case 'textarea':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$cols = '8';
$ta_value = '';
if(isset($value['options'])){
$ta_options = $value['options'];
if(isset($ta_options['cols'])){
$cols = $ta_options['cols'];
}
}
$ta_value = str_replace('\\','',$pmc_data[$value['id']]);
$output .= '
';
break;
case "radio":
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
foreach($value['options'] as $option=>$name) {
$output .= '
'.$name.'
';
}
break;
case "slidercategory":
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$category = '';
$output .= '
';
$output .= '';
$categories = get_terms("sliderocategory");
$output .= 'term_id, false) . ' />None ';
foreach ($categories as $category) {
$output .= 'term_id, false) . ' />'.$category->name.' ';
}
$output .= '
' ;
//$output .= wp_dropdown_categories('show_option_all=Show all&hierarchical=2&name='.$value["id"].'&taxonomy=sliderocategory&selected='.selected($pmc_data[$value["id"]], $option, false).'');
break;
case 'checkbox':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$output .= '
';
break;
case 'multicheck':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$multi_stored = $pmc_data[$value['id']];
foreach ($value['options'] as $key => $option) {
if (!isset($multi_stored[$key])) {$multi_stored[$key] = '';}
$of_key_string = $value['id'] . '_' . $key;
$output .= '
'. $option .' ';
}
break;
case 'upload':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
if(!isset($value['mod'])) $value['mod'] = '';
$output .= Options_Machine::optionsframework_uploader_function($value['id'],$value['std'],$value['mod']);
break;
case 'slider':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$_id = strip_tags( strtolower($value['id']) );
$int = '';
$int = $_id ;
$output .= '
';
$slides = $pmc_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,$int,$value['social'],$value['menu'],$value['sidebar']);
} else {
$i = 0;
foreach ($slides as $slide) {
if(isset( $slide['order']))
$oldorder = $slide['order'];
else
$oldorder =0;
$i++;
$order = $i;
$output .= Options_Machine::optionsframework_slider_function($value['id'],$value['std'],$oldorder,$order,$int,$value['social'],$value['menu'],$value['sidebar']);
}
}
$output .= ' ';
if(!$value['social'] and !$value['menu'] and !$value['sidebar']){
$output .= '
Add New Client ';
}
if($value['social']){
$output .= '
Add New Social Icon ';
}
if($value['menu']){
$output .= '
';
}
if($value['sidebar']){
$output .= '
';
}
break;
case 'sorter':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$sortlists = $pmc_data[$value['id']];
$output .= '
';
if ($sortlists) {
foreach ($sortlists as $group=>$sortlist) {
$output .= '
';
$output .= ''.$group.' ';
foreach ($sortlist as $key => $list) {
if ($key == "placebo") {
$output .= ' ';
} else {
$output .= '';
$output .= ' ';
$output .= $list;
$output .= ' ';
}
}
$output .= ' ';
}
}
$output .= '
';
break;
case 'color':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$output .= '
';
$output .= '
';
break;
case 'colorrgb':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$output .= '
';
$output .= '
';
break;
case 'sizeColor':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = array('size' => 12, 'color' => '#000000');
}
$sizeColor = $pmc_data[$value['id']];
$output .= '
';
$output .= '';
for ($i = 9; $i < 65; $i++){
$test = $i.'px';
$output .= ''. $i .'px ';
}
$output .= '
';
/* Font Color */
$output .= '
';
$output .= '
';
break;
case 'font':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = array('face' => 'arial');
}
$output .= '
';
$output .= '';
$faces = array('arial'=>'Arial',
'verdana'=>'Verdana, Geneva',
'trebuchet'=>'Trebuchet',
'georgia' =>'Georgia',
'Helvetica Neue' =>'Helvetica Neue',
'times'=>'Times New Roman',
'tahoma'=>'Tahoma, Geneva',
'Telex' => 'Telex',
'Droid%20Sans' => 'Droid Sans',
'Convergence' => 'Convergence',
'Oswald' => 'Oswald',
'News%20Cycle' => 'News Cycle',
'Yanone%20Kaffeesatz:300' => 'Yanone Kaffeesatz Light',
'Yanone%20Kaffeesatz:200' => 'Yanone Kaffeesatz ExtraLight',
'Yanone%20Kaffeesatz:400' => 'Yanone Kaffeesatz Regular',
'Duru%20Sans' => 'Duru Sans',
'Open%20Sans' => 'Open Sans',
'PT%20Sans%20Narrow' => 'PT Sans Narrow',
'Macondo Swash Caps'=>'Macondo Swash Caps',
'Telex'=>'Telex' ,
'Sirin%20Stencil' => 'Sirin Stencil',
'Actor' => 'Actor',
'Iceberg' => 'Iceberg',
'Ropa%20Sans' => 'Ropa Sans',
'Amethysta' => 'Amethysta',
'Alegreya' => 'Alegreya',
'Germania One' => 'Germania One',
'Gudea' => 'Gudea',
'Trochut' => 'Trochut',
'Ruluko' => 'Ruluko',
'Alegreya' => 'Alegreya',
'Questrial' => 'Questrial',
'Armata' => 'Armata',
'Quicksand' => 'Quicksand',
'PT%20Sans' => 'PT Sans',
'Diplomata%20SC' => 'Diplomata SC',
'Limelight' => 'Limelight',
'Abril%20Fatface' => 'Abril Fatface',
'Yeseva%20One' => 'Yeseva One',
'Smokum' => 'Smokum',
'Gravitas%20One' => 'Gravitas One',
'Roboto%20Slab' => 'Roboto Slab',
'Roboto' => 'Roboto',
'Domine' => 'Domine',
'Unna' => 'Unna',
'Coustard' => 'Coustard',
'Cantata%20One' => 'Cantata One',
'Headland%20One' => 'Headland One',
'Vidaloka' => 'Vidaloka',
'Josefin Slab' => 'Josefin Slab',
'Droid Serif' => 'Droid Serif',
'Cabin' => 'Cabin',
'Cabin%20Condensed' => 'Cabin Condensed',
'Raleway' => 'Raleway',
'Noto%20Sans' => 'Noto+Sans',
'Dancing%20Script' => 'Dancing Script',
'Oxygen' => 'Oxygen',
'Lobster' => 'Lobster',
'Lobster%Two' => 'Lobster Two',
'Lusitana:400,700' => 'Lusitana:400,700'
);
foreach ($faces as $i=>$face) {
$output .= ''. $face .' ';
}
$output .= '
';
break;
case 'typography':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = array('size'=>12, 'face' => 'arial', 'color' => '#000000','style'=>'normal');
}
$typography_stored = $pmc_data[$value['id']];
/* Font Size */
if(isset($typography_stored['size'])) {
$output .= '
';
$output .= '';
for ($i = 9; $i < 65; $i++){
$test = $i.'px';
$output .= ''. $i .'px ';
}
$output .= '
';
}
/* Font Color */
if(isset($typography_stored['color'])) {
$output .= '
';
$output .= '
';
}
/* Font Face */
if(isset($typography_stored['face'])) {
$output .= '
';
$output .= '';
$faces = array('arial'=>'Arial',
'verdana'=>'Verdana, Geneva',
'trebuchet'=>'Trebuchet',
'georgia' =>'Georgia',
'Helvetica Neue' =>'Helvetica Neue',
'times'=>'Times New Roman',
'tahoma'=>'Tahoma, Geneva',
'Telex' => 'Telex',
'Droid%20Sans' => 'Droid Sans',
'Convergence' => 'Convergence',
'Oswald' => 'Oswald',
'News%20Cycle' => 'News Cycle',
'Yanone%20Kaffeesatz:300' => 'Yanone Kaffeesatz Light',
'Yanone%20Kaffeesatz:200' => 'Yanone Kaffeesatz ExtraLight',
'Yanone%20Kaffeesatz:400' => 'Yanone Kaffeesatz Regular',
'Duru%20Sans' => 'Duru Sans',
'Open%20Sans' => 'Open Sans',
'PT%20Sans%20Narrow' => 'PT Sans Narrow',
'Macondo Swash Caps'=>'Macondo Swash Caps',
'Telex'=>'Telex' ,
'Sirin%20Stencil' => 'Sirin Stencil',
'Actor' => 'Actor',
'Iceberg' => 'Iceberg',
'Ropa%20Sans' => 'Ropa Sans',
'Amethysta' => 'Amethysta',
'Alegreya' => 'Alegreya',
'Germania One' => 'Germania One',
'Gudea' => 'Gudea',
'Trochut' => 'Trochut',
'Ruluko' => 'Ruluko',
'Alegreya' => 'Alegreya',
'Questrial' => 'Questrial',
'Armata' => 'Armata',
'Quicksand' => 'Quicksand',
'PT%20Sans' => 'PT Sans',
'Diplomata%20SC' => 'Diplomata SC',
'Limelight' => 'Limelight',
'Abril%20Fatface' => 'Abril Fatface',
'Yeseva%20One' => 'Yeseva One',
'Smokum' => 'Smokum',
'Gravitas%20One' => 'Gravitas One',
'Roboto%20Slab' => 'Roboto Slab',
'Roboto' => 'Roboto',
'Domine' => 'Domine',
'Unna' => 'Unna',
'Coustard' => 'Coustard',
'Cantata%20One' => 'Cantata One',
'Headland%20One' => 'Headland One',
'Vidaloka' => 'Vidaloka',
'Josefin%20Slab' => 'Josefin Slab',
'Droid%20Serif' => 'Droid Serif',
'Cabin' => 'Cabin',
'Cabin%20Condensed' => 'Cabin Condensed',
'Raleway' => 'Raleway',
'Noto%20Sans' => 'Noto+Sans',
'Dancing%20Script' => 'Dancing Script',
'Oxygen' => 'Oxygen',
'Lobster' => 'Lobster',
'Lobster%Two' => 'Lobster Two',
'Lusitana:400,700' => 'Lusitana:400,700'
);
foreach ($faces as $i=>$face) {
$output .= ''. $face .' ';
}
$output .= '
';
}
/* Font Weight */
if(isset($typography_stored['style'])) {
$output .= '
';
$output .= '';
$styles = array('normal'=>'Normal',
'bold'=>'Bold'
);
foreach ($styles as $i=>$style){
$output .= ''. $style .' ';
}
$output .= '
';
}
break;
case 'border':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
if(!isset($pmc_data[$value['id'] . '_width'])) $pmc_data[$value['id'] . '_width'] ='';
if(!isset($pmc_data[$value['id'] . '_style'])) $pmc_data[$value['id'] . '_style'] ='';
if(!isset($pmc_data[$value['id'] . '_color'])) $pmc_data[$value['id'] . '_color'] ='';
$border_stored = array('width' => $pmc_data[$value['id'] . '_width'] ,
'style' => $pmc_data[$value['id'] . '_style'],
'color' => $pmc_data[$value['id'] . '_color'],
);
/* Border Width */
$border_stored = $pmc_data[$value['id']];
$output .= '
';
$output .= '';
for ($i = 0; $i < 21; $i++){
$output .= ''. $i .' '; }
$output .= '
';
/* Border Style */
$output .= '
';
$output .= '';
$styles = array('none'=>'None',
'solid'=>'Solid',
'dashed'=>'Dashed',
'dotted'=>'Dotted');
foreach ($styles as $i=>$style){
$output .= ''. $style .' ';
}
$output .= '
';
/* Border Color */
$output .= '
';
$output .= '
';
break;
case 'images':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$i = 0;
$select_value = $pmc_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 .= '
';
$output .= ' ';
$output .= ''. $key .'
';
$output .= ' ';
$output .= ' ';
}
break;
case 'tiles':
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$i = 0;
if(isset($pmc_data[$value['id']]))
$select_value = $pmc_data[$value['id']];
else
$select_value = 1;
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 .= '
';
$output .= ' ';
$output .= '
';
$output .= ' ';
}
break;
case "info":
if (!isset($pmc_data[$value['id']])) {
$pmc_data[$value['id']] = '';
}
$info_text = $value['std'];
$output .= '
'.$info_text.'
';
break;
case 'heading':
if($counter >= 2){
$output .= '
'."\n";
}
$header_class = preg_replace("/[^A-Za-z0-9]/", "", strtolower($value['name']) );
$jquery_click_hook = preg_replace("/[^A-Za-z0-9]/", "", strtolower($value['name']) );
$jquery_click_hook = "of-option-" . $jquery_click_hook;
$menu .= '';
$output .= '