function twentysixteen_entry_meta()
{
    ob_start();
    if ('post' === get_post_type()) {
        ob_start();
        twentysixteen_entry_date();
        $postedOn = ob_get_clean();
        $author_avatar_size = apply_filters('twentysixteen_author_avatar_size', 49);
        printf('<div class="name-date"><div class="name"><span class="screen-reader-text">%2$s </span> <a class="url fn n" href="%3$s">%4$s</a></div><div class="date">%5$s</div></div><div class="avatar">%1$s</div>', get_avatar(get_the_author_meta('user_email'), $author_avatar_size), _x('Author', 'Used before post author name.', 'twentysixteen'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author(), $postedOn);
    }
    if (in_array(get_post_type(), array('attachment'))) {
        twentysixteen_entry_date();
    }
    $authordate = ob_get_clean();
    printf('<div class="author-date">%s</div>', $authordate);
    $format = get_post_format();
    if (current_theme_supports('post-formats', $format)) {
        printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'twentysixteen')), esc_url(get_post_format_link($format)), get_post_format_string($format));
    }
    echo '<div class="taxonomies">';
    if ('post' === get_post_type()) {
        twentysixteen_entry_taxonomies();
    }
    echo '</div>';
    if (!is_singular() && !post_password_required() && (comments_open() || get_comments_number())) {
        echo '<span class="comments-link">';
        comments_popup_link(sprintf(__('Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentysixteen'), get_the_title()));
        echo '</span>';
    }
}
function directory_theme_entry_meta()
{
    if (is_sticky() && is_home() && !is_paged()) {
        printf('<span class="sticky-post">%s</span>', __('Featured', 'directory-starter'));
    }
    $format = get_post_format();
    if (current_theme_supports('post-formats', $format)) {
        printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'directory-starter')), esc_url(get_post_format_link($format)), get_post_format_string($format));
    }
    if (in_array(get_post_type(), array('post', 'attachment'))) {
        $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
        $time_string = sprintf($time_string, esc_attr(get_the_date('c')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date());
        printf('<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>', _x('Posted on', 'Used before publish date.', 'directory-starter'), esc_url(get_permalink()), $time_string);
    }
    if ('post' == get_post_type()) {
        if (is_singular() || is_multi_author()) {
            printf('<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>', _x('Author', 'Used before post author name.', 'directory-starter'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author());
        }
        $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'directory-starter'));
        if ($categories_list) {
            printf('<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Categories', 'Used before category names.', 'directory-starter'), $categories_list);
        }
        $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'directory-starter'));
        if ($tags_list) {
            printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Tags', 'Used before tag names.', 'directory-starter'), $tags_list);
        }
    }
    if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
        echo '<span class="comments-link">';
        comments_popup_link(__('Leave a comment', 'directory-starter'), __('1 Comment', 'directory-starter'), __('% Comments', 'directory-starter'));
        echo '</span>';
    }
}
function woo_tumblog_category_link($post_id = 0, $type = 'articles')
{
    $category_link = '';
    if (get_option('woo_tumblog_content_method') == 'post_format') {
        $post_format = get_post_format();
        if ($post_format == '') {
            $category = get_the_category();
            $category_name = $category[0]->cat_name;
            // Get the ID of a given category
            $category_id = get_cat_ID($category_name);
            // Get the URL of this category
            $category_link = get_category_link($category_id);
        } else {
            $category_link = get_post_format_link($post_format);
        }
    } else {
        $tumblog_list = get_the_term_list($post_id, 'tumblog', '', '|', '');
        $tumblog_array = explode('|', $tumblog_list);
        ?>
		<?php 
        $tumblog_items = array('articles' => get_option('woo_articles_term_id'), 'images' => get_option('woo_images_term_id'), 'audio' => get_option('woo_audio_term_id'), 'video' => get_option('woo_video_term_id'), 'quotes' => get_option('woo_quotes_term_id'), 'links' => get_option('woo_links_term_id'));
        ?>
		<?php 
        // Get the ID of Tumblog Taxonomy
        $category_id = $tumblog_items[$type];
        $term =& get_term($category_id, 'tumblog');
        // Get the URL of Articles Tumblog Taxonomy
        $category_link = get_term_link($term, 'tumblog');
    }
    return $category_link;
}
function apostrophe_post_format()
{
    $format = get_post_format();
    $formats = get_theme_support('post-formats');
    // If the post has no format, or if it's not a format supported by the theme, return early
    if (!$format || !has_post_format($formats[0])) {
        return;
    }
    printf('<a class="entry-format format-%1$s" href="%2$s" title="%3$s"><span class="screen-reader-text">%1$s</span></a>', esc_html(strtolower(get_post_format_string($format))), esc_url(get_post_format_link($format)), sprintf(esc_html('All %s posts', 'apostrophe'), esc_html(get_post_format_string($format))));
}
 /**
  * Prints HTML with meta information for the categories, tags.
  *
  * @since Twenty Fifteen 1.0
  */
 function twentyfifteen_entry_meta()
 {
     if (is_sticky() && is_home() && !is_paged()) {
         printf('<span class="sticky-post">%s</span>', __('Featured', 'twentyfifteen'));
     }
     $format = get_post_format();
     if (current_theme_supports('post-formats', $format)) {
         printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'twentyfifteen')), esc_url(get_post_format_link($format)), get_post_format_string($format));
     }
     if (in_array(get_post_type(), array('post', 'attachment'))) {
         $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
         if (get_the_time('U') !== get_the_modified_time('U')) {
             $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
         }
         $time_string = sprintf($time_string, esc_attr(get_the_date('D')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date());
         printf('<li class="icon fa-calendar posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></li>', _x('', 'Used before publish date.', 'twentyfifteen'), esc_url(get_permalink()), get_the_date('d/M'));
     }
     if ('post' == get_post_type()) {
         if (is_singular() || is_multi_author()) {
             // printf( '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>',
             // 	_x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
             // 	esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
             // 	get_the_author()
             // );
         }
         $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen'));
         if ($categories_list && twentyfifteen_categorized_blog()) {
             printf('<li class="cat-links icon fa fa-clone"><span class="screen-reader-text">%1$s </span>%2$s</li>', _x('Categories', 'Used before category names.', 'twentyfifteen'), $categories_list);
         }
         $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen'));
         if ($tags_list) {
             printf('<li class="tags-links icon fa-tags"><span class="screen-reader-text">%1$s </span>%2$s</li>', _x('', 'Used before tag names.', 'twentyfifteen'), $tags_list);
         }
     }
     if (is_attachment() && wp_attachment_is_image()) {
         // Retrieve attachment metadata.
         $metadata = wp_get_attachment_metadata();
         printf('<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>', _x('Full size', 'Used before full size attachment link.', 'twentyfifteen'), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height']);
     }
     if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<li class="icon fa-comment">';
         /* translators: %s: post title */
         echo get_comments_number();
         echo '</li>';
         /* translators: %s: post title */
         // $categories = get_categories();
         // foreach ($categories as $key => $category) {
         // 	echo '<li class="icon fa-clone">';
         // 	echo $category->name;
         // 	echo '</li>';
         // }
     }
 }
Exemple #6
0
function wpsight_post_format_meta($meta)
{
    if (!current_theme_supports('post-formats')) {
        return $meta;
    }
    // Get current post format
    $post_format = get_post_format();
    if (!empty($post_format)) {
        // Get post format link
        $post_format_link = get_post_format_link($post_format);
        // Return linked format icon with meta
        return '<a href="' . $post_format_link . '" class="post-format-link">' . wpsight_get_post_format_icon($post_format) . '</a>' . $meta;
    }
    return $meta;
}
    function widget($args, $instance)
    {
        extract($args, EXTR_SKIP);
        $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
        $gallery = empty($instance['gallery']) ? ' ' : apply_filters('widget_gallery', $instance['gallery']);
        /**
         * Output the HTML for this widget.
         */
        echo $before_widget;
        if (!empty($title)) {
            echo $before_title . $title . $after_title;
        }
        echo '<div id="gallery-post-format-widget">';
        ?>

<?php 
        $custom = new WP_Query(array('order' => 'DESC', 'posts_per_page' => 1, 'no_found_rows' => true, 'post_status' => 'publish', 'post__not_in' => get_option('sticky_posts'), 'tax_query' => array(array('taxonomy' => 'post_format', 'terms' => array("post-format-gallery"), 'field' => 'slug', 'operator' => 'IN'))));
        if ($custom->have_posts()) {
            while ($custom->have_posts()) {
                $custom->the_post();
                $tmp_more = $GLOBALS['more'];
                $GLOBALS['more'] = 0;
                ?>



<?php 
                if (has_post_format('gallery')) {
                    the_content();
                }
                printf('<span class="entry-meta"><time class="entry-date" datetime="%2$s">%3$s</time></span>', esc_url(get_permalink()), esc_attr(get_the_date('c')), esc_html(get_the_date()));
                ?>


		<?php 
            }
        }
        // Reset the post globals as this query will have stomped on it.
        wp_reset_postdata();
        ?>


<?php 
        echo '<p><a href="' . get_post_format_link('gallery') . '" class="widget-format-link"><span class="screen-reader-text">' . $gallery . '</span></a></p>';
        echo '</div>';
        echo $after_widget;
    }
Exemple #8
0
 /**
  * Prints HTML with meta information for the categories, tags.
  *
  * @since Twenty Fifteen 1.0
  */
 function twentyfifteen_entry_meta()
 {
     if (is_sticky() && is_home() && !is_paged()) {
         printf('<span class="sticky-post">%s</span>', __('Featured', 'twentyfifteen'));
     }
     $format = get_post_format();
     if (current_theme_supports('post-formats', $format)) {
         printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'twentyfifteen')), esc_url(get_post_format_link($format)), get_post_format_string($format));
     }
     if (in_array(get_post_type(), array('post', 'attachment'))) {
         $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
         if (get_the_time('U') !== get_the_modified_time('U')) {
             $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
         }
         $time_string = sprintf($time_string, esc_attr(get_the_date('c')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date());
         printf('<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>', _x('Posted on', 'Used before publish date.', 'twentyfifteen'), esc_url(get_permalink()), $time_string);
     }
     if ('post' == get_post_type()) {
         if (is_singular() || is_multi_author()) {
             printf('<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>', _x('Author', 'Used before post author name.', 'twentyfifteen'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author());
         }
         $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen'));
         if ($categories_list && twentyfifteen_categorized_blog()) {
             printf('<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Categories', 'Used before category names.', 'twentyfifteen'), $categories_list);
         }
         $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen'));
         if ($tags_list) {
             printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Tags', 'Used before tag names.', 'twentyfifteen'), $tags_list);
         }
     }
     if (is_attachment() && wp_attachment_is_image()) {
         // Retrieve attachment metadata.
         $metadata = wp_get_attachment_metadata();
         printf('<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>', _x('Full size', 'Used before full size attachment link.', 'twentyfifteen'), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height']);
     }
     $_number_roman = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
     $_number_tibet = array('༠', '༡', '༢', '༣', '༤', '༥', '༦', '༧', '༨', '༩');
     $_number = get_comments_number();
     $new_number = str_replace($_number_roman, $_number_tibet, $_number);
     //echo $new_number;
     if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<span class="comments-link">';
         comments_popup_link(__('Leave a comment', 'twentyfifteen'), __('1 Comment', 'twentyfifteen'), __('% Comments', 'twentyfifteen'));
         echo '</span>';
     }
 }
Exemple #9
0
 function twentysixteen_entry_meta()
 {
     if (in_array(get_post_type(), array('post', 'attachment'))) {
         twentysixteen_entry_date();
     }
     $format = get_post_format();
     if (current_theme_supports('post-formats', $format)) {
         printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'twentysixteen')), esc_url(get_post_format_link($format)), get_post_format_string($format));
     }
     if ('post' === get_post_type()) {
         twentysixteen_entry_taxonomies();
     }
     if (!is_singular() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<span class="comments-link">';
         comments_popup_link(sprintf(__('Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentysixteen'), get_the_title()));
         echo '</span>';
     }
 }
function ubik_meta_type($link = true)
{
    // Exit early if we're not in the loop
    if (!in_the_loop()) {
        return;
    }
    // This sets a default type that can be overridden later
    $type = apply_filters('ubik_meta_type_default', __('Post', 'ubik'));
    // Content type
    if (is_attachment()) {
        if (wp_attachment_is_image()) {
            $type = __('Image', 'ubik');
        } else {
            $type = __('Attachment', 'ubik');
        }
    } elseif (is_page()) {
        $type = __('Page', 'ubik');
    }
    // Post format voodoo
    $post_format = get_post_format();
    if (!empty($post_format)) {
        $type = apply_filters('ubik_meta_post_format', get_post_format_string($post_format));
        if ($link === true) {
            $type = '<a href="' . esc_url(get_post_format_link($post_format)) . '">' . $type . '</a>';
        }
    }
    // Post type voodoo; get all post types that aren't built-in and cycle through to see if we have a match
    $post_types = get_post_types(array('public' => true, '_builtin' => false), 'objects');
    if (!empty($post_types)) {
        foreach ($post_types as $post_type) {
            if ($post_type->name === get_post_type()) {
                if ($post_type->has_archive && $link === true) {
                    $type = sprintf('<a href="%1$s">%2$s</a>', esc_url(get_post_type_archive_link($post_type->name)), $post_type->labels->singular_name);
                } else {
                    $type = $post_type->labels->singular_name;
                }
            }
        }
    }
    // Return whatever we have found
    return apply_filters('ubik_meta_type', $type);
}
 /**
  * Prints HTML with meta information for the categories, tags.
  *
  * @since Twenty Fifteen 1.0
  */
 function launchpad_entry_meta()
 {
     if (is_sticky() && is_home() && !is_paged()) {
         printf('<span class="sticky-post">%s</span>', __('Featured', 'lifterlms-launchpad'));
     }
     $format = get_post_format();
     if (current_theme_supports('post-formats', $format)) {
         printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="meta-label">%s </span>', _x('Format', 'Used before post format.', 'lifterlmns-launchpad')), esc_url(get_post_format_link($format)), get_post_format_string($format));
     }
     if (in_array(get_post_type(), array('post', 'attachment'))) {
         $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
         // if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
         //     $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
         // }
         $time_string = sprintf($time_string, esc_attr(get_the_date('c')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date());
         printf('<span class="posted-on"><span class="meta-label">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>', _x('Posted on', 'Used before publish date.', 'lifterlms-launchpad'), esc_url(get_permalink()), $time_string);
     }
     if ('post' == get_post_type()) {
         if (is_singular() || is_multi_author()) {
             printf('<span class="byline"><span class="author vcard"><span class="meta-label">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>', _x('Author', 'Used before post author name.', 'lifterlms-launchpad'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author());
         }
         $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'lifterlms-launchpad'));
         if ($categories_list && launchpad_categorized_blog()) {
             printf('<span class="cat-links"><span class="meta-label">%1$s </span>%2$s</span>', _x('Categories', 'Used before category names.', 'lifterlms-launchpad'), $categories_list);
         }
         $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'lifterlms-launchpad'));
         if ($tags_list) {
             printf('<span class="tags-links"><span class="meta-label">%1$s </span>%2$s</span>', _x('Tags', 'Used before tag names.', 'lifterlms-launchpad'), $tags_list);
         }
     }
     if (is_attachment() && wp_attachment_is_image()) {
         // Retrieve attachment metadata.
         $metadata = wp_get_attachment_metadata();
         printf('<span class="full-size-link"><span class="meta-label">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>', _x('Full size', 'Used before full size attachment link.', 'lifterlms-launchpad'), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height']);
     }
     if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<span class="comments-link">';
         /* translators: %s: post title */
         comments_popup_link(sprintf(__('Leave a comment<span class="meta-label"> on %s</span>', 'lifterlms-launchpad'), get_the_title()));
         echo '</span>';
     }
 }
 /**
  * Prints HTML with meta information for the categories, tags.
  *
  * Create your own wp_futurelab_entry_meta() function to override in a child theme.
  *
  */
 function wp_futurelab_entry_meta()
 {
     if ('post' === get_post_type()) {
         $author_avatar_size = apply_filters('wp_futurelab_author_avatar_size', 49);
         printf('<span class="byline"><span class="author vcard">%1$s<span class="screen-reader-text">%2$s </span> <a class="url fn n" href="%3$s">%4$s</a></span></span>', get_avatar(get_the_author_meta('user_email'), $author_avatar_size), _x('Author', 'Used before post author name.', 'wp_futurelab'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author());
     }
     if (in_array(get_post_type(), array('post', 'attachment'))) {
         wp_futurelab_entry_date();
     }
     $format = get_post_format();
     if (current_theme_supports('post-formats', $format)) {
         printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'wp_futurelab')), esc_url(get_post_format_link($format)), get_post_format_string($format));
     }
     if ('post' === get_post_type()) {
         wp_futurelab_entry_taxonomies();
     }
     if (!is_singular() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<span class="comments-link">';
         comments_popup_link(sprintf(__('Leave a comment<span class="screen-reader-text"> on %s</span>', 'wp_futurelab'), get_the_title()));
         echo '</span>';
     }
 }
function twentyfifteen_child_entry_meta()
{
    if (is_sticky() && is_home() && !is_paged()) {
        printf('<span class="sticky-post">%s</span>', __('Featured', 'twentyfifteen'));
    }
    $format = get_post_format();
    if (current_theme_supports('post-formats', $format)) {
        printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'twentyfifteen')), esc_url(get_post_format_link($format)), get_post_format_string($format));
    }
    if (in_array(get_post_type(), array('post', 'attachment'))) {
        $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
        if (get_the_time('U') !== get_the_modified_time('U')) {
            $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
        }
        $time_string = sprintf($time_string, esc_attr(get_the_date('c')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date());
        printf('<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>', _x('Posted on', 'Used before publish date.', 'twentyfifteen'), esc_url(get_permalink()), $time_string);
    }
    if ('post' == get_post_type()) {
        if (is_singular() || is_multi_author()) {
            printf('<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>', _x('Author', 'Used before post author name.', 'twentyfifteen'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author());
        }
    }
}
Exemple #14
0
 /**
  * Prints HTML with meta information for the categories, tags.
  */
 function vanillamilkshake_entry_meta()
 {
     if (is_sticky() && is_home() && !is_paged()) {
         printf('<span class="sticky-post">%s</span>', __('Featured', 'vanillamilkshake'));
     }
     $format = get_post_format();
     if (current_theme_supports('post-formats', $format)) {
         printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'vanillamilkshake')), esc_url(get_post_format_link($format)), get_post_format_string($format));
     }
     if ('post' == get_post_type()) {
         if (is_singular() || is_multi_author()) {
             printf('<div class="byline marginbottom-medium"><span class="author vcard"><span class="screen-reader-text">%1$s </span><span class="light-gray">&#9670;</span> <a class="url fn n" href="%2$s">%3$s</a></span></div>', _x('Author', 'Used before post author name.', 'vanillamilkshake'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author());
         }
         /* divider between author & categories/tags */
         printf('<div class="marginvertical-medium height-000625 backgroundcolor-light-gray"></div>');
         $categories_list = get_the_category_list(' <span class="light-gray">&#9656;</span> ');
         if ($categories_list && vanillamilkshake_categorized_blog()) {
             printf('<span class="cat-links xsmall"><span class="screen-reader-text">%1$s </span><span class="light-gray"> &#9656;</span> %2$s</span>', _x('Categories', 'Used before category names.', 'vanillamilkshake'), $categories_list);
         }
         $tags_list = get_the_tag_list('', ' <span class="light-gray">&#9656;</span> ');
         if ($tags_list) {
             printf('<span class="tags-links xsmall"><span class="screen-reader-text">%1$s </span><span class="light-gray"> &#9656;</span> %2$s</span>', _x('Tags', 'Used before tag names.', 'vanillamilkshake'), $tags_list);
         }
     }
     if (is_attachment() && wp_attachment_is_image()) {
         // Retrieve attachment metadata.
         $metadata = wp_get_attachment_metadata();
         printf('<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>', _x('Full size', 'Used before full size attachment link.', 'vanillamilkshake'), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height']);
     }
     /*
     	if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
     		echo '<div class="comments-link">';
     		comments_popup_link( __( 'Leave a comment', 'vanillamilkshake' ), __( '1 Comment', 'vanillamilkshake' ), __( '% Comments', 'vanillamilkshake' ) );
     		echo '</div>';
     	}*/
 }
	<div class="entry-container post-format">
    
        <header class="entry-header">
            <h1 class="entry-title"><a href="<?php 
the_permalink();
?>
" title="<?php 
echo esc_attr(sprintf(__('Permalink to %s', 'catch-kathmandu'), the_title_attribute('echo=0')));
?>
" rel="bookmark"><?php 
the_title();
?>
</a></h1>
            <h2 class="entry-format"><a href="<?php 
echo get_post_format_link('Image');
?>
" title="<?php 
_e('All Image Posts', 'catch-kathmandu');
?>
"><?php 
_e('Image', 'catch-kathmandu');
?>
</a></h2>
        </header><!-- .entry-header -->  
    	
		<?php 
if (is_search()) {
    // Only display Excerpts for Search
    ?>
            <div class="entry-summary">
Exemple #16
0
 * @subpackage Everal
 * @since Everal 1.0
 */
?>

<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
	<header class="entry-header">
		<span class="post-format post-format-image">
			<a class="entry-format" href="<?php 
echo esc_url(get_post_format_link('image'));
?>
"><span class="glyphicon glyphicon-picture"></span></a>
		</span>
		<?php 
if (is_single()) {
    the_title('<h1 class="entry-title">', '</h1>');
} else {
    the_title('<h1 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h1>');
}
?>
		<div class="entry-meta">
			<?php 
if (in_array('category', get_object_taxonomies(get_post_type())) && everal_categorized_blog()) {
    ?>
				<span class="cat-links"><span class="glyphicon glyphicon-eye-open"></span><?php 
Exemple #17
0
							?>
									<div class="gallery-thumb">
										<a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
									</div><!-- .gallery-thumb -->
									<p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyten' ),
											'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
											number_format_i18n( $total_images )
										); ?></em></p>
							<?php endif; ?>
									<?php the_excerpt(); ?>
			<?php endif; ?>
						</div><!-- .entry-content -->

						<div class="entry-utility">
						<?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?>
							<a href="<?php echo get_post_format_link( 'gallery' ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
							<span class="meta-sep">|</span>
						<?php elseif ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?>
							<a href="<?php echo get_term_link( _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
							<span class="meta-sep">|</span>
						<?php endif; ?>
							<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
							<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
						</div><!-- .entry-utility -->
					</div><!-- #post-## -->

			<?php /* How to display posts of the Aside format. The asides category is the old way. */ ?>

				<?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) )  ) : ?>
					<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		<?php 
    wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'makewp005'), 'after' => '</div>'));
    ?>
	</div><!-- .entry-content -->
	<?php 
}
?>
	<footer class="entry-meta" style="text-align: right;">
			<?php 
if (get_post_format() != '') {
    ?>
<span class="genericon genericon-<?php 
    echo get_post_format();
    ?>
" style="margin: 0 3px 0 5px;"></span><a href="<?php 
    echo esc_url(get_post_format_link(get_post_format()));
    ?>
"><?php 
    echo get_post_format_string(get_post_format());
    ?>
</a>
<?php 
}
//get_post_format()
?>
                                <?php 
if (!post_password_required() && (comments_open() || '0' != get_comments_number())) {
    ?>
		<span class="comments-link"><?php 
    comments_popup_link(__('Leave a comment', 'makewp005'), __('1 Comment', 'makewp005'), __('Comments: %', 'makewp005'));
    ?>
<div class="post clearfix">

	<div class="post-audio">
		<?php 
echo get_post_meta($post->ID, '_format_audio_embed', true);
?>
	</div>
	
	<a href="<?php 
echo get_post_format_link('audio');
?>
" class="post-icon audio"></a>
	
	<div class="post-content">
		<div class="post-title">
			<h2><a href="<?php 
the_permalink();
?>
" title="<?php 
printf(esc_attr__('Permalink to %s', 'minti'), the_title_attribute('echo=0'));
?>
" rel="bookmark">
				<?php 
the_title();
?>
			</a></h2>
		</div>
		<div class="post-meta"><?php 
get_template_part('framework/inc/meta');
?>
</div>
    ?>
</span>
		</div><!-- .entry-meta -->
		<?php 
}
if (is_single()) {
    the_title('<h1 class="entry-title">', '</h1>');
} else {
    the_title('<h1 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h1>');
}
?>

		<div class="entry-meta">
			<span class="post-format">
				<a class="entry-format" href="<?php 
echo esc_url(get_post_format_link('quote'));
?>
"><?php 
echo get_post_format_string('quote');
?>
</a>
			</span>

			<?php 
twentyfourteen_posted_on();
?>

			<?php 
if (!post_password_required() && (comments_open() || get_comments_number())) {
    ?>
			<span class="comments-link"><?php 
if (is_sticky() && is_home() && !is_paged()) {
    ?>
            <sup class="featured-post"><?php 
    _e('Sticky', 'themeum');
    ?>
</sup>
            <?php 
}
?>
        </h2>

        <div class="entry-meta">
            <ul>                                                
                <li class="post-format">
                    <i class="fa fa-headphones"></i> <a class="entry-format" href="<?php 
echo esc_url(get_post_format_link('audio'));
?>
"><?php 
echo get_post_format_string('audio');
?>
</a>
                </li>                                                
                <li class="date"><i class="fa fa-clock-o"></i> <time class="entry-date" datetime="<?php 
the_time('c');
?>
"><?php 
the_time('j M Y');
?>
</time></li>
                <li class="author"><i class="fa fa-pencil"></i> <?php 
the_author_posts_link();
</em></p>
				<?php 
            }
            ?>
						<?php 
            the_excerpt();
        }
        ?>
			</div><!-- .entry-content -->

			<div class="entry-utility">
			<?php 
        if (function_exists('get_post_format') && 'gallery' == get_post_format($post->ID)) {
            ?>
				<a href="<?php 
            echo get_post_format_link('gallery');
            ?>
" title="<?php 
            esc_attr_e('View Galleries', 'twentyten');
            ?>
"><?php 
            _e('More Galleries', 'twentyten');
            ?>
</a>
				<span class="meta-sep">|</span>
			<?php 
        } elseif (in_category(_x('gallery', 'gallery category slug', 'twentyten'))) {
            ?>
				<a href="<?php 
            echo get_term_link(_x('gallery', 'gallery category slug', 'twentyten'), 'category');
            ?>
Exemple #23
0
 /**
  * Prints HTML with meta information for the post format, if it exists.
  */
 function ministorm_entry_format()
 {
     $format = get_post_format();
     $formats = get_theme_support('post-formats');
     //If the post has no format, or if it's not a format supported by the theme, return
     if (!$format || !has_post_format($formats[0])) {
         printf('<a href="%1$s"><span class="screen-reader-text">%2$s</span></a>', esc_url(get_permalink()), get_the_title());
     } else {
         printf('<a href="%1$s" title="%2$s"><span class="screen-reader-text">%3$s</span></a>', esc_url(get_post_format_link($format)), esc_attr(sprintf(__('All %s posts', 'ministorm'), get_post_format_string($format))), get_post_format_string($format));
     }
 }
	</figure>
<?php 
}
?>
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
	<?php 
if ($format && in_array($format, $formats[0])) {
    ?>
		<a class="entry-format" href="<?php 
    echo esc_url(get_post_format_link($format));
    ?>
" title="<?php 
    echo esc_attr(sprintf(__('All %s posts', 'sorbet'), get_post_format_string($format)));
    ?>
"><span class="screen-reader-text"><?php 
    echo get_post_format_string($format);
    ?>
</span></a>
	<?php 
}
?>
	<header class="entry-header">
		<?php 
the_title('<h1 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h1>');
?>
if (is_sticky() && is_home() && !is_paged()) {
    ?>
            <sup class="featured-post"><?php 
    _e('Sticky', 'themeum');
    ?>
</sup>
            <?php 
}
?>
        </h2>

        <div class="entry-meta">
            <ul>                                                
                <li class="post-format">
                    <i class="fa fa-picture-o"></i> <a class="entry-format" href="<?php 
echo esc_url(get_post_format_link('gallery'));
?>
"><?php 
echo get_post_format_string('gallery');
?>
</a>
                </li>
                <li class="date"><i class="fa fa-clock-o"></i> <time class="entry-date" datetime="<?php 
the_time('c');
?>
"><?php 
the_time('j M Y');
?>
</time></li>
                <li class="author"><i class="fa fa-pencil"></i> <?php 
the_author_posts_link();
    ?>
</span>
		</div><!-- .entry-meta -->
		<?php 
}
if (is_single()) {
    the_title('<h1 class="entry-title">', '</h1>');
} else {
    the_title('<h1 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h1>');
}
?>

		<div class="entry-meta">
			<span class="post-format">
				<a class="entry-format" href="<?php 
echo esc_url(get_post_format_link('aside'));
?>
"><?php 
echo get_post_format_string('aside');
?>
</a>
			</span>

			<?php 
twentyfourteen_posted_on();
?>

			<?php 
if (!post_password_required() && (comments_open() || get_comments_number())) {
    ?>
			<span class="comments-link"><?php 
    
	<div class="entry-container post-format">
    
        <header class="entry-header">
            <h1 class="entry-title"><a href="<?php 
the_permalink();
?>
" title="<?php 
echo esc_attr(sprintf(__('Permalink to %s', 'ecvetstep'), the_title_attribute('echo=0')));
?>
" rel="bookmark"><?php 
the_title();
?>
</a></h1>
            <h2 class="entry-format"><a href="<?php 
echo get_post_format_link('chat');
?>
" title="<?php 
_e('All Chat Posts', 'ecvetstep');
?>
"><?php 
_e('Chat', 'ecvetstep');
?>
</a></h2>
    	</header><!-- .entry-header -->  
    
		<?php 
if (is_search()) {
    // Only display Excerpts for Search
    ?>
            <div class="entry-summary">
Exemple #28
0
 function raindrops_posted_in()
 {
     $exclude_category_conditionals = apply_filters('raindrops_posted_in_category', array('is_category' => 'raindrops_post_category_relation'));
     $exclude_tag_conditional = apply_filters('raindrops_posted_in_tag', array('is_tag' => ''));
     global $post, $raindrops_tag_emoji, $raindrops_category_emoji;
     if (is_sticky()) {
         return;
     }
     $format = get_post_format($post->ID);
     $tag_list = get_the_tag_list('', ' ');
     $categories_list = get_the_category_list(' ');
     if (!empty($exclude_category_conditionals) && is_array($exclude_category_conditionals)) {
         foreach ($exclude_category_conditionals as $key => $conditional) {
             if (function_exists($key) && true == $key()) {
                 if (empty($conditional)) {
                     $categories_list = '';
                 } elseif (function_exists($conditional)) {
                     $categories_list = $conditional();
                 }
             }
         }
     }
     if (!empty($exclude_tag_conditionals) && is_array($exclude_tag_conditionals)) {
         foreach ($exclude_tag_conditionals as $key => $conditional) {
             if (function_exists($key) && true == $key()) {
                 if (empty($conditional)) {
                     $tag_list = '';
                 } elseif (function_exists($conditional)) {
                     $tag_list = $conditional();
                 }
             }
         }
     }
     if ('emoji' == raindrops_warehouse_clone('raindrops_posted_in_label')) {
         $category_label = $raindrops_category_emoji . '<span class="screen-reader-text">' . esc_html__('This entry was posted in', 'raindrops') . '</span>';
         $tag_label = $raindrops_tag_emoji . '<span class="screen-reader-text">' . esc_html__('and tagged', 'raindrops') . '</span>';
         $categories = wp_get_post_categories($post->ID);
         $categories_count = count($categories);
         $default_category_id = absint(get_option('default_category'));
         $raindrops_display_default_category = raindrops_warehouse_clone('raindrops_display_default_category');
         if ($categories_count == 1 && absint($categories[0]) == absint($default_category_id) && 'show' !== $raindrops_display_default_category) {
             $category_label = '';
         }
         if (is_category()) {
             $category_label = '';
         }
     } else {
         $category_label = esc_html__('This entry was posted in', 'raindrops');
         $tag_label = esc_html__('and tagged', 'raindrops');
     }
     if (false === $format) {
         if ($tag_list) {
             $posted_in = '<span class="this-posted-in">' . $category_label . '</span><span class="post-category"> %1$s </span><span class="tagged">' . $tag_label . '</span><span class="post-tag"> %2$s </span>';
         } elseif (is_object_in_taxonomy(get_post_type(), 'category')) {
             $posted_in = '<span class="this-posted-in">' . $category_label . '</span><span class="post-category">  %1$s </span>';
         } else {
             $posted_in = '';
         }
         $result = $format . sprintf($posted_in, $categories_list, $tag_list);
         echo apply_filters("raindrops_posted_in", $result);
     } else {
         if ($tag_list) {
             $posted_in = '<span class="this-posted-in">' . $category_label . '</span><span class="post-category"> %1$s </span><span class="tagged">' . $tag_label . '</span> <span class="post-tag"> %2$s </span>' . '  <span class="post-format-text">%4$s</span> <a href="%3$s"> <span class="post-format">%5$s</span></a>';
         } elseif (is_object_in_taxonomy(get_post_type(), 'category')) {
             $posted_in = '<span class="this-posted-in">' . $category_label . '</span> <span class="post-category">%1$s %2$s</span>' . '  <span class="post-format-text">%4$s</span><a href="%3$s"> <span class="post-format">%5$s</span></a>';
         } else {
             $posted_in = '<a href="%3$s">   <span class="post-format-text">%4$s</span> <span class="post-format">%5$s</span></a>';
         }
         $result = sprintf($posted_in, get_the_category_list(' '), $tag_list, esc_url(get_post_format_link($format)), esc_html('Format', 'raindrops'), get_post_format_string($format));
         echo apply_filters("raindrops_posted_in", $result);
     }
     edit_post_link(esc_html__('Edit', 'raindrops') . raindrops_link_unique('Post', $post->ID), '<span class="edit-link">', '</span>');
     raindrops_delete_post_link(esc_html__('Trash', 'raindrops') . raindrops_link_unique('Post', $post->ID), '<span class="edit-link">', '</span>');
 }
 * @subpackage Shopera
 * @since Shopera 1.0
 */
?>

<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
	<header class="entry-header">
		<span class="post-format post-format-video">
			<a class="entry-format" href="<?php 
echo esc_url(get_post_format_link('video'));
?>
"><span class="glyphicon glyphicon-film"></span></a>
		</span>
		<?php 
if (is_single()) {
    the_title('<h1 class="entry-title">', '</h1>');
} else {
    the_title('<h1 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h1>');
}
?>
		<div class="entry-meta">
			<?php 
if (in_array('category', get_object_taxonomies(get_post_type())) && shopera_categorized_blog()) {
    ?>
				<span class="cat-links"><span class="glyphicon glyphicon-eye-open"></span><?php 
Exemple #30
0
 static function get_the_field($parameters, $id = null)
 {
     $result = '';
     $field = $parameters['field'];
     if (!empty($parameters['id'])) {
         $id = $parameters['id'];
     }
     /*---------------------------------------------
      *
      * Option field
      *
      */
     if (!empty($parameters['option'])) {
         return self::get_option_field($field, $parameters['option']);
     }
     /*---------------------------------------------
      *
      * Attachment field
      *
      */
     if (!empty($parameters['type']) && $parameters['type'] == 'attachment' || CCS_Loop::$state['is_attachment_loop'] || CCS_Attached::$state['is_attachment_loop']) {
         return self::get_the_attachment_field($parameters);
         /*---------------------------------------------
          *
          * Array field
          *
          */
     } elseif (self::$state['is_array_field']) {
         $array = self::$state['current_field_value'];
         if (isset($array[$field])) {
             return $array[$field];
         } elseif ($field == 'value') {
             if (is_array($array)) {
                 $array = implode('', $array);
             }
             return $array;
         }
         // ACF gallery loop
     } elseif (class_exists('CCS_To_ACF') && CCS_To_ACF::$state['is_gallery_loop']) {
         return CCS_To_ACF::get_image_details_from_acf_gallery($parameters);
         /*---------------------------------------------
          *
          * Repeater or flexible content loop
          *
          */
     } elseif (empty($parameters['id']) && empty($parameters['name']) && class_exists('CCS_To_ACF') && CCS_To_ACF::$state['is_repeater_or_flex_loop']) {
         // If not inside relationship loop
         if (!CCS_To_ACF::$state['is_relationship_loop']) {
             // Get sub field
             if (function_exists('get_sub_field')) {
                 return get_sub_field($field);
             } else {
                 return null;
             }
         }
         /*---------------------------------------------
          *
          * Menu loop
          *
          */
     } elseif (CCS_Menu::$state['is_menu_loop']) {
         if (isset(CCS_Menu::$state['current_menu_object'][$field])) {
             return CCS_Menu::$state['current_menu_object'][$field];
         } else {
             if (!isset(CCS_Menu::$state['current_menu_object']['id'])) {
                 return;
             }
             // Get it from the post
             $id = CCS_Menu::$state['current_menu_object']['id'];
             CCS_Menu::$state['is_menu_loop'] = false;
             $result = do_shortcode('[field ' . $field . ' id=' . $id . ']');
             CCS_Menu::$state['is_menu_loop'] = true;
             return $result;
         }
     }
     if (!empty($id)) {
         $post_id = $id;
     } else {
         // Default
         $post_id = get_the_ID();
         /*      global $post;
               if (!empty($post)) {
                 $post_id = $post->ID;
               } */
     }
     if (empty($post_id)) {
         return null;
     }
     // No post ID
     $post = get_post($post_id);
     if (empty($post)) {
         return null;
     }
     // No post
     /*---------------------------------------------
      *
      * Prepare image attributes
      *
      */
     $image_fields = array('image', 'image-full', 'image-link', 'image-link-self', 'thumbnail', 'thumbnail-link', 'thumbnail-link-self', 'gallery');
     if ($field == 'thumbnail' && empty($parameters['size'])) {
         $parameters['size'] = 'thumbnail';
         // Default thumbnail
     }
     $attr = array();
     if (in_array($field, $image_fields)) {
         if (!empty($parameters['width']) || !empty($parameters['height'])) {
             $parameters['size'] = array((int) $parameters['width'], (int) $parameters['height']);
         }
         if (!empty($parameters['image_class'])) {
             $attr['class'] = $parameters['image_class'];
         }
         if (!empty($parameters['nopin'])) {
             $attr['nopin'] = $parameters['nopin'];
         }
         if (!empty($parameters['alt'])) {
             $attr['alt'] = $parameters['alt'];
         }
         //      if (!empty($parameters['title']))
         //        $attr['title'] = $parameters['title'];
     }
     // Custom field only?
     if (!empty($parameters['custom']) && $parameters['custom'] == 'true') {
         $custom = $field;
         $field = 'custom';
         // Skip predefined fields
     }
     /*---------------------------------------------
      *
      * Pre-defined fields
      *
      */
     switch ($field) {
         case 'id':
             $result = $post_id;
             break;
         case 'url':
             $result = get_permalink($post_id);
             break;
         case 'edit-url':
             $result = get_edit_post_link($post_id);
             break;
         case 'edit-link':
             $result = $post->post_title;
             break;
         case 'edit-link-self':
             $result = $post->post_title;
             break;
         case 'slug':
             $result = $post->post_name;
             break;
         case 'post-type':
             $result = $post->post_type;
             break;
         case 'post-type-name':
             $post_type = $post->post_type;
             $obj = get_post_type_object($post_type);
             $result = $obj->labels->singular_name;
             break;
         case 'post-type-plural':
             $post_type = $post->post_type;
             $obj = get_post_type_object($post_type);
             $result = $obj->labels->name;
             break;
         case 'post-status':
             $result = $post->post_status;
             if ($parameters['out'] !== 'slug') {
                 $result = ucwords($result);
             }
             break;
         case 'post-format':
             if (function_exists('get_post_format')) {
                 $result = get_post_format($post_id);
             }
             break;
         case 'post-format-name':
             if (function_exists('get_post_format')) {
                 $result = get_post_format($post_id);
                 $result = ucwords($result);
             }
             break;
         case 'post-format-link':
             if (function_exists('get_post_format')) {
                 $result = get_post_format($post_id);
                 $result = '<a href="' . get_post_format_link($result) . '">' . ucwords($result) . '</a>';
             }
             break;
         case 'post-format-url':
             if (function_exists('get_post_format')) {
                 $result = get_post_format_link(get_post_format($post_id));
             }
             break;
         case 'parent-id':
             $parent_id = isset($post->post_parent) ? $post->post_parent : 0;
             if (!empty($parent_id)) {
                 $result = $parent_id;
             }
             break;
         case 'parent-slug':
             $parent_id = isset($post->post_parent) ? $post->post_parent : 0;
             if (!empty($parent_id)) {
                 $post_data = get_post($parent_id);
                 if (!empty($post_data)) {
                     $result = isset($post_data->post_name) ? $post_data->post_name : '';
                 }
             }
             break;
         case 'link':
         case 'title-link':
         case 'title-link-out':
         case 'title':
             $result = $post->post_title;
             break;
         case 'author':
             $author_id = $post->post_author;
             $user = get_user_by('id', $author_id);
             if (!empty($parameters['meta'])) {
                 $result = get_the_author_meta($parameters['meta'], $author_id);
             } elseif (!empty($user)) {
                 $result = $user->display_name;
             }
             break;
         case 'author-id':
             $result = $post->post_author;
             break;
         case 'author-url':
             $result = get_author_posts_url($post->post_author);
             break;
         case 'author-login':
             $author_id = $post->post_author;
             $result = do_shortcode('[users id=' . $author_id . '][user name][/users]');
             break;
         case 'avatar':
             if (!empty($parameters['size'])) {
                 $result = get_avatar($post->post_author, $parameters['size']);
             } else {
                 $result = get_avatar($post->post_author);
             }
             break;
         case 'date':
             if (!empty($parameters['date_format'])) {
                 if ($parameters['date_format'] == 'relative') {
                     $result = CCS_Format::get_relative_date($post->post_date);
                 } else {
                     $result = mysql2date($parameters['date_format'], $post->post_date);
                 }
             } else {
                 // Default date format under Settings -> General
                 $result = mysql2date(get_option('date_format'), $post->post_date);
             }
             break;
         case 'modified':
             if (!empty($parameters['date_format'])) {
                 $result = get_post_modified_time($parameters['date_format'], $gmt = false, $post_id, $translate = true);
             } else {
                 // Default date format under Settings -> General
                 $result = get_post_modified_time(get_option('date_format'), $gmt = false, $post_id, $translate = true);
             }
             break;
         case 'image-full':
             $parameters['size'] = 'full';
         case 'image':
             // image
         // image
         case 'image-link':
             // image with link to post
         // image with link to post
         case 'image-link-self':
             // image with link to attachment page
             $parameters['size'] = isset($parameters['size']) && !empty($parameters['size']) ? $parameters['size'] : 'full';
             if (empty($attr['alt'])) {
                 $attr['alt'] = self::wp_get_featured_image_field($post_id, 'alt');
             }
             $result = get_the_post_thumbnail($post_id, $parameters['size'], $attr);
             break;
         case 'image-url':
             $parameters['size'] = isset($parameters['size']) && !empty($parameters['size']) ? $parameters['size'] : 'full';
             $src = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), $parameters['size']);
             $result = $src['0'];
             // $result = wp_get_attachment_url(get_post_thumbnail_id($post_id));
             break;
         case 'image-title':
         case 'image-caption':
         case 'image-alt':
         case 'image-description':
             $image_field_name = substr($field, 6);
             // Remove "image-"
             $result = self::wp_get_featured_image_field($post_id, $image_field_name);
             break;
         case 'thumbnail':
             // thumbnail
         // thumbnail
         case 'thumbnail-link':
             // thumbnail with link to post
         // thumbnail with link to post
         case 'thumbnail-link-self':
             // thumbnail with link to attachment page
             $parameters['size'] = isset($parameters['size']) && !empty($parameters['size']) ? $parameters['size'] : 'thumbnail';
             if (empty($attr['alt'])) {
                 $attr['alt'] = self::wp_get_featured_image_field($post_id, 'alt');
             }
             $result = get_the_post_thumbnail($post_id, $parameters['size'], $attr);
             break;
         case 'thumbnail-url':
             $src = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), 'thumbnail');
             $result = $src['0'];
             break;
         case 'tags':
             $result = implode(' ', wp_get_post_tags($post_id, array('fields' => 'names')));
             break;
         case 'gallery':
             // Get specific image from gallery field
             if (class_exists('CCS_Gallery_Field')) {
                 // Check if gallery field is enabled
                 $attachment_ids = CCS_Gallery_Field::get_image_ids($post_id);
                 if (empty($parameters['num'])) {
                     $parameters['num'] = 1;
                 }
                 if (empty($parameters['size'])) {
                     $parameters['size'] = 'full';
                 }
                 $result = wp_get_attachment_image($attachment_ids[$parameters['num'] - 1], $parameters['size'], $icon = false, $attr);
             }
             break;
         case 'excerpt':
             // Get excerpt
             //        $result = get_the_excerpt();
             $result = $post->post_excerpt;
             if (empty($result)) {
                 // If empty, get it from post content
                 $result = $post->post_content;
                 if (empty($parameters['words']) && empty($parameters['length'])) {
                     self::$parameters['words'] = 25;
                 }
             }
             break;
         case 'debug':
             ob_start();
             echo '<pre>';
             print_r(get_post_custom($post_id));
             echo '</pre>';
             if (function_exists('acf_get_fields_by_id')) {
                 echo '<pre>';
                 print_r(acf_get_fields_by_id($post_id));
                 echo '</pre>';
             }
             $result = ob_get_clean();
             break;
         case 'loop-count':
             $result = CCS_Loop::$state['loop_count'];
             break;
         default:
             /*---------------------------------------------
              *
              * Custom field
              *
              */
             if (!empty($parameters['custom']) && $parameters['custom'] == 'true') {
                 $field = $custom;
             }
             $result = get_post_meta($post_id, $field, true);
             if (is_numeric($result) && !empty($parameters['return'])) {
                 if ($parameters['return'] == 'page-link') {
                     // ACF page link: get URL from post ID
                     $result = get_permalink($result);
                 } else {
                     // Get attachment field
                     $parameters['id'] = $result;
                     $parameters['field'] = $parameters['return'];
                     $result = self::get_the_attachment_field($parameters);
                 }
             } elseif (!empty($parameters['property']) && is_object($result)) {
                 $result = self::get_object_property($result, $parameters['property']);
             } elseif (!empty($parameters['currency']) || !empty($parameters['decimals']) || !empty($parameters['point']) || !empty($parameters['thousands'])) {
                 $currency = !empty($parameters['currency']) ? $parameters['currency'] : '';
                 $decimals = !empty($parameters['decimals']) ? $parameters['decimals'] : 2;
                 $point = !empty($parameters['point']) ? $parameters['point'] : '.';
                 $thousands = !empty($parameters['thousands']) ? $parameters['thousands'] : ',';
                 $result = CCS_Format::getCurrency($result, $currency, $decimals, $point, $thousands);
             }
             break;
     }
     return $result;
 }