/** * singular_content */ public static function singular_content(array $args = []) { global $post; $args = array_merge(array('classes' => '', 'lazyload' => true), $args); /** * classes */ $args['classes'] .= ' singular-post panel '; $author_display_name = theme_cache::get_the_author_meta('display_name', $post->post_author); $author_url = theme_cache::get_author_posts_url($post->post_author); ?> <article id="post-<?php echo $post->ID; ?> " <?php post_class($args['classes']); ?> > <h2 class="entry-title"><?php echo theme_cache::get_the_title($post->ID); ?> </h2> <header class="entry-header"> <!-- category --> <?php $cats = get_the_category_list('<i class="split"> / </i> '); if (!empty($cats)) { ?> <span class="entry-meta post-category" title="<?php echo ___('Category'); ?> "> <i class="fa fa-folder-open"></i> <?php echo $cats; ?> </span> <?php } ?> <!-- time --> <time class="entry-meta post-time" datetime="<?php echo get_the_time('Y-m-d H:i:s'); ?> " title="<?php echo get_the_time(___('M j, Y')); ?> "> <i class="fa fa-clock-o"></i> <?php echo friendly_date(get_the_time('U')); ?> </time> <!-- author link --> <a class="entry-meta post-author" href="<?php echo $author_url; ?> " title="<?php echo sprintf(___('Views all post by %s'), $author_display_name); ?> "> <i class="fa fa-user"></i> <?php echo $author_display_name; ?> </a> <!-- views --> <?php if (class_exists('theme_post_views') && theme_post_views::is_enabled()) { ?> <span class="entry-meta post-views" title="<?php echo ___('Views'); ?> "> <i class="fa fa-play-circle"></i> <span class="number" id="post-views-number-<?php echo $post->ID; ?> ">-</span> </span> <?php } ?> <?php /** * comment */ $comment_count = (int) get_comments_number() . ''; ?> <a href="#comments" class="entry-meta quick-comment comment-count" data-post-id="<?php echo $post->ID; ?> "> <i class="fa fa-comment"></i> <span class="comment-count-number"><?php echo $comment_count; ?> </span> </a> <?php /** * edit */ if (class_exists('theme_custom_edit') && $post->post_author == theme_cache::get_current_user_id()) { ?> <a class="post-meta edit-post" href="<?php echo theme_custom_edit::get_edit_post_link($post->ID); ?> "> <i class="fa fa-edit"></i> <?php echo ___('Edit'); ?> </a> <?php } ?> </header> <div class="entry-body"> <?php /** * ad */ if (class_exists('theme_adbox') && !empty(theme_adbox::display_frontend('below-post-title'))) { ?> <div class="ad-container ad-below-post-title"><?php echo theme_adbox::display_frontend('below-post-title'); ?> </div> <?php } ?> <!-- entry-excerpt --> <?php $excerpt = $post->post_excerpt; if ($excerpt !== '') { ?> <blockquote class="entry-excerpt"> <?php echo $excerpt; ?> </blockquote> <?php } ?> <!-- post-content --> <div class="entry-content content-reset"> <?php the_content(); ?> </div> <?php self::the_page_pagination(); ?> <!-- entry-circle --> <div class="entry-circle"> <?php /** post points */ if (class_exists('custom_post_point') && class_exists('theme_custom_point')) { custom_post_point::post_btn($post->ID); } /** theme_custom_storage */ if (class_exists('theme_custom_storage') && theme_custom_storage::is_enabled()) { theme_custom_storage::display_frontend($post->ID); } ?> <a class="meta meta-post-comments" href="<?php echo $post->comment_count == 0 ? '#respond' : '#comments'; ?> " id="post-comments-btn" title="<?php echo ___('Comments'); ?> "> <div id="post-comments-number-<?php echo $post_id; ?> " class="number"> <?php echo (int) $post->comment_count; ?> </div> <div class="tx"><?php echo __x('Comments', 'Tucao'); ?> </div> </a> </div> <!-- theme_custom_post_source --> <?php if (class_exists('theme_custom_post_source') && theme_custom_post_source::is_enabled()) { ?> <ul class="entry-source"> <?php theme_custom_post_source::display_frontend($post->ID); ?> </ul> <?php } ?> <!-- post-footer --> <footer class="entry-footer"> <?php /** * tags */ $tags = get_the_tags(); if (!empty($tags)) { ?> <div class="entry-tags"> <?php the_tags('', ''); ?> </div> <?php } ?> <?php /** * post-share */ if (class_exists('theme_post_share') && theme_post_share::is_enabled()) { ?> <div class="entry-share"> <?php echo theme_post_share::display(); ?> </div> <?php } /** end post-share */ ?> <?php /** * report */ if (class_exists('theme_custom_report') && theme_custom_report::is_enabled()) { ?> <div class="entry-report"> <?php echo theme_custom_report::display_frontend(); ?> </div> <?php } ?> </footer> </div><!-- /.entry-body --> </article> <?php }
<div class="mod-body"> <?php global $wp_query, $author, $post; if (class_exists('custom_post_point')) { $page = (int) get_query_var('page'); if (!$page || $page <= 0) { $page = 1; } query_posts(['author' => 0, 'posts_per_page' => 120, 'page' => $page, 'post__in' => custom_post_point::get_user_post_ids($author)]); if ($wp_query->have_posts()) { ?> <ul class="row post-img-lists"> <?php foreach ($wp_query->posts as $post) { setup_postdata($post); theme_functions::archive_card_lg(['classes' => 'g-phone-1-2 g-tablet-1-3 g-desktop-1-4']); } ?> </ul> <?php } else { ?> <div class="page-tip"><?php echo status_tip('info', ___('No post yet.')); ?> </div> <?php } } else { ?> <div class="page-tip"><?php
public static function rank_img_content($args = []) { global $post; $args = array_merge(['classes' => '', 'lazyload' => true, 'excerpt' => true, 'index' => false, 'target' => theme_functions::$link_target], $args); $post_title = theme_cache::get_the_title($post->ID); $excerpt = get_the_excerpt(); if (!empty($excerpt)) { $excerpt = esc_html($excerpt); } $thumbnail_real_src = theme_functions::get_thumbnail_src($post->ID); ?> <div class="list-group-item <?php echo $args['classes']; ?> "> <div class="row"> <div class="g-tablet-1-6"> <a href="<?php echo theme_cache::get_permalink($post->ID); ?> " title="<?php echo $post_title; ?> " target="<?php echo $args['target']; ?> " class="thumbnail-container"> <?php if ($args['lazyload'] === true) { ?> <img class="thumbnail" src="<?php echo theme_functions::$thumbnail_placeholder; ?> " data-src="<?php echo $thumbnail_real_src; ?> " alt="<?php echo $post_title; ?> " width="<?php echo theme_functions::$thumbnail_size[1]; ?> " height="<?php echo theme_functions::$thumbnail_size[2]; ?> "> <?php } else { ?> <img class="thumbnail" src="<?php echo $thumbnail_real_src; ?> " alt="<?php echo $post_title; ?> " width="<?php echo theme_functions::$thumbnail_size[1]; ?> " height="<?php echo theme_functions::$thumbnail_size[2]; ?> "> <?php } ?> </a> </div> <div class="g-tablet-5-6"> <h3 class="media-heading"> <a href="<?php echo theme_cache::get_permalink($post->ID); ?> " title="<?php echo $post_title; ?> " target="<?php echo $args['target']; ?> " ><?php echo $post_title; ?> </a> </h3> <?php /** * output excerpt */ if ($args['excerpt'] === true) { ?> <div class="excerpt"><?php echo str_sub(strip_tags($excerpt), 200); ?> </div> <?php } ?> <div class="extra"> <div class="metas row"> <!-- author --> <a class="author meta g-phone-1-2 g-tablet-1-4 g-desktop-1-5" href="<?php echo theme_cache::get_author_posts_url($post->post_author); ?> " target="<?php echo $args['target']; ?> " > <img src="<?php echo theme_functions::$avatar_placeholder; ?> " data-src="<?php echo theme_cache::get_avatar_url($post->post_author); ?> " alt="avatar" width="16" height="16" class="avatar"> <?php echo theme_cache::get_the_author_meta('display_name', $post->post_author); ?> </a> <!-- category --> <div class="category meta g-phone-1-2 g-tablet-1-4 g-desktop-1-5"> <?php $cats = get_the_category_list('<i class="split"> / </i> '); if (!empty($cats)) { ?> <i class="fa fa-folder-open"></i> <?php echo $cats; ?> <?php } ?> </div> <!-- views --> <?php if (class_exists('theme_post_views') && theme_post_views::is_enabled()) { ?> <div class="view meta g-phone-1-2 g-tablet-1-4 g-desktop-1-5"> <i class="fa fa-play-circle"></i> <?php echo theme_post_views::get_views(); ?> </div> <?php } ?> <?php if (!wp_is_mobile()) { ?> <div class="comments meta g-phone-1-2 g-tablet-1-4 g-desktop-1-5"> <i class="fa fa-comment"></i> <?php echo (int) $post->comment_count; ?> </div> <?php } ?> <?php /** * point */ if (class_exists('custom_post_point')) { ?> <div class="point meta g-phone-1-2 g-tablet-1-4 g-desktop-1-5"> <i class="fa fa-paw"></i> <?php echo (int) custom_post_point::get_post_points_count($post->ID); ?> </div> <?php } ?> </div><!-- /.metas --> </div> <?php if ($args['index']) { ?> <i class="index"><?php echo $args['index']; ?> </i> <?php } ?> </div> </div> </div> <?php }