Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function descbagno_select_cb( $post ) {
- global $wpdb;
- $value = get_post_meta($post->ID, 'descbagno', true);
- $descbagni = array(
- __('bathrooms with shower','sacconicase') => 'bagni con doccia',
- __('bathrooms','sacconicase') => 'bagni',
- __('bathrooms: one with shower and the other with bath','sacconicase') => 'bagni: uno con doccia e l\'altro con vasca',
- __('bathroom + 1 toilette (wc and washbasin)','sacconicase') => 'bagno completo + 1 toilette (wc e lavandino)',
- __('bathroom + 1 wc','sacconicase') => 'bagno completo + 1 wc',
- __('bathroom without window','sacconicase') => 'bagno senza finestra',
- __('bathroom with shower','sacconicase') => 'bagno con doccia',
- );
- echo '<select name="descbagno">';
- echo '<option value=""' . ((($value == '') || !isset($descbagni[$value])) ? ' selected="selected"' : '') . '> ----</option>';
- // output each description of bathroom as an option
- foreach ($descbagni as $id => $text) {
- echo '<option value="' . $id . '"' . (($value == $id) ? ' selected="selected"' : '') . '">' . $text. '</option>';
- }
- echo '</select>';
- }
Advertisement
Add Comment
Please, Sign In to add comment