__( 'Primary Menu', 'bootstrapcanvaswp' ),
) );
// Custom Header
$args = array(
'flex-width' => true,
'width' => 980,
'flex-height' => true,
'height' => 175,
'default-text-color' => '333333',
);
add_theme_support( 'custom-header', $args );
// Custom Background
$args = array(
'default-color' => 'ffffff',
'default-image' => '%1$s/images/background.jpg',
);
add_theme_support( 'custom-background', $args );
}
endif;
add_action( 'after_setup_theme', 'bootstrapcanvaswp_setup' );
/**
* Widget Areas
*/
function bootstrapcanvaswp_widgets_init() {
register_sidebar( array(
'name' => 'Right Sidebar',
'id' => 'sidebar-1',
'description' => 'Main sidebar that appears on the right.', 'bootstrapcanvaswp',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '',
) );
register_sidebar( array(
'name' => 'Footer - Left',
'id' => 'footer-1',
'description' => 'Footer area that appears on the left.', 'bootstrapcanvaswp',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
) );
register_sidebar( array(
'name' => 'Footer - Center',
'id' => 'footer-2',
'description' => 'Footer area that appears in the center.', 'bootstrapcanvaswp',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
) );
register_sidebar( array(
'name' => 'Footer - Right',
'id' => 'footer-3',
'description' => 'Footer area that appears on the right.', 'bootstrapcanvaswp',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'bootstrapcanvaswp_widgets_init' );
/**
* Active Class
*/
function bootstrapcanvaswp_nav_class($classes, $item){
if( in_array('current-menu-item', $classes) ){
$classes[] = 'active ';
}
return $classes;
}
add_filter( 'nav_menu_css_class' , 'bootstrapcanvaswp_nav_class' , 10 , 2 );
/**
* Excerpt More . . .
*/
function new_excerpt_more( $more ) {
return ' . . .';
}
add_filter( 'excerpt_more', 'new_excerpt_more' );
/**
* Comment Callback
*/
function bootstrapcanvaswp_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
extract($args, EXTR_SKIP);
if ( 'div' == $args['style'] ) {
$tag = 'div';
$add_below = 'comment';
} else {
$tag = 'li';
$add_below = 'div-comment';
}
?>
< id="comment-">
id="div-comment-">
comment_approved == '0' ) : ?>
$add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>