get_template_directory_uri() . '/default-header.png')); add_theme_support('post-formats', array('audio',)); add_theme_support('post-thumbnails'); register_nav_menu('primary', 'The primary header navigation menu'); } add_action('after_setup_theme', 'cobalt_after_theme_setup'); /** * Enqueues required stylesheets and javascript */ function cobalt_wp_enqueue_script() { wp_register_style('cobalt-google-font', '//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,300italic,400italic,700italic|Droid+Sans+Mono|Bitter:400,700&subset=latin,latin-ext'); wp_register_style('cobalt-theme', get_stylesheet_uri(), array('cobalt-google-font'), filemtime(get_template_directory() . '/style.css')); wp_enqueue_script('comment-reply'); add_editor_style(); if (!is_admin()) { wp_enqueue_style('cobalt-theme'); } } add_action('wp_enqueue_scripts', 'cobalt_wp_enqueue_script'); /** * Registers widget sidebars */ function cobalt_widgets_init() { register_sidebar(array( 'name' => __('Main Sidebar', 'cobalt'), 'id' => 'main-sidebar', 'description' => __('Appears on the right side of all posts and pages.', 'cobalt'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); } add_action('widgets_init', 'cobalt_widgets_init'); /** * Creates a nicely formatted title element text */ function cobalt_wp_title($title, $sep) { global $paged, $page; if (is_feed()) { return $title; } $title .= get_bloginfo('name'); if (($site_description = get_bloginfo('description', 'display')) && (is_home() || is_front_page())) { $title .= " $sep $site_description"; } if ($paged >= 2 || $page >= 2) { $title .= " $sep " . sprintf(__('Page %s', 'cobalt'), max($paged, $page)); } return $title; } add_filter('wp_title', 'cobalt_wp_title', 10, 2); /** * Section * View helpers */ /** * Prints out post meta data */ function cobalt_entry_meta() { global $post; if (is_page()) { return; } $categories = get_the_category_list(__(', ', 'cobalt')); $tags = get_the_tag_list('', __(', ', 'cobalt')); printf('', esc_attr(get_permalink()), esc_attr(get_the_time()), esc_attr(get_the_time('c')), esc_html(get_the_date())); if ($categories) { printf('%s', $categories); } if ($tags) { printf('%s', $tags); } printf('', esc_attr(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'cobalt'), get_the_author())), esc_html(get_the_author())); } /** * Prints out older/newer navigation in The Loop */ function cobalt_content_nav($html_id) { global $wp_query; if ($wp_query->max_num_pages > 1) { printf(''; } } /** * Prints out pagination in The Loop */ function cobalt_content_page() { echo paginate_links(); } /** * Prints out the colophon */ function cobalt_colophon() { echo ''; } /** * Prints out the title of the archive */ function cobalt_archive_title() { // Note: Author case is handled by author.php if (is_day()) { printf(__('Daily Archives: %s', 'cobalt'), get_the_date()); } else if (is_month()) { printf(__('Monthly Archives: %s', 'cobalt'), get_the_date('F Y')); } else if (is_year()) { printf(__('Yearly Archives: %s', 'cobalt'), get_the_date('Y')); } else if (is_tag()) { printf(__('Posts Tagged: %s', 'cobalt'), single_tag_title('', false)); } else { printf(__('Blog Archives', 'cobalt')); } } /** * Prints out comments */ function cobalt_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback': case 'trackback': ?>
  • >

    ', '' ); ?>

  • id="comment-">

    __( 'Reply', 'cobalt' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>

    %1$s%2$s', get_comment_author_link(), ( $comment->user_id === $post->post_author ) ? ' ' . __( 'Post author', 'cobalt' ) . '' : '' ); ?> ', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), sprintf( __( '%1$s at %2$s', 'cobalt' ), get_comment_date(), get_comment_time() ) ); ?>
    comment_approved ) : ?>

    Your comment is awaiting moderation