'ffffff', ); $args = apply_filters( 'keiran_custom_background_args', $args ); if ( function_exists( 'wp_get_theme' ) ) { add_theme_support( 'custom-background', $args ); } else { define( 'BACKGROUND_COLOR', $args['default-color'] ); add_custom_background(); } add_theme_support( 'custom-header' ); // This theme uses wp_nav_menu() in one location register_nav_menus( array( 'main-menu' => __( 'Primary Navigation', 'keiran' ), ) ); // Load up the theme options page require ( get_template_directory() . '/includes/theme-options.php' ); // Used to style the TinyMCE editor add_editor_style(); // Make theme available for translation, Translations can be filed in the /languages/ directory // Load Theme textdomain load_theme_textdomain('keiran', get_template_directory() . '/languages'); } function keiran_filter_wp_title( $title ) { // Get the Site Name $site_name = get_bloginfo( 'name' ); // Prepend it to the default output $filtered_title = $site_name ." ". $title; // Return the modified title return $filtered_title; } // Hook into 'wp_title' add_filter( 'wp_title', 'keiran_filter_wp_title' ); function keiran_custom_blogname_rss($val, $show) { if( 'name' == $show ) $out = 'Feed: '; else $out = $val; return $out; } add_filter('bloginfo_rss','keiran_custom_blogname_rss', 10, 2); // Register widgetized area and update sidebar with default widgets add_action( 'widgets_init', 'keiran_widgets_init' ); function keiran_widgets_init() { register_sidebar( array ( 'name' => __( 'Right sidebar', 'keiran' ), 'id' => 'sidebar', 'description' => __('The widget area on the right sidebar', 'keiran'), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); } // Remove predefined gallery styles add_filter( 'use_default_gallery_style', '__return_false' ); function keiran_body_classes( $classes ) { // Adds a class of .no-sidebar when there are no widgets in the if ( ! is_active_sidebar( 'sidebar' ) ) { $classes[] = 'no-sidebar'; } return $classes; } add_filter( 'body_class', 'keiran_body_classes' ); //Comments function keiran_enqueue_comment_reply() { if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'keiran_enqueue_comment_reply' ); // Template for comments & pingbacks if ( ! function_exists( 'keiran_comment' ) ) : function keiran_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?>
  • id="li-comment-">
    says:', 'keiran' ), sprintf( '%s', get_comment_author_link() ) ); ?>
    comment_approved == '0' ) : ?>
    $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
  • |^
    |

    $#', '', $content); return $content; } } // Columns Shortcodes // Don't forget to add "_last" behind the shortcode if it is the last column. // Two Columns function keiran_shortcode_one_half( $atts, $content = null ) { return '

    ' . keiran_remove_wpautop($content) . '
    '; } add_shortcode( 'one_half', 'keiran_shortcode_one_half' ); function keiran_shortcode_one_half_last( $atts, $content = null ) { return '
    ' . keiran_remove_wpautop($content) . '
    '; } add_shortcode( 'one_half_last', 'keiran_shortcode_one_half_last' ); // Three Columns function keiran_shortcode_one_third($atts, $content = null) { return '
    ' . keiran_remove_wpautop($content) . '
    '; } add_shortcode( 'one_third', 'keiran_shortcode_one_third' ); function keiran_shortcode_one_third_last($atts, $content = null) { return '
    ' . keiran_remove_wpautop($content) . '
    '; } add_shortcode( 'one_third_last', 'keiran_shortcode_one_third_last' ); function keiran_shortcode_two_third($atts, $content = null) { return '
    ' . keiran_remove_wpautop($content) . '
    '; } add_shortcode( 'two_third', 'keiran_shortcode_two_third' ); function keiran_shortcode_two_third_last($atts, $content = null) { return '
    ' . keiran_remove_wpautop($content) . '
    '; } add_shortcode( 'two_third_last', 'keiran_shortcode_two_third_last' ); // Four Columns function keiran_shortcode_one_fourth($atts, $content = null) { return '
    ' . keiran_remove_wpautop($content) . '
    '; } add_shortcode( 'one_fourth', 'keiran_shortcode_one_fourth' ); function keiran_shortcode_one_fourth_last($atts, $content = null) { return '
    ' . keiran_remove_wpautop($content) . '
    '; } add_shortcode( 'one_fourth_last', 'keiran_shortcode_one_fourth_last' ); function keiran_shortcode_three_fourth( $atts, $content = null ) { return '
    ' . keiran_remove_wpautop($content) . '
    '; } add_shortcode( 'three_fourth', 'keiran_shortcode_three_fourth' ); function keiran_shortcode_three_fourth_last( $atts, $content = null ) { return '
    ' . keiran_remove_wpautop($content) . '
    '; } add_shortcode( 'three_fourth_last', 'keiran_shortcode_three_fourth_last' ); // Divide Text Shortcode function keiran_shortcode_divider($atts, $content = null) { return '
    '; } add_shortcode( 'divider', 'keiran_shortcode_divider' ); //Text Highlight and Info Boxes Shortcodes function keiran_shortcode_highlight($atts, $content = null) { return '' . do_shortcode( keiran_remove_wpautop($content) ) . ''; } add_shortcode( 'highlight', 'keiran_shortcode_highlight' ); function keiran_shortcode_white_box($atts, $content = null) { return '
    ' . do_shortcode( keiran_remove_wpautop($content) ) . '
    '; } add_shortcode( 'white_box', 'keiran_shortcode_white_box' ); function keiran_shortcode_blue_box($atts, $content = null) { return '
    ' . do_shortcode( keiran_remove_wpautop($content) ) . '
    '; } add_shortcode( 'blue_box', 'keiran_shortcode_blue_box' ); function keiran_shortcode_yellow_box($atts, $content = null) { return '
    ' . do_shortcode( keiran_remove_wpautop($content) ) . '
    '; } add_shortcode( 'yellow_box', 'keiran_shortcode_yellow_box' ); function keiran_shortcode_orange_box($atts, $content = null) { return '
    ' . do_shortcode( keiran_remove_wpautop($content) ) . '
    '; } add_shortcode( 'orange_box', 'keiran_shortcode_orange_box' ); function keiran_shortcode_red_box($atts, $content = null) { return '
    ' . do_shortcode( keiran_remove_wpautop($content) ) . '
    '; } add_shortcode( 'red_box', 'keiran_shortcode_red_box' ); function keiran_shortcode_pink_box($atts, $content = null) { return '
    ' . do_shortcode( keiran_remove_wpautop($content) ) . '
    '; } add_shortcode( 'pink_box', 'keiran_shortcode_pink_box' ); function keiran_shortcode_green_box($atts, $content = null) { return '
    ' . do_shortcode( keiran_remove_wpautop($content) ) . '
    '; } add_shortcode( 'green_box', 'keiran_shortcode_green_box' ); function keiran_shortcode_grey_box($atts, $content = null) { return '
    ' . do_shortcode( keiran_remove_wpautop($content) ) . '
    '; } add_shortcode( 'grey_box', 'keiran_shortcode_grey_box' ); function keiran_shortcode_brown_box($atts, $content = null) { return '
    ' . do_shortcode( keiran_remove_wpautop($content) ) . '
    '; } add_shortcode( 'brown_box', 'keiran_shortcode_brown_box' );