functions.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?php
  2. /*
  3. Author: Eddie Machado
  4. URL: htp://themble.com/bones/
  5. This is the Bones Core file. It powers everything.
  6. YOU DON'T WANT TO MESS W/ THIS FILE UNLESS YOU KNOW WHAT YOU'RE DOING.
  7. At most, the only thing you should edit is adding or removing the
  8. expirimental features.
  9. */
  10. // Get Bones Core Up & Running!
  11. include_once('library/bones.php');
  12. /*
  13. Inside the bones.php file:
  14. 1. removing some wp calls in the header
  15. a. rsd_link (simple discovery link)
  16. b. wlwmanifest_link (windows live writer link)
  17. c. wp_generator (version number)
  18. 2. adding comment reply script via wp
  19. 3. adding custom scripts file in the footer
  20. 4. PNG fix for IE
  21. 5. adding wp 3.0 functions
  22. a. menus
  23. b. thumbnails
  24. c. custom bg images
  25. d. custom header images
  26. 6. relates posts scripts (optional)
  27. To Use Expirimental Features keep the line below enabled
  28. (DISABLE IF YOU DON'T WANT IT OR ENCOUNTER ANY ERRORS)
  29. To disable, simply add two slashes before it (//).
  30. When disabled, it would look like this:
  31. // include_once('library/plugins.php');
  32. */
  33. // Expirimental Features
  34. include_once('library/plugins.php');
  35. /* BONES FUNCTIONS (DO NOT EDIT) */
  36. // Thumbnail sizes
  37. add_image_size( 'bones-thumb-600', 600, 150, true );
  38. add_image_size( 'bones-thumb-100', 300, 100, true );
  39. /*
  40. to add more sizes, simply copy a line from above
  41. and change the dimensions & name. As long as you
  42. upload a "featured image" as large as the biggest
  43. set width or height, all the other sizes will be
  44. autocropped.
  45. To call a different size, simply change the text
  46. inside the thumbnail function.
  47. For example, to call the 300 x 300 sized image,
  48. we would use the function:
  49. <?php the_post_thumbnail( 'bones-thumb-300' ); ?>
  50. for the 600 x 100 image:
  51. <?php the_post_thumbnail( 'bones-thumb-600' ); ?>
  52. You can change the names and dimensions to whatever
  53. you like. Enjoy!
  54. */
  55. // Sidebars & Widgetizes Areas
  56. function bones_register_sidebars() {
  57. register_sidebar(array(
  58. 'id' => 'sidebar1',
  59. 'name' => 'Sidebar 1',
  60. 'description' => 'The first (primary) sidebar.',
  61. 'before_widget' => '<div id="%1$s" class="widget %2$s">',
  62. 'after_widget' => '</div>',
  63. 'before_title' => '<h4 class="widgettitle">',
  64. 'after_title' => '</h4>',
  65. ));
  66. /*
  67. to add more sidebars or widgetized areas, just copy
  68. and edit the above sidebar code. In order to call
  69. your new sidebar just use the following code:
  70. Just change the name to whatever your new
  71. sidebar's id is.
  72. */
  73. }
  74. // adding sidebars to Wordpress
  75. add_action( 'widgets_init', 'bones_register_sidebars' );
  76. // Comment Layout
  77. function bones_comments($comment, $args, $depth) {
  78. $GLOBALS['comment'] = $comment; ?>
  79. <li <?php comment_class(); ?>>
  80. <article id="comment-<?php comment_ID(); ?>">
  81. <header class="comment-author vcard">
  82. <?php echo get_avatar($comment,$size='32',$default='<path_to_url>' ); ?>
  83. <?php printf(__('<cite class="fn">%s</cite>'), get_comment_author_link()) ?>
  84. <time><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s'), get_comment_date(), get_comment_time()) ?></a></time>
  85. <?php edit_comment_link(__('(Edit)'),' ','') ?>
  86. </header>
  87. <?php if ($comment->comment_approved == '0') : ?>
  88. <div class="help">
  89. <p><?php _e('Your comment is awaiting moderation.') ?></p>
  90. </div>
  91. <?php endif; ?>
  92. <section class="comment_content clear">
  93. <?php comment_text() ?>
  94. </section>
  95. <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
  96. </article>
  97. <!-- </li> is added by wordpress automatically -->
  98. <?php
  99. }
  100. ?>