From d7dbe7fee362d587dfc334135d9581b6216a4295 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 23 Nov 2025 04:13:56 +0000
Subject: [PATCH] =Timeline block, and feed block updated. DataStore.js refactored to not block rendering
---
inc/meta/MetaManager.php | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/inc/meta/MetaManager.php b/inc/meta/MetaManager.php
index e4644f2..a1d7dbc 100644
--- a/inc/meta/MetaManager.php
+++ b/inc/meta/MetaManager.php
@@ -333,11 +333,7 @@
}
}
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);
@@ -506,6 +502,7 @@
if (!empty($this->fields)) {
return $this->fields;
}
+ $type = false;
switch ($this->object_type) {
case 'post':
$type = get_post_type((int)$this->object_id);
@@ -519,6 +516,9 @@
case 'options':
return jvbGetFields('options');
}
+ if (!$type) {
+ return [];
+ }
return jvbGetFields($type, $this->object_type);
}
@@ -546,6 +546,7 @@
protected function getSections():array
{
+ $type = false;
switch ($this->object_type) {
case 'post':
$type = get_post_type((int)$this->object_id);
@@ -758,7 +759,7 @@
}
- 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();
@@ -802,7 +803,7 @@
$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>';
@@ -1015,7 +1016,8 @@
}
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)) {
--
Gitblit v1.10.0