PageRenderTime 41ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/blog/wp-content/themes/extinct/sandbox-097/attachment.php

https://bitbucket.org/sergiohzlz/reportaprod
PHP | 53 lines | 42 code | 11 blank | 0 comment | 13 complexity | c0c24e0b4800ddec265741167ed153de MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, AGPL-1.0, LGPL-2.1
  1. <?php get_header() ?>
  2. <div id="container">
  3. <div id="content">
  4. <?php the_post() ?>
  5. <?php $attachment_link = get_the_attachment_link($post->ID, true, array(600, 800)); // Finds attachment, sizes it ?>
  6. <?php $_post = &get_post($post->ID); $classname = ($_post->iconsize[0] <= 128 ? 'small' : '') . 'attachment'; // If it's small, give it 'small' in its class name ?>
  7. <h2 class="page-title"><a href="<?php echo get_permalink($post->post_parent) ?>" rev="attachment"><?php echo get_the_title($post->post_parent) ?></a></h2>
  8. <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class() ?>">
  9. <h3 class="entry-title"><?php the_title() ?></h3>
  10. <div class="entry-content">
  11. <p class="<?php echo $classname ?>"><?php echo $attachment_link ?></p>
  12. <p class="<?php echo $classname ?>-name"><?php echo basename($post->guid) ?></p>
  13. <?php the_content(''.__('Read More <span class="meta-nav">&raquo;</span>', 'sandbox').''); ?>
  14. <?php link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'sandbox'), "</div>\n", 'number'); ?>
  15. </div>
  16. <div class="entry-meta">
  17. <?php printf(__('This entry was written by %1$s and posted on <abbr class="published" title="%2$sT%3$s">%4$s at %5$s</abbr>. Bookmark the <a href="%6$s" title="Permalink to %7$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%8$s" title="Comments RSS to %7$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'sandbox'),
  18. '<span class="author vcard"><a class="url fn n" href="'.get_author_link(false, $authordata->ID, $authordata->user_nicename).'" title="' . sprintf(__('View all posts by %s', 'sandbox'), $authordata->display_name) . '">'.get_the_author().'</a></span>',
  19. get_the_time('Y-m-d'),
  20. get_the_time('H:i:sO'),
  21. the_date('', '', '', false),
  22. get_the_time(),
  23. get_permalink(),
  24. esc_attr( get_the_title() ),
  25. comments_rss() ) ?>
  26. <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) : // Comments and trackbacks open ?>
  27. <?php printf(__('<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'sandbox'), get_trackback_url()) ?>
  28. <?php elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) : // Only trackbacks open ?>
  29. <?php printf(__('Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'sandbox'), get_trackback_url()) ?>
  30. <?php elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) : // Only comments open ?>
  31. <?php printf(__('Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'sandbox')) ?>
  32. <?php elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) : // Comments and trackbacks closed ?>
  33. <?php _e('Both comments and trackbacks are currently closed.') ?>
  34. <?php endif; ?>
  35. <?php edit_post_link(__('Edit', 'sandbox'), "\n\t\t\t\t\t<span class=\"edit-link\">", "</span>"); ?>
  36. </div>
  37. </div><!-- .post -->
  38. <?php comments_template(); ?>
  39. </div><!-- #content -->
  40. </div><!-- #container -->
  41. <?php get_sidebar() ?>
  42. <?php get_footer() ?>