static function problogger_masthead() { global $post; if (!$post) { return false; } $show = get_post_meta($post->ID, '_problogger_meta_masthead_show_key', true); if ('1' === $show) { return false; } if (!problogger_option('show_masthead', false)) { get_template_part('block', 'masthead'); return false; } $the_post_id = problogger_option('masthead_post', false); if (!get_post_status($the_post_id)) { return false; } $the_post = get_post($the_post_id); $width = problogger_option('masthead_width', 'container'); $the_content = apply_filters('the_content', $the_post->post_content); $breadcrumbs = pgb_get_option('show_breadcrumb') === '1' ? sprintf('<div id="breadcrumb-container">%s</div>', pgb_get_breadcrumbs()) : ''; $output = $the_content; switch ($width) { case 'full': $output = sprintf('<header id="masthead" class="page-header problogger-header">%s%s</header>', $breadcrumbs, $the_content); break; case 'fullcontain': $output = sprintf('<header id="masthead" class="page-header problogger-header"><div class="container">%s%s</div></header>', $breadcrumbs, $the_content); break; case 'container': default: $output = sprintf('<header id="masthead" class="page-header problogger-header container">%s%s</header>', $breadcrumbs, $the_content); break; } return print $output; }
function pgb_breadcrumbs() { $breadcrumbs = pgb_get_breadcrumbs(); print $breadcrumbs; return; }