Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* ========================================================================================================================
- Required external files
- ======================================================================================================================== */
- require_once( 'external/starkers-utilities.php' );
- /* ========================================================================================================================
- Actions and Filters
- ======================================================================================================================== */
- add_action( 'wp_enqueue_scripts', 'script_enqueuer' );
- add_filter( 'body_class', 'add_slug_to_body_class' );
- /* ========================================================================================================================
- Custom Post Types - include custom post types and taxonimies here e.g.
- e.g. require_once( 'custom-post-types/your-custom-post-type.php' );
- ======================================================================================================================== */
- /* ========================================================================================================================
- Scripts
- ======================================================================================================================== */
- /**
- * Add scripts via wp_head()
- *
- * @return void
- * @author Keir Whitaker
- */
- function script_enqueuer() {
- wp_register_script( 'site', get_template_directory_uri().'/js/site.js', array( 'jquery' ) );
- wp_enqueue_script( 'site' );
- wp_register_style( 'screen', get_template_directory_uri().'/style.css', '', '', 'screen' );
- wp_enqueue_style( 'screen' );
- }
- /* ========================================================================================================================
- Comments
- ======================================================================================================================== */
- /**
- * Custom callback for outputting comments
- *
- * @return void
- * @author Keir Whitaker
- */
- function starkers_comment( $comment, $args, $depth ) {
- $GLOBALS['comment'] = $comment;
- ?>
- <?php if ( $comment->comment_approved == '1' ): ?>
- <li>
- <article id="comment-<?php comment_ID() ?>">
- <?php echo get_avatar( $comment ); ?>
- <h4><?php comment_author_link() ?></h4>
- <time><a href="#comment-<?php comment_ID() ?>" pubdate><?php comment_date() ?> at <?php comment_time() ?></a></time>
- <?php comment_text() ?>
- </article>
- <?php endif; ?>
- </li>
- <?php
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement