/data/wpcom-themes/chaoticsoul/sidebar.php

https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests · PHP · 91 lines · 64 code · 23 blank · 4 comment · 18 complexity · 9d46a6032d1e5f70c95b77cb27a72fa1 MD5 · raw file

  1. <div id="sidebar">
  2. <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
  3. <?php include (TEMPLATEPATH . '/searchform.php'); ?>
  4. <?php if (is_single()) { ?>
  5. <h3><?php _e('About This Post','chaoticsoul'); ?></h3>
  6. <p class="postmetadata alt">
  7. <small>
  8. <?php
  9. printf(__('This entry was posted on %s at %s and is filed under %s.', 'chaoticsoul'), get_the_time(get_option('date_format')), get_the_time(get_option('time_format')), get_the_category_list(', '));
  10. printf(__('You can follow any responses to this entry through the %s feed.', 'chaoticsoul'), '<a href="'.get_post_comments_feed_link().'">RSS 2.0</a>');
  11. if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
  12. // Both Comments and Pings are open
  13. printf(__('You can <a href="#respond">leave a response</a>, or <a href="%s" rel="trackback">trackback</a> from your own site.', 'chaoticsoul'), get_trackback_url(true));
  14. } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
  15. // Only Pings are Open
  16. printf(__('Responses are currently closed, but you can <a href="%s" rel="trackback">trackback</a> from your own site.', 'chaoticsoul'), get_trackback_url(true));
  17. } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
  18. // Comments are open, Pings are not
  19. _e('You can skip to the end and leave a response. Pinging is currently not allowed.', 'chaoticsoul');
  20. } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
  21. // Neither Comments, nor Pings are open
  22. _e('Both comments and pings are currently closed.', 'chaoticsoul');
  23. }
  24. edit_post_link(__('Edit this entry.', 'chaoticsoul'),'','');
  25. ?>
  26. </small>
  27. </p>
  28. <h3><?php _e('Navigate', 'chaoticsoul'); ?></h3>
  29. <ul class="navigation">
  30. <?php previous_post_link('<li>'.__('Previous:', 'chaoticsoul').'&nbsp;<strong>%link</strong></li>') ?>
  31. <?php next_post_link('<li>'.__('Next:', 'chaoticsoul').'&nbsp;<strong>%link</strong></li>') ?>
  32. </ul>
  33. <?php } else { ?>
  34. <?php /* If this is a 404 page */ if (is_404()) { ?>
  35. <?php /* If this is a category archive */ } elseif (is_category()) { ?>
  36. <h3><?php _e('About This Page'); ?></h3>
  37. <p><?php printf(__('You are currently browsing the archives for the %s category.', 'chaoticsoul'), single_cat_title('', false)); ?></p>
  38. <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  39. <h3><?php _e('About This Page'); ?></h3>
  40. <p><?php printf(__('You are currently browsing the %s weblog archives for the day %s.', 'chaoticsoul'), '<a href="'.get_bloginfo('home').'/">'.get_bloginfo('name').'</a>', get_the_time(get_option('date_format')));?></p>
  41. <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  42. <h3><?php _e('About This Page'); ?></h3>
  43. <p><?php printf(__('You are currently browsing the %s weblog archives for %s.', 'chaoticsoul'), '<a href="'.get_bloginfo('home').'/">'.get_bloginfo('name').'</a>', get_the_time('F, Y'));?></p>
  44. <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  45. <h3><?php _e('About This Page'); ?></h3>
  46. <p><?php printf(__('You are currently browsing the %s weblog archives for the year %s.', 'chaoticsoul'), '<a href="'.get_bloginfo('home').'/">'.get_bloginfo('name').'</a>', get_the_time('Y'));?></p>
  47. <?php /* If this is a search */ } elseif (is_search()) { ?>
  48. <h3><?php _e('About This Page'); ?></h3>
  49. <p><?php printf(__('You have searched the %s weblog archives for %s. If you are unable to find anything in these search results, you can try one of these links.', 'chaoticsoul'), '<a href="'.get_bloginfo('home').'/">'.get_bloginfo('name').'</a>', '<strong>'.wp_specialchars($s).'</strong>');?></p>
  50. <?php /* Paged archive */ } elseif (is_paged()) { ?>
  51. <h3><?php _e('About This Page'); ?></h3>
  52. <p><?php printf(__('You are currently browsing the %s weblog archives.', 'chaoticsoul'), '<a href="'.get_bloginfo('home').'/">'.get_bloginfo('name').'</a>');?></p>
  53. <?php } ?>
  54. <h3><?php _e('Pages', 'chaoticsoul'); ?></h3>
  55. <ul>
  56. <?php wp_list_pages('title_li='); ?>
  57. </ul>
  58. <h3><?php _e('Archives', 'chaoticsoul'); ?></h3>
  59. <ul>
  60. <?php wp_get_archives('type=monthly'); ?>
  61. </ul>
  62. <h3><?php _e('Categories', 'chaoticsoul'); ?></h3>
  63. <ul>
  64. <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
  65. </ul>
  66. <?php } ?>
  67. <?php endif; ?>
  68. </div>