Created
July 6, 2015 18:52
-
-
Save LinzardMac/4c8ac8ab9d1fb4c9546e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array( | |
'label' => 'Location', | |
'desc' => '', | |
'id' => $prefix.'location', | |
'type' => 'loc_group', | |
'options' => array( | |
'location'=> array( | |
'options' => array( | |
'state' => array( | |
'label' => 'State', | |
'desc' => '', | |
'id' => $prefix.'state', | |
'value' => 'state' | |
), | |
'city' => array( | |
'label' => 'City', | |
'desc' => '', | |
'id' => $prefix.'city', | |
'value' => 'city' | |
), | |
'zip_code' => array( | |
'label' => 'Zip Code', | |
'desc' => '', | |
'id' => $prefix.'zip', | |
'value' => 'zip' | |
) | |
) | |
) | |
) | |
) | |
case 'loc_group': | |
echo '<div id="'.$field['id'].'" id="'.$field['id'].'">'; | |
foreach ($field['options'] as $option) { | |
foreach($option['options'] as $the_option){ | |
// have to check if $meta is empty because even if it is, strtotime()/ date() outputs a default value making new posts or | |
//posts without set times select the options that match the default | |
echo '<input type="text" class="" name="'.$the_option['value'].'" id="'.$the_option['value'].'" value="'.$meta.'" size="30" /></br>'.$the_option['label'].'</br>'; | |
} //end foreach options as the_option | |
} //end foreach field as option | |
echo '</div>'; | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment