From ac444cba221832c012c0435fdc8339fe9f37febb Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 11 May 2026 18:35:04 +0000
Subject: [PATCH] =Some changes to the CRUD.js editing, timeline post configuration
---
inc/ui/Tabs.php | 37 ++++++++++++++++++++++++++-----------
1 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/inc/ui/Tabs.php b/inc/ui/Tabs.php
index 370ffdf..27ca6e7 100644
--- a/inc/ui/Tabs.php
+++ b/inc/ui/Tabs.php
@@ -63,41 +63,56 @@
$selected = ($i === 0) ? 'true' : 'false';
$hidden = $tab->isHidden() ? ' hidden' : '';
- $header .= '<button type="button" class="button tab' . $active . '" data-tab="' . $slug . '" role="tab" aria-selected="' . $selected . '"' . $hidden . '>
- <h2 class="row">';
+ $header .= sprintf(
+ '<button type="button" class="button tab%s" data-tab="%s" role="tab" aria-selected="%s"%s>',
+ $active,
+ $slug,
+ $selected,
+ $hidden
+ );
if ($tab->getIcon()) {
$header .= jvbIcon($tab->getIcon());
}
- $header .= $tab->getTitle() . '</h2>
- </button>';
+ $header .= sprintf('%s
+ </button>',
+ $tab->getTitle()
+ );
// Content
$ariaHidden = ($i === 0) ? 'false' : 'true';
- $content .= '<div class="tab-content' . $active . '" data-tab="' . $slug . '" role="tabpanel" aria-hidden="' . $ariaHidden . '"';
+ $content .= sprintf(
+ '<div class="tab-content%s" data-tab="%s" role="tabpanel" aria-hidden="%s"',
+ $active,
+ $slug,
+ $ariaHidden
+ );
if ($i !== 0) {
$content .= ' hidden';
}
- $content .= '>
- <h2>' . $tab->getTitle() . '</h2>';
+ $content .= sprintf('>
+ <h2>%s</h2>',
+ $tab->getTitle(),
+ );
// Description
if ($tab->getDescription()) {
$description = $tab->getDescription();
if (!is_array($description)) {
- $content .= apply_filters('the_content', $description);
+ $content .= jvb_filter_content( $description);
} else {
$content .= implode('', array_map(function ($paragraph) {
- return apply_filters('the_content', $paragraph);
+ return jvb_filter_content( $paragraph);
}, $description));
}
}
- $content .= $tab->getContent() . '
- </div>';
+ $content .= sprintf('%s
+ </div>',
+ $tab->getContent());
$i++;
}
--
Gitblit v1.10.0