Guest User

Untitled

a guest
Jan 30th, 2014
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.89 KB | None | 0 0
  1. // Load Core
  2. require_once( get_template_directory() . '/cyberchimps/init.php' );
  3.  
  4. // Set the content width based on the theme's design and stylesheet.
  5. if( !isset( $content_width ) ) {
  6. $content_width = 640;
  7. } /* pixels */
  8.  
  9. // Define site info
  10. function cyberchimps_add_site_info() {
  11. ?>
  12. <p>&copy; Company Name</p>
  13. <?php
  14. }
  15.  
  16. add_action( 'cyberchimps_site_info', 'cyberchimps_add_site_info' );
  17.  
  18. if( !function_exists( 'cyberchimps_comment' ) ) :
  19.  
  20. // Template for comments and pingbacks.
  21. // Used as a callback by wp_list_comments() for displaying the comments.
  22. function cyberchimps_comment( $comment, $args, $depth ) {
  23. $GLOBALS['comment'] = $comment;
  24. switch( $comment->comment_type ) :
  25. case 'pingback' :
  26. case 'trackback' :
  27. ?>
  28. <li class="post pingback">
  29. <p><?php _e( 'Pingback:', 'cyberchimps' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'cyberchimps' ), ' ' ); ?></p>
  30. <?php
  31. break;
  32. default :
  33. ?>
  34. <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
  35. <article id="comment-<?php comment_ID(); ?>" class="comment hreview">
  36. <footer>
  37. <div class="comment-author reviewer vcard">
  38. <?php echo get_avatar( $comment, 40 ); ?>
  39. <?php printf( '%s <span class="says">' . __( 'says:', 'cyberchimps' ) . '</span>', sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
  40. </div>
  41. <!-- .comment-author .vcard -->
  42. <?php if( $comment->comment_approved == '0' ) : ?>
  43. <em><?php _e( 'Your comment is awaiting moderation.', 'cyberchimps' ); ?></em>
  44. <br/>
  45. <?php endif; ?>
  46.  
  47. <div class="comment-meta commentmetadata">
  48. <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>" class="dtreviewed">
  49. <time pubdate datetime="<?php comment_time( 'c' ); ?>">
  50. <?php
  51. /* translators: 1: date, 2: time */
  52. printf( __( '%1$s at %2$s', 'cyberchimps' ), get_comment_date(), get_comment_time() ); ?>
  53. </time>
  54. </a>
  55. <?php edit_comment_link( __( '(Edit)', 'cyberchimps' ), ' ' );
  56. ?>
  57. </div>
  58. <!-- .comment-meta .commentmetadata -->
  59. </footer>
  60.  
  61. <div class="comment-content"><?php comment_text(); ?></div>
  62.  
  63. <div class="reply">
  64. <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
  65. </div>
  66. <!-- .reply -->
  67. </article><!-- #comment-## -->
  68.  
  69. <?php
  70. break;
  71. endswitch;
  72. }
  73. endif; // ends check for cyberchimps_comment()
  74.  
  75. // set up next and previous post links for lite themes only
  76. function cyberchimps_next_previous_posts() {
  77. if( get_next_posts_link() || get_previous_posts_link() ): ?>
  78. <div class="more-content">
  79. <div class="row-fluid">
  80. <div class="span6 next-post">
  81. <?php next_posts_link(); ?>
  82. </div>
  83. </div>
  84. </div>
  85. <?php
  86. endif;
  87. }
  88.  
  89. add_action( 'cyberchimps_after_content', 'cyberchimps_next_previous_posts' );
  90.  
  91. // core options customization Names and URL's
  92. //Pro or Free
  93. function cyberchimps_theme_check() {
  94. $level = 'free';
  95.  
  96. return $level;
  97. }
  98.  
  99. //Theme Name
  100. function cyberchimps_options_theme_name() {
  101. $text = 'CyberChimps';
  102.  
  103. return $text;
  104. }
  105.  
  106. //Theme Pro Name
  107. function cyberchimps_upgrade_bar_pro_title() {
  108. $text = 'CyberChimps Pro';
  109.  
  110. return $text;
  111. }
  112.  
  113. //Upgrade link
  114. function cyberchimps_upgrade_bar_pro_link() {
  115. $url = 'http://cyberchimps.com/store/cyberchimpspro/';
  116.  
  117. return $url;
  118. }
  119.  
  120. //Doc's URL
  121. function cyberchimps_options_documentation_url() {
  122. $url = 'http://cyberchimps.com/guides/c/';
  123.  
  124. return $url;
  125. }
  126.  
  127. // Support Forum URL
  128. function cyberchimps_options_support_forum() {
  129. $url = 'http://cyberchimps.com/forum/free/cyberchimps/';
  130.  
  131. return $url;
  132. }
  133.  
  134. add_filter( 'cyberchimps_current_theme_name', 'cyberchimps_options_theme_name', 1 );
  135. add_filter( 'cyberchimps_upgrade_pro_title', 'cyberchimps_upgrade_bar_pro_title' );
  136. add_filter( 'cyberchimps_upgrade_link', 'cyberchimps_upgrade_bar_pro_link' );
  137. add_filter( 'cyberchimps_documentation', 'cyberchimps_options_documentation_url' );
  138. add_filter( 'cyberchimps_support_forum', 'cyberchimps_options_support_forum' );
  139.  
  140. // Help Section
  141. function cyberchimps_options_help_header() {
  142. $text = 'CyberChimps';
  143.  
  144. return $text;
  145. }
  146.  
  147. function cyberchimps_options_help_sub_header() {
  148. $text = __( 'CyberChimps Professional Responsive WordPress Theme', 'cyberchimps' );
  149.  
  150. return $text;
  151. }
  152.  
  153. add_filter( 'cyberchimps_help_heading', 'cyberchimps_options_help_header' );
  154. add_filter( 'cyberchimps_help_sub_heading', 'cyberchimps_options_help_sub_header' );
  155.  
  156. // Branding images and defaults
  157.  
  158. // Banner default
  159. function cyberchimps_banner_default() {
  160. $url = '/images/branding/banner.jpg';
  161.  
  162. return $url;
  163. }
  164.  
  165. add_filter( 'cyberchimps_banner_img', 'cyberchimps_banner_default' );
  166.  
  167. //theme specific skin options in array. Must always include option default
  168. function cyberchimps_skin_color_options( $options ) {
  169. // Get path of image
  170. $imagepath = get_template_directory_uri() . '/inc/css/skins/images/';
  171.  
  172. $options = array(
  173. 'default' => $imagepath . 'default.png'
  174. );
  175.  
  176. return $options;
  177. }
  178.  
  179. add_filter( 'cyberchimps_skin_color', 'cyberchimps_skin_color_options' );
  180.  
  181. // theme specific background images
  182. function cyberchimps_background_image( $options ) {
  183. $imagepath = get_template_directory_uri() . '/cyberchimps/lib/images/';
  184. $options = array(
  185. 'none' => $imagepath . 'backgrounds/thumbs/none.png',
  186. 'noise' => $imagepath . 'backgrounds/thumbs/noise.png',
  187. 'blue' => $imagepath . 'backgrounds/thumbs/blue.png',
  188. 'dark' => $imagepath . 'backgrounds/thumbs/dark.png',
  189. 'space' => $imagepath . 'backgrounds/thumbs/space.png'
  190. );
  191.  
  192. return $options;
  193. }
  194.  
  195. add_filter( 'cyberchimps_background_image', 'cyberchimps_background_image' );
  196.  
  197. // theme specific typography options
  198. function cyberchimps_typography_sizes( $sizes ) {
  199. $sizes = array( '8', '9', '10', '12', '14', '16', '20' );
  200.  
  201. return $sizes;
  202. }
  203.  
  204. function cyberchimps_typography_faces( $faces ) {
  205. $faces = array(
  206. 'Arial, Helvetica, sans-serif' => 'Arial',
  207. 'Arial Black, Gadget, sans-serif' => 'Arial Black',
  208. 'Comic Sans MS, cursive' => 'Comic Sans MS',
  209. 'Courier New, monospace' => 'Courier New',
  210. 'Georgia, serif' => 'Georgia',
  211. 'Impact, Charcoal, sans-serif' => 'Impact',
  212. 'Lucida Console, Monaco, monospace' => 'Lucida Console',
  213. 'Lucida Sans Unicode, Lucida Grande, sans-serif' => 'Lucida Sans Unicode',
  214. 'Palatino Linotype, Book Antiqua, Palatino, serif' => 'Palatino Linotype',
  215. 'Tahoma, Geneva, sans-serif' => 'Tahoma',
  216. 'Times New Roman, Times, serif' => 'Times New Roman',
  217. 'Trebuchet MS, sans-serif' => 'Trebuchet MS',
  218. 'Verdana, Geneva, sans-serif' => 'Verdana',
  219. 'Symbol' => 'Symbol',
  220. 'Webdings' => 'Webdings',
  221. 'Wingdings, Zapf Dingbats' => 'Wingdings',
  222. 'MS Sans Serif, Geneva, sans-serif' => 'MS Sans Serif',
  223. 'MS Serif, New York, serif' => 'MS Serif',
  224. );
  225.  
  226. return $faces;
  227. }
  228.  
  229. function cyberchimps_typography_styles( $styles ) {
  230. $styles = array( 'normal' => 'Normal', 'bold' => 'Bold' );
  231.  
  232. return $styles;
  233. }
  234.  
  235. add_filter( 'cyberchimps_typography_sizes', 'cyberchimps_typography_sizes' );
  236. add_filter( 'cyberchimps_typography_faces', 'cyberchimps_typography_faces' );
  237. add_filter( 'cyberchimps_typography_styles', 'cyberchimps_typography_styles' );
  238.  
  239. // Default for twitter bar handle
  240. function cyberchimps_twitter_handle_filter() {
  241. return 'WordPress';
  242. }
  243.  
  244. add_filter( 'cyberchimps_twitter_handle_filter', 'cyberchimps_twitter_handle_filter' );
  245. ?>
Advertisement
Add Comment
Please, Sign In to add comment