has('dashboard') || !is_user_logged_in()) {
return;
}
?>
= jvbIcon('clock') ?>
Started:
|
Everything is up to date.
= jvbIcon('dashboard', ['title' => 'Behind the Scenes'])?>
Go Behind the Scenes
';
$close = '';
$titles = array(
'About',
'Contact',
'Request a Feature',
'Technical Issue',
);
$links = '';
foreach ($titles as $t) {
$page = new WP_Query(array(
'post_type' => 'page',
'title' => $t,
'fields' => 'ids'
));
if ($page->have_posts()) {
$end = ($t == 'About') ? 'Partners' : '';
$links .= $open.get_the_permalink($page->posts[0]).'" title="'.$t.$mid.$t.$close.$end;
}
wp_reset_postdata();
}
$out = '';
update_option(BASE.'help_menu', $out);
}
if (is_user_logged_in()) {
$out .= ''.jvbIcon('logout').'Logout';
} else {
$out .= ''.jvbIcon('login').'Login';
}
return $out;
}
/**
* Outputs the search bar (likely don't need anymore)
* @return string
*/
function jvbSearch(string $placeholder = 'Search...'):string
{
return '
';
}
function jvbModalActions()
{
return '
';
}
function jvbNewModal(string $class, string $title, string $form)
{
return '';
}
/**
* Formats an image to match our image replacement formatting
* @param int|string $imgID
* @param string $start
* @param string $end
*
* @return string
*/
function jvbFormatImage(int|string $imgID, string $start = 'tiny', string $end = 'large'):string
{
$block = new \JVBase\blocks\CustomBlocks();
if ($imgID === '' || $imgID === 0) {
$imgID = $block->imageID($imgID);
}
if ($imgID === '' || $imgID === 0 || $imgID === false) {
return '';
}
$imgID = (int)$imgID;
return $block->formatImage($imgID, $start, $end);
}
/**
* Outputs the notification container in the footer
* @return void
*/
add_action('wp_footer', 'jvbToastContainer');
function jvbToastContainer():void
{
?>
jvbNoBase($obj->taxonomy),
default => jvbNoBase($obj->post_type)
};
?>
'.apply_filters('jvbLoadingIcon', jvbIcon('tattoo')).'
Loading
Please wait...
';
}
/**
* @param array $tabs Array containing:
* $tabs = [
* 'tab1' => [
* 'title' => $title1,
* 'icon' => 'artist',
* 'description' => $description1,
* 'content' => $content1
* ],
* 'tab2' => [
* 'title' => $title2,
* 'content' => $content2
* ]
* ]
* @param bool $return Whether to output or return the form
* @return mixed
*/
function jvbRenderTabs(array $tabs, bool $return = false):string
{
if (empty($tabs)) {
echo '';
return '';
}
$header = '';
$out = $header.$content;
if ($return) {
return $out;
}
echo $out;
return $out;
}
function jvbRenderProgressBar(string $inside ='', $top = false)
{
$top = $top ? ' abs top' : '';
?>