This repository has been archived by the owner on Oct 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
single.php
executable file
·76 lines (71 loc) · 3.18 KB
/
single.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/**
* The Template for displaying all single posts.
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
$is_rfc = (has_category('rfc-internals') || has_category('rfc')) ? true : false;
//check for private RFCs
if (has_category('rfc-internals') && !current_user_can('edit_users'))
{
global $wp_query;
$wp_query->set_404();
status_header(404);
nocache_headers();
include( get_query_template( '404' ) );
die();
}
get_header();
the_post();
?>
<section class="content sing single">
<div class="row-fluid span12">
<?php if (!$is_rfc) : ?>
<div class="span8">
<?php endif; ?>
<article itemtype="http://schema.org/Article" itemscope>
<h2><?php the_title(); ?></h2>
<div class="author">
<p>Por <span itemprop="author"><?php the_author_posts_link(); ?> </span>
em <time itemprop="dateCreated" datetime="<?php the_time('Y-m-d H:i'); ?>"><?php the_date(); ?></time>
em <span itemprop="category"><?php the_category(','); ?></span></p>
</div>
<div class="excerpt"><?php the_content(); ?></div>
<?php the_tags( '<p class="tags">Tags: ', ', ', '</p>'); ?>
</article>
<?php if (!$is_rfc) : ?>
<?php
if ( get_the_author_meta( 'description' ) ) : ?>
<div class="author-info">
<div class="author-description">
<h2 class="blue-block"><?php printf( __( 'Sobre <strong>%s</strong>' ), get_the_author() ); ?></h2>
<div class="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 120 ) ); ?>
</div><!-- .author-avatar -->
<p><?php the_author_meta( 'description' ); ?></p>
</div><!-- .author-description -->
<?php if(get_the_author_meta('url')): ?>
<div class="author-card">
<p class="author-link">Site: <a href="<?php echo get_the_author_meta('url');?>"><?php echo get_the_author_meta('url'); ?></a></p>
</div>
<?php endif; ?>
<p>Mais posts de <?php echo the_author_posts_link(); ?>.</p>
</div><!-- .author-info -->
<?php endif; // author meta ?>
<?php endif; //is_rfc ?>
<?php if (!$is_rfc) : ?>
<?php comments_template(); ?>
<?php endif; ?>
<?php if (!$is_rfc) : ?>
</div>
<div class="span4 right-column">
<?php if (is_active_sidebar('content-right-column-1')) : ?>
<?php dynamic_sidebar('content-right-column-1'); ?>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
</section>
<?php get_footer(); ?>