/** 
     * 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 ';
        ?>
		<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>
				
				<!-- 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 
        }
        ?>
			
				<!-- post-content -->
				<div class="entry-content content-reset">
					<?php 
        the_content();
        ?>
				</div>

				<?php 
        self::the_page_pagination();
        ?>

					
				<!-- 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 */
        ?>
					
				</footer>
			</div><!-- /.entry-body -->
			
		</article>
		<?php 
    }
Esempio n. 2
0
    /** 
     * 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 
    }
Esempio n. 3
0
    if (class_exists('theme_post_views') && theme_post_views::is_enabled()) {
        ?>
							<th class="edit-head-views"><?php 
        echo ___('Views');
        ?>
</th>
						<?php 
    }
    ?>
					</tr>
				</thead>
				<tbody>
				<?php 
    foreach ($wp_query->posts as $post) {
        setup_postdata($post);
        $post_edit_url = theme_custom_edit::get_edit_post_link($post->ID);
        ?>
					<tr>
						<td class="edit-post-thumbnail">
							<img class="post-list-img" src="<?php 
        echo theme_functions::get_thumbnail_src($post->ID);
        ?>
" alt="<?php 
        echo theme_cache::get_the_title($post->ID);
        ?>
" width="<?php 
        echo theme_functions::$thumbnail_size[1];
        ?>
" height="<?php 
        echo theme_functions::$thumbnail_size[2];
        ?>