Exemple #1
0
 * - title
 * - excerpt
 *
 * Single post page display:
 * - featured image
 * - title
 * - excerpt when excerpt field set and not paged
 * - content
 *
 * @package    Modern
 * @copyright  2015 WebMan - Oliver Juhas
 *
 * @since    1.0
 * @version  1.3
 */
$pagination_suffix = wm_paginated_suffix('small', 'post');
?>

<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
echo apply_filters('wmhook_entry_container_atts', '');
?>
>

  <?php 
/**
 * Post media
 */
Exemple #2
0
 * Archives template
 *
 * @package    Modern
 * @copyright  2015 WebMan - Oliver Juhas
 *
 * @since    1.0
 * @version  1.2
 */
get_header();
?>


	<section class="archives-listing">

		<header class="page-header">
			<?php 
the_archive_title('<h1 class="page-title">', wm_paginated_suffix('small') . '</h1>');
the_archive_description('<div class="taxonomy-description">', '</div>');
?>

		</header>

		<?php 
get_template_part('loop', 'archive');
?>


	</section>

	<?php 
get_footer();
Exemple #3
0
 function wm_seo_title($title, $separator)
 {
     //Helper variables
     if (!$separator) {
         $separator = ' | ';
     }
     $separator = apply_filters('wmhook_wm_seo_title_separator', $separator);
     $title = apply_filters('wmhook_wm_seo_title_separator', $title);
     //Preparing output
     if (is_feed()) {
         return $title;
     }
     if (is_tag()) {
         //tag archive
         $title = sprintf(__('Tag archive for "%s"', 'wm_domain'), single_tag_title('', false)) . $separator;
     } elseif (is_search()) {
         //search
         $title = sprintf(__('Search for "%s"', 'wm_domain'), get_search_query()) . $separator;
     } elseif (is_archive()) {
         //general archive
         $title = sprintf(__('Archive for %s', 'wm_domain'), $title) . $separator;
     } elseif (is_singular() && !is_404() && !is_front_page() && !is_home()) {
         //is page or post but not 404, front page nor home page post list
         $title = trim($title) . $separator;
     } elseif (is_404()) {
         //404 page
         $title = __('Web page was not found', 'wm_domain') . $separator;
     } elseif (is_home() && get_option('page_for_posts')) {
         //post page (if set) - get the actual page title
         $title = get_the_title(get_option('page_for_posts')) . $separator;
     }
     $title .= get_bloginfo('name');
     //Front page
     if (is_front_page()) {
         $title .= $separator . get_bloginfo('description');
     }
     //Pagination / parts
     $title .= wm_paginated_suffix();
     //Output
     return apply_filters('wmhook_wm_seo_title_output', esc_attr($title));
 }
Exemple #4
0
 function wm_title($title, $sep)
 {
     //Requirements check
     if (is_feed()) {
         return $title;
     }
     //Helper variables
     $sep = ' ' . trim($sep) . ' ';
     //Preparing output
     $title .= get_bloginfo('name', 'display');
     //Site description
     if (($site_description = get_bloginfo('description', 'display')) && (is_home() || is_front_page())) {
         $title .= $sep . $site_description;
     }
     //Pagination / parts
     if (wm_paginated_suffix() && !is_404()) {
         $title .= $sep . wm_paginated_suffix();
     }
     //Output
     return esc_attr($title);
 }
Exemple #5
0
 function wm_post_title($args = array())
 {
     //Helper variables
     global $post;
     //Requirements check
     if (!($title = get_the_title()) || apply_filters('wmhook_wm_post_title_disable', false)) {
         return;
     }
     $output = '';
     $args = wp_parse_args($args, apply_filters('wmhook_wm_post_title_defaults', array('class' => 'entry-title', 'class_container' => 'entry-header', 'link' => esc_url(get_permalink()), 'output' => '<header class="{class_container}"><{tag} class="{class}"' . wm_schema_org('name') . '>{title}</{tag}></header>', 'tag' => 'h1', 'title' => '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $title . '</a>')));
     //Preparing output
     //Singular title (no link applied)
     if (is_single() || is_page() && 'page' === get_post_type()) {
         if ($suffix = wm_paginated_suffix('small')) {
             $args['title'] .= $suffix;
         } else {
             $args['title'] = $title;
         }
         if (($helper = get_edit_post_link(get_the_ID())) && is_page()) {
             $args['title'] .= ' <a href="' . esc_url($helper) . '" class="entry-edit" title="' . esc_attr(sprintf(__('Edit the "%s"', 'wm_domain'), the_title_attribute(array('echo' => false)))) . '"><span>' . _x('Edit', 'Edit post link.', 'wm_domain') . '</span></a>';
         }
     }
     //Food Menus CPT title
     if ('nova_menu_item' === get_post_type()) {
         $args['class_container'] .= ' food-menu-item-header';
         //Food menu items title tag
         if (!is_single()) {
             $args['tag'] = 'h3';
         }
         //Check whether we have post content and set the link accordingly
         $permalink = array('', '');
         $content = trim(strip_tags(get_the_content()));
         if ($content) {
             $permalink = array('<a href="' . esc_url(get_permalink()) . '">', '</a>');
         }
         $permalink = apply_filters('wmhook_wm_post_title_nova_menu_item_permalink', $permalink);
         $args['title'] = $permalink[0];
         $args['title'] .= '<span class="food-menu-item-title">' . $title . '</span>';
         $args['title'] .= '<span class="food-menu-item-price">' . strip_tags(get_post_meta(get_the_ID(), 'nova_price', true)) . '</span>';
         $args['title'] .= $permalink[1];
     }
     //Filter processed $args
     $args = apply_filters('wmhook_wm_post_title_args', $args);
     //Generating output HTML
     $replacements = apply_filters('wmhook_wm_post_title_replacements', array('{class}' => esc_attr($args['class']), '{class_container}' => esc_attr($args['class_container']), '{tag}' => esc_attr($args['tag']), '{title}' => do_shortcode($args['title'])), $args);
     $output = strtr($args['output'], $replacements);
     //Output
     echo apply_filters('wmhook_wm_post_title_output', $output, $args);
 }
Exemple #6
0
 function wm_post_title($title = true)
 {
     //Helper variables
     $output = '';
     $is_single = is_home() && wm_option('blog-full-posts') ? true : is_single();
     $link = array('<a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a>');
     $suffix = wm_paginated_suffix('small', 'post');
     $top_meta = apply_filters('wmhook_wm_post_title_top_meta', array('class' => 'entry-meta entry-meta-categories clearfix', 'meta' => array('categories')));
     $bottom_meta = array('meta' => array(10 => 'date', 20 => 'author', 30 => 'comments'));
     if (function_exists('bawpvc_views_sc')) {
         $bottom_meta['meta'][40] = 'views';
     }
     if (function_exists('lip_love_it_link') || function_exists('zilla_likes')) {
         $bottom_meta['meta'][50] = 'likes';
     }
     ksort($bottom_meta['meta']);
     $bottom_meta = apply_filters('wmhook_wm_post_title_bottom_meta', $bottom_meta);
     //Output
     $output .= '<header class="entry-header">';
     $output .= wm_post_meta($top_meta);
     if ($title) {
         if ($is_single) {
             if (!$suffix && !apply_filters('wmhook_enable_blog_full_posts', false)) {
                 $link = array('', '');
             }
             $output .= the_title('<h1 class="entry-title"' . wm_schema_org('name') . '>' . $link[0], $link[1] . $suffix . '</h1>', false);
         } else {
             $output .= the_title('<h1 class="entry-title"' . wm_schema_org('name') . '>' . $link[0], $link[1] . '</h1>', false);
         }
     }
     $output .= wm_post_meta($bottom_meta);
     $output .= '</header>';
     //Output
     echo apply_filters('wmhook_wm_post_title_output', $output);
 }
Exemple #7
0
 function wm_post_title($args = array())
 {
     //Helper variables
     global $post;
     //Requirements check
     if (!($title = get_the_title()) || apply_filters('wmhook_wm_post_title_disable', false)) {
         return;
     }
     $output = '';
     $args = wp_parse_args($args, apply_filters('wmhook_wm_post_title_defaults', array('class' => 'entry-title', 'class_container' => 'entry-header', 'link' => esc_url(get_permalink()), 'output' => '<header class="{class_container}"><{tag} class="{class}"' . wm_schema_org('name') . '>{title}</{tag}></header>', 'tag' => 'h1', 'title' => '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $title . '</a>')));
     //Preparing output
     //Singular title (no link applied)
     if (is_single() || is_page() && 'page' === get_post_type()) {
         if ($suffix = wm_paginated_suffix('small')) {
             $args['title'] .= $suffix;
         } else {
             $args['title'] = $title;
         }
         if (($helper = get_edit_post_link(get_the_ID())) && is_page()) {
             $args['title'] .= ' <a href="' . esc_url($helper) . '" class="entry-edit" title="' . esc_attr(sprintf(__('Edit the "%s"', 'wm_domain'), the_title_attribute(array('echo' => false)))) . '"><span>' . _x('Edit', 'Edit post link.', 'wm_domain') . '</span></a>';
         }
     }
     //Filter processed $args
     $args = apply_filters('wmhook_wm_post_title_args', $args);
     //Generating output HTML
     $replacements = apply_filters('wmhook_wm_post_title_replacements', array('{class}' => esc_attr($args['class']), '{class_container}' => esc_attr($args['class_container']), '{tag}' => esc_attr($args['tag']), '{title}' => do_shortcode($args['title'])), $args);
     $output = strtr($args['output'], $replacements);
     //Output
     echo apply_filters('wmhook_wm_post_title_output', $output, $args);
 }
 * - excerpt
 * - content
 *
 * @package    Auberge
 * @copyright  2015 WebMan - Oliver Juhas
 *
 * @since    1.0
 * @version  1.4
 */
/**
 * Requirements check
 */
if (!current_theme_supports('nova_menu_item')) {
    return;
}
$pagination_suffix = wm_paginated_suffix('small', 'nova_menu_item');
//Wrapper tag setup
$tag = is_single() ? 'array' : 'aside';
?>

<<?php 
echo $tag;
?>
 id="post-<?php 
the_ID();
?>
" <?php 
post_class();
echo apply_filters('wmhook_entry_container_atts', '');
?>
>
Exemple #9
0
 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);
 }