has('dashboard') || !is_user_logged_in()) { return; } ?> has('notifications') && is_user_logged_in()) { ob_start(); ?>
  • 'Behind the Scenes'])?> Go Behind the Scenes
  • has('helpMenu')) { return ''; } $out = get_option(BASE.'help_menu'); if ($out === false) { $open = '
  • '; $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('sign-out').'Logout
  • '; } else { $out .= '
  • '.jvbIcon('sign-in').'Login
  • '; } return $out; } /** * Outputs the search bar (likely don't need anymore) * @return string */ function jvbSearch(string $placeholder = 'Search...', string $id = 'search'):string { return Form::search($placeholder, $id); } function jvbModalActions() { return '
    '; } function jvbNewModal(string $class, string $title, string $form) { return '

    '.$title.'

    '.str_replace('', jvbModalActions().'', $form).'
    '; } /** * Formats an image to match our image replacement formatting * @param int|string $imgID * @param string $start * @param string $end * * @return string */ function jvbFormatImage(int $imgID, string $start = 'tiny', string $end = 'large', bool $addLink = true, ?string $postSlug = null):string { $image = new Image(); return $image->formatImage($imgID, $start, $end, $addLink, $postSlug); } function jvbImageCaption(int $imgID, string $start = 'tiny', string $end = 'large', bool $addLink = true, ?string $postSlug = null):string { $caption = wp_get_attachment_caption($imgID); $caption = ($caption && $caption !== '') ? '
    '.jvb_filter_content( $caption).'
    ' : ''; return '
    '.jvbFormatImage($imgID, $start, $end, $addLink, $postSlug).$caption.'
    '; } /** * 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) }; ?>
    '.jvbIcon($icon).'

    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, $icon = true, $return = false):string { $top = $top ? ' abs top' : ''; $bar = sprintf( '
    %s
    %s
    ', $top, ($icon) ? '': '', $inside ); if (!$return) { echo $bar; } return $bar; } function jvbFormStatus(string $message = '') { return ' '; }