Exemplo n.º 1
0
 function receptar_post_title($args = array())
 {
     //Helper variables
     global $post;
     //Requirements check
     if (!($title = get_the_title()) || apply_filters('wmhook_receptar_post_title_disable', false)) {
         return;
     }
     $output = $meta = '';
     $args = wp_parse_args($args, apply_filters('wmhook_receptar_post_title_defaults', array('class' => 'entry-title', 'class_container' => 'entry-header', 'link' => esc_url(get_permalink()), 'output' => '<header class="{class_container}"><{tag} class="{class}"' . receptar_schema_org('name') . '>{title}</{tag}>{meta}</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 = receptar_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(esc_html__('Edit the "%s"', 'receptar'), the_title_attribute(array('echo' => false)))) . '"><span>' . esc_html_x('Edit', 'Edit post link.', 'receptar') . '</span></a>';
         }
     }
     //Post meta
     if (is_single()) {
         $meta = receptar_post_meta(array('class' => 'entry-category', 'meta' => array('category')));
     }
     //Filter processed $args
     $args = apply_filters('wmhook_receptar_post_title_args', $args);
     //Generating output HTML
     $replacements = apply_filters('wmhook_receptar_post_title_replacements', array('{class}' => esc_attr($args['class']), '{class_container}' => esc_attr($args['class_container']), '{meta}' => $meta, '{tag}' => esc_attr($args['tag']), '{title}' => do_shortcode($args['title'])), $args);
     $output = strtr($args['output'], $replacements);
     //Output
     echo apply_filters('wmhook_receptar_post_title_output', $output, $args);
 }
Exemplo n.º 2
0
<?php

/**
 * Archives template
 *
 * @package    Receptar
 * @copyright  2015 WebMan - Oliver Juhas
 *
 * @since    1.0
 * @version  1.3
 */
get_header();
?>

	<section class="archives-listing">

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

		<?php 
get_template_part('template-parts/loop', 'archive');
?>

	</section>

	<?php 
get_footer();
Exemplo n.º 3
0
<?php

/**
 * Standard post/page content
 *
 * @package    Receptar
 * @copyright  2015 WebMan - Oliver Juhas
 *
 * @since    1.0
 * @version  1.0
 */
$pagination_suffix = receptar_paginated_suffix('small', 'post');
?>

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

	<?php 
/**
 * Post media
 */
if (apply_filters('wmhook_entry_featured_image_display', true)) {
    $image_size = apply_filters('wmhook_entry_featured_image_size', 'thumbnail');
    $image_link = is_singular() ? wp_get_attachment_image_src(get_post_thumbnail_id(), 'full') : array(esc_url(get_permalink()));
    $image_link = array_filter((array) apply_filters('wmhook_entry_image_link', $image_link));
Exemplo n.º 4
0
 function receptar_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 (receptar_paginated_suffix() && !is_404()) {
         $title .= $sep . receptar_paginated_suffix();
     }
     //Output
     return esc_attr($title);
 }