150,
'height' => 150,
'flex-width' => true,
) );
add_theme_support( 'automatic-feed-links' );
function basically_bootstrap_4_remove_css_section( $wp_customize ) {
$wp_customize->remove_section( 'custom_css' );
}
add_action( 'customize_register', 'basically_bootstrap_4_remove_css_section', 15 );
// Register Menu Area
function basically_bootstrap_4_register_menu() {
register_nav_menu('header-menu',__( 'Header Menu', 'basically-bootstrap-4' ));
}
add_action( 'init', 'basically_bootstrap_4_register_menu' );
// Register widget area.
function basically_bootstrap_4_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar right', 'basically-bootstrap-4' ),
'id' => 'basically-bootstrap-4-sidebar-right',
'description' => '',
'before_widget' => '',
'before_title' => '
',
)
);
register_sidebar( array(
'name' => __( 'Sidebar left', 'basically-bootstrap-4' ),
'id' => 'basically-bootstrap-4-sidebar-left',
'description' => '',
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar( array(
'name' => __( 'Sidebar blog', 'basically-bootstrap-4' ),
'id' => 'basically-bootstrap-4-sidebar-blog',
'description' => '',
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar( array(
'name' => __( 'Footer Area Top', 'basically-bootstrap-4' ),
'id' => 'basically-bootstrap-4-footer-top',
'description' => '',
'before_widget' => '',
'before_title' => '',
)
);
$description_3 = '';
$description_4 = '';
switch(FOOTER_COLUMNS) {
case 2:
$class = 'col-md-6';
$description_3 = __('Not used (you have chosen only to use two columns under Customize)', 'basically-bootstrap-4');
$description_4 = __('Not used (you have chosen only to use two columns under Customize)', 'basically-bootstrap-4');
break;
case 3:
$class = 'col-md-4';
$description_4 = __('Not used (you have chosen only to use three columns under Customize)', 'basically-bootstrap-4');
break;
case 4:
$class = 'col-md-3 col-sm-6';
break;
default:
$description = '';
$class = 'col-md-3 col-sm-6';
break;
}
register_sidebar( array(
'name' => __( 'Footer Area 1', 'basically-bootstrap-4' ),
'id' => 'basically-bootstrap-4-footer-1',
'description' => '',
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar( array(
'name' => __( 'Footer Area 2', 'basically-bootstrap-4' ),
'id' => 'basically-bootstrap-4-footer-2',
'description' => '',
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar( array(
'name' => __( 'Footer Area 3', 'basically-bootstrap-4' ),
'id' => 'basically-bootstrap-4-footer-3',
'description' => $description_3,
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar( array(
'name' => __( 'Footer Area 4', 'basically-bootstrap-4' ),
'id' => 'basically-bootstrap-4-footer-4',
'description' => $description_4,
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar( array(
'name' => __( 'Footer Area Bottom', 'basically-bootstrap-4' ),
'id' => 'basically-bootstrap-4-footer-bottom',
'description' => '',
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar( array(
'name' => __( 'Page not found', 'basically-bootstrap-4' ),
'id' => 'basically-bootstrap-4-404',
'description' => '',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
)
);
}
add_action( 'widgets_init', 'basically_bootstrap_4_widgets_init' );
function basically_bootstrap_4_add_bootstrap_classes_on_insert( $postarr ) {
$postarr['post_content'] = str_replace('', '', $postarr['post_content'] );
return $postarr;
}
add_filter('wp_insert_post_data', 'basically_bootstrap_4_add_bootstrap_classes_on_insert');
?>