Advertisement
Guest User

Functions.php

a guest
Jan 18th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. <?php
  2. // Adds RSS feeds link
  3. if(!get_option('pyre_feedburner')) {
  4. add_theme_support('automatic-feed-links');
  5. }
  6.  
  7. // Register Widgetized Areas
  8. if(function_exists('register_sidebar')) {
  9. register_sidebar(array(
  10. 'name' => 'Sidebar',
  11. 'before_widget' => '<div class="widget">',
  12. 'after_widget' => '</div>',
  13. 'before_title' => '<h3 class="widget-title">',
  14. 'after_title' => '</h3>',
  15. ));
  16.  
  17. register_sidebar(array(
  18. 'name' => 'Homepage',
  19. 'before_widget' => '<div class="homepage-widget">',
  20. 'after_widget' => '</div>',
  21. 'before_title' => '<h3>',
  22. 'after_title' => '</h3>',
  23. ));
  24.  
  25. register_sidebar(array(
  26. 'name' => 'Footer Widget 1',
  27. 'before_widget' => '<div class="widget">',
  28. 'after_widget' => '</div>',
  29. 'before_title' => '<h3 class="widget-title">',
  30. 'after_title' => '</h3>',
  31. ));
  32.  
  33. register_sidebar(array(
  34. 'name' => 'Footer Widget 2',
  35. 'before_widget' => '<div class="widget">',
  36. 'after_widget' => '</div>',
  37. 'before_title' => '<h3 class="widget-title">',
  38. 'after_title' => '</h3>',
  39. ));
  40.  
  41. register_sidebar(array(
  42. 'name' => 'Footer Widget 3',
  43. 'before_widget' => '<div class="widget last">',
  44. 'after_widget' => '</div>',
  45. 'before_title' => '<h3 class="widget-title">',
  46. 'after_title' => '</h3>',
  47. ));
  48. }
  49.  
  50. // Add post thumbnail functionality
  51. add_theme_support('post-thumbnails', array('post'));
  52.  
  53. add_image_size('post-image', 610, 250, true);
  54. add_image_size('featured-image', 516, 340, true);
  55. add_image_size('featured-image-thumb', 70, 60, true);
  56. add_image_size('widget-image', 290, 160, true);
  57. add_image_size('widget-image-thumb', 50, 50, true);
  58. add_image_size('media-thumb', 140, 90, true);
  59. add_image_size('related-thumb', 134, 90, true);
  60.  
  61. // Include boostrap file for the pyre theme framework
  62. include_once('framework/bootstrap.php');
  63.  
  64. // Custom Functions
  65. include_once('framework/functions.php');
  66.  
  67. // Shortcodes
  68. include_once('shortcodes.php');
  69.  
  70. // How comments are displayed
  71. function avenue_comment($comment, $args, $depth) {
  72. $GLOBALS['comment'] = $comment; ?>
  73. <li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>">
  74.  
  75. <div class="the-comment">
  76.  
  77. <?php echo get_avatar($comment,$size='60'); ?>
  78.  
  79. <div class="comment-arrow"></div>
  80.  
  81. <div class="comment-box">
  82.  
  83. <div class="comment-author">
  84. <strong><?php echo get_comment_author_link() ?></strong>
  85. <small><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('Edit'),' ','') ?> - <?php comment_reply_link(array_merge( $args, array('reply_text' => 'Reply', 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?></small>
  86. </div>
  87.  
  88. <div class="comment-text">
  89. <?php if ($comment->comment_approved == '0') : ?>
  90. <em><?php _e('Your comment is awaiting moderation.') ?></em>
  91. <br />
  92. <?php endif; ?>
  93. <?php comment_text() ?>
  94. </div>
  95.  
  96. </div>
  97.  
  98. </div>
  99.  
  100. <?php }
  101. // Trim end of excerpt
  102. function pyre_trim_excerpt($text) {
  103. return rtrim($text, '[...]');
  104. }
  105. add_filter('get_the_excerpt', 'pyre_trim_excerpt');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement