-
Notifications
You must be signed in to change notification settings - Fork 0
/
content-attachment.php
44 lines (41 loc) · 1.74 KB
/
content-attachment.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
<?php
/**
* Content - attachment
*
* @package Status
* @since 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="author-box"> <?php echo get_avatar( get_the_author_meta( 'user_email' ), '50' ); ?> <p><?php printf( _x( 'by %s', 'Post written by...', 'status' ), str_replace( '<a href=', '<a rel="author" href=', bp_core_get_userlink( $post->post_author ) ) ); ?></p> </div>
<header class="post-header">
<h1 class="post-title"><?php the_title(); ?></h1>
<div class="post-info">
<?php printf( __( '%1$s <span>in %2$s</span>', 'status' ), get_the_date(), get_the_category_list( ', ' ) ); ?>
<span class="post-utility alignright"><?php edit_post_link( __( 'Edit this entry', 'status' ) ); ?></span>
<span class="post-tags alignright">
<?php
if ( wp_attachment_is_image() ) :
$metadata = wp_get_attachment_metadata();
printf( __( 'Full size is %s pixels', 'buddypress' ),
sprintf( '<a href="%1$s" title="%2$s">%3$s × %4$s</a>',
wp_get_attachment_url(),
esc_attr( __( 'Link to full size image', 'buddypress' ) ),
$metadata['width'],
$metadata['height']
)
);
endif;
?>
</span>
<span class="post-action alignright">
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'status' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php _e( 'Permalink', 'status'); ?></a>
</span>
</div>
</header>
<section class="post-content">
<?php echo wp_get_attachment_image( $post->ID, 'large', false, array( 'class' => 'size-large aligncenter' ) ); ?>
<div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
<?php the_content(); ?>
</section>
</article>