From 2127b1bdd73ecd2423e443992da4b442f5a3c1a3 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 04 Feb 2026 21:19:25 +0000
Subject: [PATCH] =Major overhaul of MetaManager.php -> Meta.php and RestRouteManager.php -> Rest.php. Seems to work for JakeVan
---
inc/forms/TaxonomySelector.php | 40 ++++++++++++++++++++++++----------------
1 files changed, 24 insertions(+), 16 deletions(-)
diff --git a/inc/forms/TaxonomySelector.php b/inc/forms/TaxonomySelector.php
index f9d252b..bcc5a3b 100644
--- a/inc/forms/TaxonomySelector.php
+++ b/inc/forms/TaxonomySelector.php
@@ -64,14 +64,14 @@
*/
public static function getTermPath(WP_Term $term, bool $returnArray = false): string|array {
if (!is_taxonomy_hierarchical($term->taxonomy)) {
- return $term->name;
+ return html_entity_decode($term->name);
}
$path = [];
$currentTerm = $term;
while ($currentTerm) {
- array_unshift($path, $currentTerm->name);
+ array_unshift($path, html_entity_decode($currentTerm->name));
if ($currentTerm->parent) {
$currentTerm = get_term($currentTerm->parent);
@@ -118,14 +118,15 @@
</button>
</nav>
+
+ <p class="message" hidden aria-live="polite">
+ { <span>loading items</span> }
+ </p>
<!-- Terms list -->
<ul class="items-container col start" role="listbox" aria-label="Available terms">
<!-- Terms will be populated here -->
</ul>
- <p class="message" hidden aria-live="polite">
- { <span>loading items</span> }
- </p>
<button class="submit-term" hidden data-ignore><strong>Create: </strong> "<span></span>"</button>
<!-- Infinite scroll sentinel -->
@@ -135,7 +136,7 @@
<!-- Search section -->
<div class="search-wrapper">
<div class="search-bar">
- <?= jvbSearch('Search terms') ?>
+ <?= jvbSearch('Search terms', 'search-terms') ?>
</div>
</div>
@@ -155,8 +156,6 @@
<option value="0">None (Top Level)</option>
</select>
</div>
-
- <button type="button" class="submit-term">Add Term</button>
</form>
</div>
@@ -168,14 +167,14 @@
<p>{ <span>loading items</span> }</p>
</template>
<template class="autocompleteItem">
- <button class="autocomplete item" type="button" data-autocomplete-select></button>
+ <li class="autocomplete item btn"></li>
</template>
<template class="noTermResults">
<p>{ <span>nothing found</span> }</p>
</template>
<template class="termListItem">
<li>
- <input type ="checkbox">
+ <input type="checkbox">
<label>
<span class="term-name"></span>
</label>
@@ -241,13 +240,13 @@
</button>
<?php if ($hasAutocomplete !== '') { ?>
<input type="text" id="<?= $this->base ?><?= esc_attr($this->config['name']) ?>-autocomplete" autocomplete="off" data-ignore data-autocomplete>
+ <p class="message" hidden aria-live="polite">
+ { <span>loading items</span> }
+ </p>
<div class="auto-wrapper" hidden>
<ul class="search-results">
</ul>
- <p class="message" hidden aria-live="polite">
- { <span>loading items</span> }
- </p>
- <button class="submit-term" hidden data-ignore><strong>Create: </strong>"<span></span>"</button>
+ <button class="submit-term" hidden data-ignore><strong>Create: </strong> "<span></span>"</button>
</div>
<?php } ?>
@@ -271,7 +270,16 @@
protected function renderTaxonomyToggle(array $selected = [], string $extra = ''): string
{
- return '<button type="button" data-filter="taxonomy" data-taxonomy="'.$this->name.'" title="Filter by '.$this->singular.'">'.jvbIcon($this->config['icon']).'<span class="label">'.$this->singular.'</span></button>';
+ return sprintf(
+ '<button type="button" data-icon="%s" data-filter="taxonomy" data-taxonomy="%s" data-type="selector" data-single="%s" data-plural="%s" title="Filter by %s">%s<span class="label">%s</span></button>',
+ JVB_TAXONOMY[$this->name]['icon'],
+ $this->name,
+ $this->singular,
+ $this->plural,
+ $this->singular,
+ jvbIcon($this->config['icon']),
+ $this->singular
+ );
}
/**
@@ -334,7 +342,7 @@
<span><?= esc_html($termPath) ?></span>
<button type="button"
class="remove-term row"
- aria-label="Remove <?= esc_attr($term->name) ?>">
+ aria-label="Remove <?= html_entity_decode($term->name) ?>">
<?= jvbIcon('x') ?>
</button>
</div>
--
Gitblit v1.10.0