| | |
| | | } |
| | | } |
| | | if ($field_config['type'] == 'taxonomy' && (!array_key_exists('taxonomy_type', $field_config))) { |
| | | error_log('Attempting to set taxonomies: ' . print_r($this->object_id, true)); |
| | | error_log('Sanitized data: ' . print_r($sanitized, true)); |
| | | error_log('Taxonomy: ' . print_r($field_config['taxonomy'], true)); |
| | | $set = wp_set_post_terms($this->object_id, $sanitized, jvbCheckBase($field_config['taxonomy']), false); |
| | | error_log('Set post terms: ' . print_r($set, true)); |
| | | } |
| | | if ($field_config['type'] === 'location' && empty($sanitized)) { |
| | | $this->addMeta('has_map', false); |
| | |
| | | } |
| | | |
| | | |
| | | echo (jvbCheck('submit', $options)) ? '<button type="submit">'.jvbIcon('save').'Save</button>' : ''; |
| | | echo (jvbCheck('submit', $options)) ? '<button type="submit">'.jvbIcon('floppy-disk').'Save</button>' : ''; |
| | | echo '</form>'; |
| | | |
| | | $out = ob_get_clean(); |
| | |
| | | $out = '<p class="'.$name.'">'.jvbIcon('calendar').'<span></span></p>'; |
| | | break; |
| | | case 'time': |
| | | $out = '<p class="'.$name.'">'.jvbIcon('time').'<time></time></p>'; |
| | | $out = '<p class="'.$name.'">'.jvbIcon('clock').'<time></time></p>'; |
| | | break; |
| | | case 'true_false': |
| | | $out = '<p class="'.$name.'"></p>'; |
| | |
| | | } |
| | | |
| | | if ($field_config['type'] === 'taxonomy' && !array_key_exists('taxonomy_type', $field_config)){ |
| | | $set = wp_set_post_terms($this->object_id, $sanitized, jvbCheckBase($field_config['taxonomy']), false); |
| | | $term_ids = array_map('intval', explode(',', trim($sanitized))); |
| | | $set = wp_set_post_terms($this->object_id, $term_ids, jvbCheckBase($field_config['taxonomy']), false); |
| | | } |
| | | |
| | | if ($field_config['type'] === 'location' && empty($sanitized)) { |