forked from themejack/briar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent-link.php
More file actions
52 lines (48 loc) · 1.2 KB
/
content-link.php
File metadata and controls
52 lines (48 loc) · 1.2 KB
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
<?php
/**
* The template for displaying link post format
*
* Used for both single and index/archive/search.
*
* @package Briar
* @since 1.0
*/
remove_filter( 'the_content', 'wpautop' );
if ( ! is_singular() ) : ?>
<div class="row">
<?php endif; ?>
<div <?php post_class( array( 'post-item', 'clearfix' ) ); ?>>
<?php
if ( ! is_singular() ) {
briar_post_thumbnail();
}
?>
<?php if ( ! is_singular() ) : ?>
<div class="<?php if ( has_post_thumbnail() ) : ?>col-sm-8<?php else : ?>col-sm-12<?php endif; ?>">
<?php endif;
printf(
'<h1 class="post-item__title">%s</h1>',
wp_kses( apply_filters( 'the_content', $post->post_content ),
array(
'a' => array(
'href' => true,
'rel' => true,
'rev' => true,
'name' => true,
'target' => true,
),
)
)
);
?>
<?php
if ( ! is_singular() ) :
edit_post_link( sprintf( __( 'Edit%s', 'briar' ), '<span class="screen-reader-text"> ' . get_the_title() . '</span>' ), '<span class="edit-link">', '</span>' );
?>
</div><!-- /.col -->
<?php endif; ?>
</div><!-- /.post-item -->
<?php if ( ! is_singular() ) : ?>
</div><!-- /.row -->
<?php endif;
add_filter( 'the_content', 'wpautop' );