Advertisement
Guest User

Untitled

a guest
Jul 31st, 2011
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. <?php /* Posts navigation for single post pages, but not for Page post */ ?>
  2. <?php if (is_single() && !is_page()) : ?>
  3. <div class="post-nav clearfix">
  4. <p id="previous"><?php previous_post_link(); ?></p>
  5. <p id="next-post"><?php next_post_link(); ?></p>
  6. <?php do_action('graphene_post_nav'); ?>
  7. </div>
  8. <?php endif; ?>
  9.  
  10. <div id="post-<?php the_ID(); ?>" <?php post_class('clearfix post-format'); ?>>
  11. <div class="entry-header">
  12. <?php
  13. global $post_format;
  14. switch ($post_format){
  15. case 'status': $format_title = __('Status update', 'graphene'); break;
  16. case 'audio': $format_title = __('Audio', 'graphene'); break;
  17. case 'image': $format_title = __('Image', 'graphene'); break;
  18. case 'video': $format_title = __('Video', 'graphene'); break;
  19. default: $format_title = __('Post format', 'graphene');
  20. }
  21. ?>
  22. <p class="format-title"><a href="<?php the_permalink(); ?>"><?php echo $format_title; ?></a></p>
  23.  
  24. <?php /* The post title */ ?>
  25. <div class="entry-content clearfix">
  26. <?php /* translators: This is the PHP date formatting string for the status post format. See http://php.net/manual/en/function.date.php for more details. */ ?>
  27. <p class="entry-date updated"><?php printf('%1$s &mdash; %2$s', get_the_time(__('l F j, Y', 'graphene')), get_the_time(__('g:i A', 'graphene'))); ?></p>
  28. <?php endif; ?>
  29.  
  30. <?php if (in_array($post_format, array('audio', 'image', 'video'))) : ?>
  31. <p class="entry-permalink"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(esc_attr__('Permalink to %s', 'graphene'), the_title_attribute('echo=0')); ?>"><?php if (get_the_title() == '') {_e('(No title)','graphene');} else {the_title();} ?></a></p>
  32. <?php endif; ?>
  33.  
  34. <?php /* Edit post link, if user is logged in */ ?>
  35. <?php if (is_user_logged_in()) : ?>
  36. <p class="edit-post">
  37. <?php edit_post_link(__('Edit post','graphene'), ' (', ')'); ?>
  38. </p>
  39. <?php endif; ?>
  40. </div>
  41. </div>
  42. <div class="entry-content clearfix">
  43. <div class="post-format-thumbnail">
  44. <?php if ($post_format == 'status') : /* Author's avatar, displayed only for the 'status' format */ ?>
  45. <?php echo get_avatar(get_the_author_meta('user_email'), 110); ?>
  46. <?php endif; ?>
  47.  
  48. <?php if ($post_format == 'audio') : /* Featured image, displayed only for the 'audio' format */
  49. if (has_post_thumbnail(get_the_ID())) {the_post_thumbnail(array(110,110));}
  50. endif; ?>
  51. </div>
  52.  
  53. <?php /* Modify the content_width var for video post format */
  54. if ($post_format == 'video'){
  55. global $content_width;
  56. $content_width -= 25;
  57. }
  58. ?>
  59.  
  60. <?php /* Output the post content */ ?>
  61. <?php the_content(); ?>
  62.  
  63. <?php /* Revert the content_width var for video post format */
  64. if ($post_format == 'video'){
  65. $content_width += 25;
  66. }
  67. ?>
  68.  
  69. <?php if (in_array($post_format, array('image', 'video'))) : ?>
  70. <?php /* translators: This is the PHP date formatting string for the image post format. See http://php.net/manual/en/function.date.php for more details. */ ?>
  71. <p class="entry-date updated"><?php printf( __( 'Posted on: %s', 'graphene' ), '<br /><span>' . get_the_time( __( 'F j, Y', 'graphene') ) . '</span>' ); ?></p>
  72. <?php endif; ?>
  73.  
  74. <?php if ($post_format == 'status') : /* Post author, displayed only for the 'status' format */ ?>
  75. <p class="post-author vcard">&mdash; <span class="fn nickname"><?php the_author_posts_link(); ?></span></p>
  76. <?php endif; ?>
  77. </div>
  78. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement