'ffffff',
'default-image' => '',
) ) );
add_editor_style('/inc/custom-editor-style.css');
function codon_custom_excerpt_length( $length ) {
// checks for and sets the custom excerpt length
if ( get_theme_mod ('excerpt-length' ) != null ) {
return get_theme_mod ('excerpt-length' );
} else {
return null;
}
}
add_filter( 'excerpt_length', 'codon_custom_excerpt_length', 999 );
}
endif; // codon_setup
add_action( 'after_setup_theme', 'codon_setup' );
/**
* Register widget area.
*
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
*/
function codon_widgets_init() {
if ( get_theme_mod ('header-widget') != 'off' && get_theme_mod ('header-style') == 'traditional' ) {
register_sidebar(array(
'name' => __( 'Header Widget', 'codon' ),
'id' => 'header-widget',
'description' => __( 'Widgets in this area will be shown on the right side of the header (Traditional header-style only).', 'codon' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
));
}
register_sidebar(array(
'name' => __( 'Page Sidebar', 'codon' ),
'id' => 'sidebar',
'description' => __( 'Widgets in this area will be shown on pages.', 'codon' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
));
if ( get_theme_mod ('post-style') != 'full' ) {
register_sidebar(array(
'name' => __( 'Post Sidebar', 'codon' ),
'id' => 'post-sidebar',
'description' => __( 'Widgets in this area will be shown on posts and archives.', 'codon' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
));
}
if ( get_theme_mod ('archive-post-sidebar') != 'off' ) {
register_sidebar(array(
'name' => __( 'Archive Sidebar', 'codon' ),
'id' => 'archive-sidebar',
'description' => __( 'Widgets in this area will be shown on archive pages.', 'codon' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
));
}
register_sidebar(array(
'name' => __( 'Home Sidebar', 'codon' ),
'id' => 'home-sidebar',
'description' => __( 'Widgets in this area will be shown on the homepage.', 'codon' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
));
register_sidebar(array(
'name' => __( 'Below Posts' , 'codon' ),
'id' => 'belowposts-sidebar',
'description' => __( 'Widgets in this area will be shown beneath the blog post type. Use this for sharing, related articles and more.', 'codon' ),
'before_title' => '
',
'after_title' => '
',
'before_widget' => '
',
'after_widget' => '
',
));
if ( get_theme_mod ('footer-widgets' ) == 'on' ) {
// makes sure footer widgets are turned on
register_sidebar(array(
'name' => __( 'Footer Widget 1', 'codon' ),
'id' => 'footer-widget-1',
'description' => __( 'Widgets in this area will show up in the leftmost footer column.', 'codon' ),
'before_widget' => '',
'before_title' => '
',
'after_title' => '
',
));
register_sidebar(array(
'name' => __( 'Footer Widget 2', 'codon' ),
'id' => 'footer-widget-2',
'description' => __( 'Widgets in this area will show up in the middle footer column.', 'codon' ),
'before_widget' => '',
'before_title' => '
',
'after_title' => '
',
));
register_sidebar(array(
'name' => __( 'Footer Widget 3', 'codon' ),
'id' => 'footer-widget-3',
'description' => __( 'Widgets in this area will show up in the right footer column.', 'codon' ),
'before_widget' => '',
'before_title' => '