<?php /** * bbPress Topic content * * @package WebMan WordPress Theme Framework * @subpackage Post Formats * @copyright 2014 WebMan - Oliver Juhas */ ?> <section id="post-<?php the_ID(); ?> " <?php post_class(); echo wm_schema_org('item_list'); ?> > <?php wmhook_entry_top(); the_content(); wmhook_entry_bottom(); ?> </section>
<h1 class="page-title"><?php $title_food_menu = (string) apply_filters('wmhook_loop_food_menu_title_text', _x('Menu', 'Food menu title.', 'wm_domain')); $food_menu_page_id = intval(get_transient('wm-page-template-food-menu')); if (1 <= $food_menu_page_id) { $title_food_menu = '<a href="' . esc_url(get_permalink($food_menu_page_id)) . '">' . $title_food_menu . '</a>'; } echo apply_filters('wmhook_loop_food_menu_title_text_html', $title_food_menu); ?> </h1> </header> <?php } do_action('wmhook_loop_food_menu_postslist_before'); echo '<div class="items items-list clearfix"' . wm_schema_org('ItemList') . '>'; do_action('wmhook_loop_food_menu_postslist_top'); while ($food_menu->have_posts()) { $food_menu->the_post(); get_template_part('content', 'food-menu'); } do_action('wmhook_loop_food_menu_postslist_bottom'); echo '</div>'; do_action('wmhook_loop_food_menu_postslist_after'); ?> </section> <?php } wp_reset_query();
} ?> <article class="<?php echo $helper['item_class']; ?> "<?php echo wm_schema_org('article'); ?> > <?php if (has_post_thumbnail($helper['post_id'])) { echo '<div class="wm-posts-element wm-html-element image image-container"' . wm_schema_org('image') . '>'; echo $link_output[0]; the_post_thumbnail($helper['image_size'], array('title' => esc_attr(get_the_title(get_post_thumbnail_id($helper['post_id']))))); echo $link_output[1]; echo '</div>'; } ?> <div class="wm-posts-element wm-html-element title"><?php echo '<' . $helper['atts']['heading_tag'] . wm_schema_org('name') . '>'; echo $link_output[0]; the_title(); echo $link_output[1]; echo '</' . $helper['atts']['heading_tag'] . '>'; ?> </div> </article>
} else { $posts_images = wm_get_post_images(); foreach ($posts_images as $image) { $images[] = $image['id']; } } if (is_array($images) && !empty($images)) { echo do_shortcode(apply_filters('wmhook_post_format_gallery_slideshow_shortcode', '[wm_slideshow ids="' . implode(',', $images) . '" nav="pagination" size="' . $image_size . '" speed="4000" /]')); } } } //If no gallery, display featured image (also, always display featured image on single post page) if ($is_single && !apply_filters('wmhook_disable_single_featured_image', false) && !(function_exists('wma_meta_option') && wma_meta_option('disable-featured-image')) && !$pagination_suffix) { echo wm_thumb(array('attr-link' => wm_schema_org('image'), 'class' => 'image-container post-thumbnail scale-rotate', 'link' => 'bigimage', 'size' => 'content-width')); } elseif (!$is_single && (!$media_shortcode[0] || !function_exists('wma_amplifier'))) { echo wm_thumb(array('attr-link' => wm_schema_org('image'), 'class' => 'image-container post-thumbnail scale-rotate', 'link' => get_permalink(), 'size' => $image_size)); } ?> </div> <?php /** * Post title */ wm_post_title(); /** * Post content */ if ($is_single) { //Outputs full post content including excerpt at the top wmhook_entry_top();
/** * Default WordPress posts loop * * @package Auberge * @copyright 2015 WebMan - Oliver Juhas * * @since 1.0 * @version 1.3 */ if (have_posts()) { wmhook_postslist_before(); if (is_archive() && is_tax('nova_menu')) { echo '<div id="items" class="items items-list clearfix"' . wm_schema_org('ItemList') . '>'; } else { echo '<div id="posts" class="posts posts-list clearfix"' . wm_schema_org('ItemList') . '>'; } wmhook_postslist_top(); while (have_posts()) { the_post(); $content_type = get_post_format(); if ('nova_menu_item' === get_post_type()) { $content_type = 'food-menu'; } get_template_part('content', $content_type); } wmhook_postslist_bottom(); echo '</div>'; wmhook_postslist_after(); } else { get_template_part('content', 'none');
} $output_contacts .= '</li>'; } if ($output_contacts) { echo '<ul class="wm-posts-element wm-html-element contacts">' . $output_contacts . '</ul>'; } } ?> <?php $terms = get_the_terms($helper['post_id'], 'staff_position'); $terms_array = array(); if (!is_wp_error($terms) && !empty($terms)) { foreach ($terms as $term) { $terms_array[] = '<span class="term term-' . sanitize_html_class($term->slug) . '"' . wm_schema_org('itemprop="jobtitle"') . '>' . $term->name . '</span>'; } echo '<div class="wm-posts-element wm-html-element taxonomy">' . $link_output[0] . implode(', ', $terms_array) . $link_output[1] . '</div>'; } ?> <div class="wm-posts-element wm-html-element content"<?php echo wm_schema_org('description'); ?> > <?php echo do_shortcode(wpautop(get_the_content())); ?> </div> </article>
if (!empty($image_link)) { echo '</a>'; } ?> </figure> </div> <?php /** * Post content */ echo '<div class="entry-inner">'; wmhook_entry_top(); echo '<div class="entry-content"' . wm_schema_org('itemprop="description"') . '>'; ?> <table> <tbody> <tr class="date"> <th><?php _ex('Image published on:', 'Attachment page publish time.', 'wm_domain'); ?> </th> <td><?php the_time(get_option('date_format')); ?> </td> </tr> <tr class="size">
?> </figure> </div> <?php } /** * Post content */ echo '<div class="entry-inner">'; wmhook_entry_top(); echo '<div class="entry-content"' . wm_schema_org('entry_body') . '>'; if (has_excerpt() && !$pagination_suffix) { echo '<div class="food-menu-item-description"' . wm_schema_org('itemprop="description"') . '>'; the_excerpt(); echo '</div>'; } if (is_single()) { the_content(apply_filters('wmhook_wm_excerpt_continue_reading', '')); } echo '</div>'; wmhook_entry_bottom(); echo '</div>'; ?> </<?php echo $tag; ?> >
} //Remove the shortcode from content if ($media_shortcode) { $content = str_replace($media_shortcode, '', $content); } //Output media if ($media_shortcode) { echo do_shortcode($media_shortcode); } //If no video display featured image if (!$is_single && !$media_shortcode) { $image_size = apply_filters('wmhook_post_thumbnail_image_size', wm_option('skin-image-blog')); if (!$image_size) { $image_size = WM_DEFAULT_IMAGE_SIZE; } echo wm_thumb(array('attr-link' => wm_schema_org('image'), 'link' => get_permalink(), 'size' => $image_size)); } ?> </div> <?php } /** * Post title */ wm_post_title(); /** * Post content */ if ($is_single) { //Outputs full post content including excerpt at the top
if (!$sections_layout) { echo "\r\n\r\n" . '<div class="wrap-inner">'; $content_area_class = $sidebar['class_main']; } echo "\r\n\t" . '<div class="content-area site-content' . $content_area_class . '">' . "\r\n\r\n"; wmhook_entry_before(); if (have_posts()) { the_post(); if ($sidebar_none_posts) { /** * Remove JetPack sharing when Sections used */ if ($sections_layout) { remove_filter('the_content', 'sharing_display', 19); } echo '<article id="post-' . get_the_ID() . '" class="' . implode(' ', get_post_class()) . '"' . wm_schema_org('article') . '>'; wmhook_entry_top(); the_content(); wmhook_entry_bottom(); echo '</article>'; } else { $content_type = ''; if (is_singular('post')) { $content_type = get_post_format(); } elseif (get_post_type()) { $content_type = 'type-' . get_post_type(); } get_template_part('content', apply_filters('wmhook_loop_singular_content_type', $content_type)); } wp_reset_query(); }
function wm_bbp_large_topic() { global $paged; //Requirements check if (!(bbp_is_single_topic() || bbp_is_single_reply())) { return; } //Helper variables $output = array(); $post_id = bbp_is_single_reply() ? bbp_get_reply_topic_id() : get_the_id(); //Preparing output $output[10] = '<div class="bbp-large-topic">'; $output[20] = '<div class="wrap-inner">'; $output[30] = '<div class="content-area site-content pane twelve">'; $output[100] = '<div ' . bbp_get_reply_class() . wm_schema_org('article') . '>'; //Author $output[110] = '<div class="bbp-reply-author">'; $output[120] = bbp_get_reply_author_link(array('post_id' => $post_id, 'sep' => '<br />', 'show_role' => true)); $output[130] = '</div>'; // /.bbp-reply-author //Heading and content $output[200] = '<div class="bbp-reply-content">'; $output[210] = '<h1 class="bbp-topic-title">'; if (1 < $paged) { $output[210] .= '<a href="' . get_permalink($post_id) . '">'; } $output[210] .= bbp_get_topic_title($post_id); if (1 < $paged) { $output[210] .= '</a> ' . wm_paginated_suffix('small'); } $output[210] .= '</h1>'; $output[220] = bbp_get_topic_tag_list($post_id); if (!post_password_required($post_id)) { $output[230] = '<div class="bbp-content-container">'; setup_postdata(get_post($post_id)); $output[240] = apply_filters('wmhook_content_filters', bbp_get_topic_content($post_id), $post_id); wp_reset_postdata(); $output[250] = '</div>'; // /.bbp-content-container } $output[260] = '</div>'; // /.bbp-reply-content //Meta $output[300] = '<div class="bbp-meta">'; $output[310] = '<span class="bbp-reply-post-date">' . bbp_get_reply_post_date($post_id) . '</span>'; if (bbp_is_single_user_replies()) { $output[320] = '<span class="bbp-header">'; $output[330] = __('in reply to: ', 'mustang'); $output[340] = '<a class="bbp-topic-permalink" href="' . bbp_get_topic_permalink(bbp_get_reply_topic_id($post_id)) . '">'; $output[350] = bbp_get_topic_title(bbp_get_reply_topic_id($post_id)); $output[360] = '</a>'; // /.bbp-topic-permalink $output[370] = '</span>'; // /.bbp-header } $output[380] = bbp_get_reply_admin_links(array('id' => $post_id)); $output[390] = '</div>'; // /.bbp-meta $output[500] = '</div>'; // /.bbp_get_reply_class() $output[600] = '</div>'; // /.content-area $output[610] = '</div>'; // /.wrap-inner $output[620] = '</div>'; // /.bbp-large-topic //Output $output = apply_filters('wmhook_wm_bbp_large_topic_output', $output, $post_id); echo implode('', $output); }
* @subpackage Post Formats * @copyright 2014 WebMan - Oliver Juhas */ ?> <article id="post-<?php the_ID(); ?> " <?php post_class(); echo wm_schema_org('article'); ?> > <?php wm_post_title(false); wmhook_entry_top(); //Featured image if (has_post_thumbnail()) { $image_size = apply_filters('wmhook_quote_post_thumbnail_image_size', 'admin-thumbnail'); echo '<div class="quote-container has-thumbnail">'; echo wm_thumb(array('attr-link' => wm_schema_org('image'), 'link' => '', 'size' => $image_size)); } else { echo '<div class="quote-container">'; } echo apply_filters('wmhook_content_filters', get_the_content()); echo '</div>'; wmhook_entry_bottom(); ?> </article>
<?php /** * Status post format content * * @package WebMan WordPress Theme Framework * @subpackage Post Formats * @copyright 2014 WebMan - Oliver Juhas */ ?> <article id="post-<?php the_ID(); ?> " <?php post_class(); echo wm_schema_org('article'); ?> > <?php wm_post_title(false); wmhook_entry_top(); echo get_avatar(get_the_author_meta('ID'), 120); echo apply_filters('wmhook_content_filters', get_the_content()); wmhook_entry_bottom(); ?> </article>
<?php if (has_post_thumbnail($helper['post_id'])) { echo '<div class="wm-posts-element wm-html-element image image-container scale-rotate"' . wm_schema_org('image') . '>'; echo $link_output[0]; the_post_thumbnail($helper['image_size'], array('title' => esc_attr(get_the_title(get_post_thumbnail_id($helper['post_id']))))); echo $link_output[1]; echo '</div>'; } ?> <div class="wm-posts-element wm-html-element title"><?php echo '<' . $helper['atts']['heading_tag'] . wm_schema_org('name') . '>'; echo $link_output[0]; the_title(); echo $link_output[1]; echo '</' . $helper['atts']['heading_tag'] . '>'; ?> </div> <?php if (0 < $helper['excerpt_length']) { echo '<div class="wm-posts-element wm-html-element content"' . wm_schema_org('description') . '>' . wp_trim_words(get_the_excerpt(), $helper['excerpt_length'], '…') . '</div>'; } ?> <?php echo wm_post_meta(apply_filters('wmhook_shortcode_posts_meta_info', array('class' => 'wm-posts-element wm-html-element meta entry-meta', 'date_format' => trim(str_replace(array('Y'), '', get_option('date_format')), ', '), 'meta' => array('date', 'comments', 'permalink')))); ?> </article>
* Search results * * @package WebMan WordPress Theme Framework * @copyright 2014 WebMan - Oliver Juhas * * @since 1.0 * @version 1.1.1 */ if (have_posts()) { wmhook_postslist_before(); echo '<div id="list-articles" class="list-articles list-search clearfix"' . wm_schema_org('item_list') . '>'; wmhook_postslist_top(); while (have_posts()) { the_post(); $output = '<article class="search-item"' . wm_schema_org('article') . '>'; $output .= '<header class="entry-header"><h1 class="entry-title"' . wm_schema_org('name') . '>'; if (has_post_thumbnail()) { $thumb_size = !function_exists('wma_amplifier') ? array(100, 100) : 'admin-thumbnail'; $output .= '<a href="' . get_permalink() . '" title="' . esc_attr(get_the_title()) . '">'; $output .= get_the_post_thumbnail(get_the_ID(), $thumb_size); $output .= '</a>'; } $output .= '<a href="' . get_permalink() . '">'; $output .= get_the_title(); $output .= '</a>'; $output .= '</h1></header>'; $output .= wm_excerpt(); $output .= 'page' === get_post_type() ? wm_post_meta(apply_filters('wmhook_search_page_meta', array('meta' => array('permalink')))) : wm_post_meta(); $output .= '</article>'; echo $output; }
?> </figure> </div> <?php /** * Post title */ ?> <div class="site-banner-header"> <h1 class="entry-title"<?php echo wm_schema_org('name'); ?> > <a href="<?php echo esc_url(get_permalink()); ?> " rel="bookmark"><?php if ($custom_title = trim(get_post_meta(get_the_ID(), 'banner_text', true))) { //Display 'banner_text' custom field if set echo $custom_title; } else { //If no 'banner_text' custom field set, fall back to post title the_title(); } ?> </a>
<?php /** * Default WordPress loop content * * @package WebMan WordPress Theme Framework * @copyright 2014 WebMan - Oliver Juhas */ if (have_posts()) { wmhook_postslist_before(); echo '<div id="list-articles" class="list-articles clearfix"' . wm_schema_org('item_list') . '>'; wmhook_postslist_top(); while (have_posts()) { the_post(); get_template_part('content', get_post_format()); } wmhook_postslist_bottom(); echo '</div>'; wmhook_postslist_after(); } else { wm_not_found(); } wp_reset_query();
/** * Sidebar template * * @package Auberge * @copyright 2015 WebMan - Oliver Juhas * * @since 1.0 * @version 1.3 */ if (is_active_sidebar('sidebar')) { wmhook_sidebars_before(); ?> <div id="secondary" class="widget-area sidebar" role="complementary"<?php echo wm_schema_org('WPSideBar'); ?> > <a href="#" id="toggle-mobile-sidebar" class="toggle-mobile-sidebar button" aria-controls="secondary" aria-expanded="false"><?php _e('Toggle sidebar', 'wm_domain'); ?> </a> <?php wmhook_sidebar_top(); dynamic_sidebar('sidebar'); wmhook_sidebar_bottom(); ?> </div>
function wm_footer_top() { //Preparing output $output = "\r\n\r\n" . '<footer id="colophon" class="site-footer"' . wm_schema_org('WPFooter') . '>' . "\r\n\r\n"; //Output echo $output; }
?> "> <?php wmhook_entry_before(); //Blog page content $content = get_post($page_id); if (is_home() && !$page_id) { $content = false; } if ($content && (isset($paged) && 2 > $paged && $content)) { $content = $content->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); if ($content) { echo '<article id="post-' . $page_id . '" class="' . implode(' ', get_post_class('', $page_id)) . '"' . wm_schema_org('article') . '>'; wmhook_entry_top(); echo $content; wmhook_entry_bottom(); echo '</article>'; } } wmhook_entry_after(); //Blog posts list if (function_exists('wma_amplifier')) { $loop_type = is_page_template('home.php') && !is_home() ? 'blog' : 'index'; get_template_part('loop', $loop_type); } else { get_template_part('loop', 'index'); } ?>
function wm_post_meta($args = array()) { //Helper variables $output = ''; $args = wp_parse_args($args, apply_filters('wmhook_wm_post_meta_defaults', array('class' => 'entry-meta clearfix', 'date_format' => null, 'html' => '<span class="{class}"{attributes}>{content}</span>', 'html_custom' => array('date' => '<time datetime="{datetime}" class="{class}"{attributes}>{content}</time>'), 'meta' => array('date', 'author', 'category', 'comments', 'permalink'), 'post_id' => null, 'post' => null))); $args = apply_filters('wmhook_wm_post_meta_args', $args); $args['meta'] = array_filter((array) $args['meta']); if ($args['post_id']) { $args['post_id'] = absint($args['post_id']); $args['post'] = get_post($args['post_id']); } //Requirements check if (empty($args['meta'])) { return; } //Preparing output foreach ($args['meta'] as $meta) { //Allow custom metas $output .= apply_filters('wmhook_wm_post_meta', '', $meta, $args); //Predefined metas switch ($meta) { case 'author': if (apply_filters('wmhook_wm_post_meta_enable_author', true)) { $replacements = array('{attributes}' => wm_schema_org('creator'), '{class}' => 'author vcard entry-meta-element', '{content}' => '<a href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '" class="fn" rel="author">' . get_the_author() . '</a>'); $replacements = apply_filters('wmhook_wm_post_meta_replacements_author', $replacements); if (isset($args['html_custom']['author'])) { $output .= strtr($args['html_custom']['author'], $replacements); } else { $output .= strtr($args['html'], $replacements); } } break; case 'category': case 'categories': if (apply_filters('wmhook_wm_post_meta_enable_categories', true) && get_the_category_list('', '', $args['post_id'])) { $replacements = array('{attributes}' => '', '{class}' => 'cat-links entry-meta-element', '{content}' => get_the_category_list(', ', '', $args['post_id'])); $replacements = apply_filters('wmhook_wm_post_meta_replacements_category', $replacements); if (isset($args['html_custom']['category'])) { $output .= strtr($args['html_custom']['category'], $replacements); } else { $output .= strtr($args['html'], $replacements); } } break; case 'comments': if (apply_filters('wmhook_wm_post_meta_enable_comments', true) && (comments_open($args['post_id']) || get_comments_number($args['post_id']))) { $element_id = get_comments_number($args['post_id']) ? '#comments' : '#respond'; $replacements = array('{attributes}' => '', '{class}' => 'comments-link entry-meta-element', '{content}' => '<a href="' . get_permalink($args['post_id']) . $element_id . '" title="' . esc_attr(sprintf(__('Comments: %s', 'wm_domain'), get_comments_number($args['post_id']))) . '">' . sprintf(__('<span class="comments-title">Comments: </span>%s', 'wm_domain'), '<span class="comments-count">' . get_comments_number($args['post_id']) . '</span>') . '</a>'); $replacements = apply_filters('wmhook_wm_post_meta_replacements_comments', $replacements); if (isset($args['html_custom']['comments'])) { $output .= strtr($args['html_custom']['comments'], $replacements); } else { $output .= strtr($args['html'], $replacements); } } break; case 'date': if (apply_filters('wmhook_wm_post_meta_enable_date', true)) { $replacements = array('{attributes}' => ' title="' . esc_attr(get_the_date()) . ' | ' . esc_attr(get_the_time('', $args['post'])) . '"' . wm_schema_org('publish_date'), '{class}' => 'entry-date entry-meta-element updated', '{content}' => esc_html(get_the_date($args['date_format'])), '{datetime}' => esc_attr(get_the_date('c'))); $replacements = apply_filters('wmhook_wm_post_meta_replacements_date', $replacements); if (isset($args['html_custom']['date'])) { $output .= strtr($args['html_custom']['date'], $replacements); } else { $output .= strtr($args['html'], $replacements); } } break; case 'permalink': if (apply_filters('wmhook_wm_post_meta_enable_permalink', true)) { $the_title_attribute_args = array('echo' => false); if ($args['post_id']) { $the_title_attribute_args['post'] = $args['post']; } $replacements = array('{attributes}' => wm_schema_org('bookmark'), '{class}' => 'entry-permalink entry-meta-element', '{content}' => '<a href="' . get_permalink($args['post_id']) . '" title="' . esc_attr(sprintf(__('Permalink to %s', 'wm_domain'), the_title_attribute($the_title_attribute_args))) . '" rel="bookmark"><span>' . get_the_title($args['post_id']) . '</span></a>'); $replacements = apply_filters('wmhook_wm_post_meta_replacements_permalink', $replacements); if (isset($args['html_custom']['permalink'])) { $output .= strtr($args['html_custom']['permalink'], $replacements); } else { $output .= strtr($args['html'], $replacements); } } break; case 'tags': if (apply_filters('wmhook_wm_post_meta_enable_tags', true) && get_the_tag_list('', '', '', $args['post_id'])) { $replacements = array('{attributes}' => wm_schema_org('itemprop="keywords"'), '{class}' => 'tag-links entry-meta-element', '{content}' => sprintf(__('<strong>Tags:</strong> %s', 'wm_domain'), get_the_tag_list('', ', ', '', $args['post_id']))); $replacements = apply_filters('wmhook_wm_post_meta_replacements_tags', $replacements); if (isset($args['html_custom']['tags'])) { $output .= strtr($args['html_custom']['tags'], $replacements); } else { $output .= strtr($args['html'], $replacements); } } break; default: break; } // /switch } // /foreach if ($output) { $output = '<div class="' . esc_attr($args['class']) . '">' . $output . '</div>'; } //Output return apply_filters('wmhook_wm_post_meta_output', $output); }
<!--[if lte IE 8]><html class="ie ie8 lie9 lie8 no-js"<?php echo wm_schema_org('html'); ?> <?php language_attributes(); ?> ><![endif]--> <!--[if IE 9]><html class="ie ie9 lie9 no-js"<?php echo wm_schema_org('html'); ?> <?php language_attributes(); ?> ><![endif]--> <!--[if (gt IE 9)|!(IE)]><!--><html class="no-js"<?php echo wm_schema_org('html'); ?> <?php language_attributes(); ?> ><!--<![endif]--> <head> <meta charset="<?php bloginfo('charset'); ?> " /> <?php /** * HTML head */
function wm_post_meta($args = array()) { //Helper variables $output = ''; $args = wp_parse_args($args, apply_filters('wmhook_wm_post_meta_defaults', array('class' => 'entry-meta clearfix', 'date_format' => null, 'html' => '<span class="{class}"{attributes}>{content}</span> ', 'html_custom' => array('date' => '<time datetime="{datetime}" class="{class}"{attributes}>{content}</time> '), 'meta' => array(), 'post_id' => null, 'post' => null))); $args = apply_filters('wmhook_wm_post_meta_args', $args); $args['meta'] = array_filter((array) $args['meta']); if ($args['post_id']) { $args['post_id'] = absint($args['post_id']); $args['post'] = get_post($args['post_id']); } //Requirements check if (empty($args['meta'])) { return; } //Preparing output foreach ($args['meta'] as $meta) { //Allow custom metas $helper = ''; $replacements = (array) apply_filters('wmhook_wm_post_meta_replacements', array(), $meta, $args); $single_output = apply_filters('wmhook_wm_post_meta', '', $meta, $args); $output .= $single_output; //Predefined metas switch ($meta) { case 'author': if (apply_filters('wmhook_wm_post_meta_enable_' . $meta, true, $args)) { $replacements = array('{attributes}' => wm_schema_org('Person'), '{class}' => 'author vcard entry-meta-element', '{content}' => '<a href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '" class="url fn n" rel="author"' . wm_schema_org('author') . '>' . get_the_author() . '</a>'); } break; case 'category': if (apply_filters('wmhook_wm_post_meta_enable_' . $meta, true, $args) && wm_is_categorized_blog() && ($helper = get_the_category_list(', ', '', $args['post_id']))) { $replacements = array('{attributes}' => '', '{class}' => 'cat-links entry-meta-element', '{content}' => $helper); } break; case 'comments': if (apply_filters('wmhook_wm_post_meta_enable_' . $meta, true, $args) && !post_password_required() && (comments_open($args['post_id']) || get_comments_number($args['post_id']))) { $helper = get_comments_number($args['post_id']); //Don't know why this can not be in IF condition, but otherwise it won't work... $element_id = $helper ? '#comments' : '#respond'; $replacements = array('{attributes}' => '', '{class}' => 'comments-link entry-meta-element', '{content}' => '<a href="' . esc_url(get_permalink($args['post_id'])) . $element_id . '" title="' . esc_attr(sprintf(_x('Comments: %s', 'Number of comments in post meta.', 'wm_domain'), $helper)) . '">' . sprintf(_x('<span class="comments-title">Comments: </span>%s', 'Number of comments in post meta (keep the HTML tags).', 'wm_domain'), '<span class="comments-count">' . $helper . '</span>') . '</a>'); } break; case 'date': if (apply_filters('wmhook_wm_post_meta_enable_' . $meta, true, $args)) { $replacements = array('{attributes}' => ' title="' . esc_attr(get_the_date()) . ' | ' . esc_attr(get_the_time('', $args['post'])) . '"' . wm_schema_org('datePublished'), '{class}' => 'entry-date entry-meta-element published', '{content}' => esc_html(get_the_date($args['date_format'])), '{datetime}' => esc_attr(get_the_date('c'))); } break; case 'edit': if (apply_filters('wmhook_wm_post_meta_enable_' . $meta, true, $args) && ($helper = get_edit_post_link($args['post_id']))) { $the_title_attribute_args = array('echo' => false); if ($args['post_id']) { $the_title_attribute_args['post'] = $args['post']; } $replacements = array('{attributes}' => '', '{class}' => 'entry-edit entry-meta-element', '{content}' => '<a href="' . esc_url($helper) . '" title="' . esc_attr(sprintf(__('Edit the "%s"', 'wm_domain'), the_title_attribute($the_title_attribute_args))) . '"><span>' . _x('Edit', 'Edit post link.', 'wm_domain') . '</span></a>'); } break; case 'likes': if (apply_filters('wmhook_wm_post_meta_enable_' . $meta, true, $args) && function_exists('zilla_likes')) { global $zilla_likes; $helper = $zilla_likes->do_likes(); $replacements = array('{attributes}' => '', '{class}' => 'entry-likes entry-meta-element', '{content}' => $helper); } break; case 'permalink': if (apply_filters('wmhook_wm_post_meta_enable_' . $meta, true, $args)) { $the_title_attribute_args = array('echo' => false); if ($args['post_id']) { $the_title_attribute_args['post'] = $args['post']; } $replacements = array('{attributes}' => wm_schema_org('url'), '{class}' => 'entry-permalink entry-meta-element', '{content}' => '<a href="' . esc_url(get_permalink($args['post_id'])) . '" title="' . esc_attr(sprintf(__('Permalink to "%s"', 'wm_domain'), the_title_attribute($the_title_attribute_args))) . '" rel="bookmark"><span>' . get_the_title($args['post_id']) . '</span></a>'); } break; case 'tags': if (apply_filters('wmhook_wm_post_meta_enable_' . $meta, true, $args) && ($helper = get_the_tag_list('', ' ', '', $args['post_id']))) { $replacements = array('{attributes}' => wm_schema_org('keywords'), '{class}' => 'tags-links entry-meta-element', '{content}' => $helper); } break; case 'views': if (apply_filters('wmhook_wm_post_meta_enable_' . $meta, true, $args) && function_exists('bawpvc_views_sc') && ($helper = bawpvc_views_sc(array()))) { $replacements = array('{attributes}' => ' title="' . __('Views count', 'wm_domain') . '"', '{class}' => 'entry-views entry-meta-element', '{content}' => $helper); } break; default: break; } // /switch //Single meta output $replacements = (array) apply_filters('wmhook_wm_post_meta_replacements_' . $meta, $replacements, $args); if (empty($single_output) && !empty($replacements)) { if (isset($args['html_custom'][$meta])) { $output .= strtr($args['html_custom'][$meta], (array) $replacements); } else { $output .= strtr($args['html'], (array) $replacements); } } } // /foreach if ($output) { $output = '<div class="' . esc_attr($args['class']) . '">' . $output . '</div>'; } //Output return apply_filters('wmhook_wm_post_meta_output', $output, $args); }
function wm_section_content_top() { //Helper variables $output = "\r\n\r\n" . '<div id="content-section" class="content-section wrap clearfix" role="main"' . wm_schema_org('main_content') . '>' . "\r\n"; //Output echo apply_filters('wmhook_wm_section_content_top_output', $output); }
<?php /** * Custom page template * * Template Name: Blank page * * @package WebMan WordPress Theme Framework * @subpackage Page Templates * @copyright 2014 WebMan - Oliver Juhas */ get_header(); if (function_exists('wma_amplifier')) { echo '<div id="content-section" class="content-section wrap clearfix" role="main"' . wm_schema_org('main_content') . '>'; get_template_part('loop', 'singular'); echo '</div>'; } get_footer();
function custom_dot_recommended_top_posts($atts, $content = null) { // define attributes and their defaults // get our variable from $atts $args = array('posts_per_page' => $atts['number'], 'post_type' => $atts['post_type'], 'post_status' => 'publish'); $date_query = array(); // add year if (isset($atts['year']) && $atts['year'] !== '') { $date_query['year'] = $atts['year']; } // add monthnum if (isset($atts['monthnum']) && $atts['monthnum'] !== '') { $date_query['month'] = $atts['monthnum']; } if (count($date_query) > 0) { $args['date_query'] = $date_query; } // add category id if (isset($atts['cat']) && $atts['cat'] != '') { $args['cat'] = $atts['cat']; } $args['meta_key'] = $atts['_recommended']; $args['orderby'] = $atts['meta_value_num']; $recommended_post = new WP_Query($args); if ($recommended_post->have_posts()) { ?> <section class="blog-posts front-page-section"> <header class="page-header"> <h1 class="page-title"> <?php if (isset($atts['cat']) && $atts['cat'] != '') { echo get_cat_name($atts['cat']); } ?> </h1> </header> <?php do_action('wmhook_template_front_blog_postslist_before'); echo '<div class="posts posts-list clearfix"' . wm_schema_org('ItemList') . '>'; do_action('wmhook_template_front_blog_postslist_top'); while ($recommended_post->have_posts()) { $recommended_post->the_post(); get_template_part('content', get_post_format()); } do_action('wmhook_template_front_blog_postslist_bottom'); echo '</div>'; do_action('wmhook_template_front_blog_postslist_after'); ?> </section> <?php } }
} the_post_thumbnail($image_size); if (!empty($image_link)) { echo '</a>'; } ?> </figure> </div> <?php } /** * Post content */ echo '<div class="entry-inner">'; wmhook_entry_top(); echo '<div class="entry-content"' . wm_schema_org('entry_body') . '>'; if (!is_single()) { the_excerpt(); } if (is_single()) { the_content(apply_filters('wmhook_wm_excerpt_continue_reading', '')); } echo '</div>'; wmhook_entry_bottom(); echo '</div>'; ?> </article>
* * @since 1.0 * @version 1.3 */ get_header(); /** * Page featured image */ if (has_post_thumbnail()) { ?> <div class="entry-media"> <figure class="post-thumbnail"<?php echo wm_schema_org('image'); ?> > <?php the_post_thumbnail(apply_filters('wmhook_entry_featured_image_size', 'thumbnail')); ?> </figure> </div> <?php } // /has_post_thumbnail()
<?php /** * bbPress "Article" content * * User account * Topic tags edit * * @package WebMan WordPress Theme Framework * @subpackage Post Formats * @copyright 2014 WebMan - Oliver Juhas */ $schema_type = 'article'; if (bbp_is_single_user()) { $schema_type = 'person'; } ?> <article <?php post_class(); echo wm_schema_org($schema_type); ?> > <?php wmhook_entry_top(); the_content(); wmhook_entry_bottom(); ?> </article>
?> > <?php /** * Post media */ if (has_post_thumbnail() && !$pagination_suffix) { $image_size = apply_filters('wmhook_post_thumbnail_image_size', wm_option('skin-image-blog')); if (!$image_size) { $image_size = WM_DEFAULT_IMAGE_SIZE; } if ($is_single && !apply_filters('wmhook_disable_single_featured_image', false) && !(function_exists('wma_meta_option') && wma_meta_option('disable-featured-image'))) { echo '<div class="post-media"' . wm_schema_org('image') . '>' . wm_thumb(array('class' => 'image-container post-thumbnail scale-rotate', 'link' => 'bigimage', 'size' => 'content-width')) . '</div>'; } elseif (!$is_single) { echo '<div class="post-media"' . wm_schema_org('image') . '>' . wm_thumb(array('class' => 'image-container post-thumbnail scale-rotate', 'link' => get_permalink(), 'size' => $image_size)) . '</div>'; } } /** * Post title */ wm_post_title(); /** * Post content */ if ($is_single) { //Outputs full post content including excerpt at the top wmhook_entry_top(); if (has_excerpt() && !$pagination_suffix && !wm_option('blog-disable-single-post-excerpt')) { echo wm_excerpt(); }