'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' => '
|^
|$#', '', $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' );