PageRenderTime 37ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/image.php

https://github.com/mohitkr05/project-ar2
PHP | 109 lines | 87 code | 22 blank | 0 comment | 11 complexity | 6d58dcfbdf9b5af95e91909dbc0d6eac MD5 | raw file
Possible License(s): AGPL-1.0
  1. <?php get_header(); ?>
  2. <div id="content" class="section" role="main">
  3. <?php ar2_above_content() ?>
  4. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  5. <?php ar2_above_post() ?>
  6. <article id="post-<?php the_ID() ?>" <?php post_class() ?>>
  7. <header class="entry-header clearfix">
  8. <h1 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title() ?></a></h1>
  9. <?php if ( ar2_get_theme_option( 'post_display[post_author]' ) ) : ?>
  10. <div class="entry-author">
  11. <?php printf( __( 'Posted by %1$s %2$s', 'ar2' ),
  12. '<address class="author vcard"><a class="url fn n" href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '" title="' . esc_attr( get_the_author() ) . '">' . get_the_author() . '</a></address>',
  13. '<abbr class="published">' . ar2_posted_on( false ) . '</abbr>'
  14. ); ?>
  15. <?php edit_post_link( __( 'Edit', 'ar2' ) ) ?>
  16. </div>
  17. <?php else : ?>
  18. <div class="entry-author">
  19. <?php printf( __( 'Posted %s', 'ar2' ), '<abbr class="published">' . ar2_posted_on( false ) . '</abbr>' ); ?>
  20. <?php edit_post_link( __( 'Edit', 'ar2' ) ) ?>
  21. </div>
  22. <?php endif ?>
  23. <div class="entry-caption"><?php the_excerpt() ?></div>
  24. <div class="entry-photo">
  25. <a href="<?php echo wp_get_attachment_url() ?>" title="<?php the_title_attribute(); ?>" rel="attachment">
  26. <?php echo wp_get_attachment_image( $post->ID, 'single-thumb' ) ?>
  27. </a>
  28. </div>
  29. <?php if ( ar2_get_theme_option( 'post_display[post_social]' ) ) : ?>
  30. <div class="entry-social">
  31. <div class="addthis_toolbox addthis_default_style">
  32. <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
  33. <a class="addthis_button_tweet"></a>
  34. <a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
  35. <a class="addthis_counter addthis_pill_style"></a>
  36. </div>
  37. </div>
  38. <?php endif ?>
  39. </header><!-- .entry-header -->
  40. <div class="entry-content clearfix">
  41. <?php the_content( __( '<p>Read the rest of this entry &raquo;</p>', 'ar2' ) ); ?>
  42. <?php wp_link_pages( array( 'before' => '<p class="post-navigation"><strong>' . __( 'Pages:', 'ar2' ) . '</strong>',
  43. 'after' => '</p>', 'next_or_number' => 'number', 'pagelink' => '<span>%</span>' ) ); ?>
  44. </div>
  45. <footer class="entry-footer clearfix">
  46. <?php if ( ar2_get_theme_option( 'post_display[post_social]' ) ) : ?>
  47. <div class="entry-social">
  48. <div class="addthis_toolbox addthis_default_style">
  49. <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
  50. <a class="addthis_button_tweet"></a>
  51. <a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
  52. <a class="addthis_counter addthis_pill_style"></a>
  53. </div>
  54. </div>
  55. <?php endif ?>
  56. <?php if ( ar2_get_theme_option( 'post_display[post_tags]' ) && is_array( get_the_tags() ) ) : ?>
  57. <div class="entry-tags tags">
  58. <?php the_tags( '<strong>' . __( 'Tags: ', 'ar2' ) . '</strong>', ' ' ) ?>
  59. </div>
  60. <?php endif ?>
  61. <?php if ( ar2_get_theme_option( 'post_display[display_author]' ) ) : ?>
  62. <?php $id = get_the_author_meta( 'ID' ); ?>
  63. <div class="about-author clearfix">
  64. <a class="author-avatar" href="<?php get_author_posts_url( $id ) ?>"><?php echo get_avatar( $id, 64 ) ?></a>
  65. <div class="author-meta">
  66. <h4><?php printf( __( 'About %s', 'ar2' ), get_the_author_meta( 'display_name' ) ) ?></h4>
  67. <?php
  68. if ( get_the_author_meta( 'description' ) == '' )
  69. _e( 'No information is provided by the author.', 'ar2' );
  70. else
  71. the_author_meta( 'description' );
  72. ?>
  73. </div>
  74. </div>
  75. <?php endif ?>
  76. </footer><!-- .entry-footer -->
  77. </article>
  78. <?php ar2_below_post() ?>
  79. <?php comments_template( '', true ); ?>
  80. <?php ar2_below_comments() ?>
  81. <?php endwhile; else: ?>
  82. <?php ar2_post_notfound() ?>
  83. <?php endif; ?>
  84. <?php ar2_below_content() ?>
  85. </div><!-- #content -->
  86. <?php get_sidebar(); ?>
  87. <?php get_footer(); ?>