| | |
| | | 'update' => true, // Whether to update on close |
| | | ]); |
| | | |
| | | |
| | | $this->plural = $registrar->getPlural(); |
| | | $this->singular = $registrar->getSingular(); |
| | | } |
| | |
| | | ?> |
| | | <dialog id="jvb-selector" aria-labelledby="modal-title" aria-modal="true"> |
| | | <div class="wrap col"> |
| | | <header class="modal-header"> |
| | | <header class="row"> |
| | | <h3 id="modal-title">Select Taxonomy</h3> |
| | | </header> |
| | | |
| | |
| | | <!-- Search section --> |
| | | <div class="search-wrapper"> |
| | | <div class="search-bar"> |
| | | <?= jvbSearch('Search terms', 'search-terms') ?> |
| | | <?= str_replace('class="search-container', 'class="open search-container', jvbSearch('Search terms', 'search-terms')) ?> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <template class="selectedTerm"> |
| | | <div class="selected-item row"> |
| | | <span class="item-name"></span> |
| | | <button type="button" class="remove-term row"><?=jvbIcon('x')?></button> |
| | | <button type="button" class="remove-term"><?=jvbIcon('x')?></button> |
| | | </div> |
| | | </template> |
| | | <template class="termBreadcrumb"> |
| | |
| | | $selectedItems = ob_get_clean(); |
| | | endif; |
| | | ?> |
| | | <div class="selected-items row" role="region" aria-label="Selected <?= esc_attr($this->plural) ?>"><?=$selectedItems?></div> |
| | | <div class="selected-items row left" role="region" aria-label="Selected <?= esc_attr($this->plural) ?>"><?=$selectedItems?></div> |
| | | <?= $extra ?> |
| | | </div> |
| | | <?php |
| | |
| | | |
| | | protected function renderTaxonomyToggle(array $selected = [], string $extra = ''): string |
| | | { |
| | | |
| | | 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>', |
| | | '<button type="button" data-icon="%s" data-filter="taxonomy" data-taxonomy="%s" data-type="selector" data-single="%s" data-plural="%s" %stitle="Filter by %s">%s<span class="label">%s</span></button>', |
| | | $this->registrar->getIcon(), |
| | | $this->name, |
| | | $this->singular, |
| | | $this->plural, |
| | | $this->buildDataAttributes([]), |
| | | $this->singular, |
| | | jvbIcon($this->registrar->getIcon()), |
| | | $this->singular |