2016-11-21 08:49:37 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Check and setup theme's default settings
|
2017-01-27 12:08:05 +00:00
|
|
|
*
|
|
|
|
* @package understrap
|
2017-02-01 16:10:32 +00:00
|
|
|
*
|
2016-11-21 08:49:37 +00:00
|
|
|
*/
|
|
|
|
|
2017-11-27 08:07:11 +00:00
|
|
|
if ( ! function_exists( 'understrap_setup_theme_default_settings' ) ) :
|
|
|
|
function understrap_setup_theme_default_settings() {
|
2016-11-21 08:49:37 +00:00
|
|
|
|
2017-08-04 21:39:22 +00:00
|
|
|
// check if settings are set, if not set defaults.
|
|
|
|
// Caution: DO NOT check existence using === always check with == .
|
|
|
|
// Latest blog posts style.
|
|
|
|
$understrap_posts_index_style = get_theme_mod( 'understrap_posts_index_style' );
|
|
|
|
if ( '' == $understrap_posts_index_style ) {
|
|
|
|
set_theme_mod( 'understrap_posts_index_style', 'default' );
|
|
|
|
}
|
|
|
|
|
|
|
|
// Sidebar position.
|
|
|
|
$understrap_sidebar_position = get_theme_mod( 'understrap_sidebar_position' );
|
|
|
|
if ( '' == $understrap_sidebar_position ) {
|
|
|
|
set_theme_mod( 'understrap_sidebar_position', 'right' );
|
|
|
|
}
|
2016-11-21 08:49:37 +00:00
|
|
|
|
2017-08-04 21:39:22 +00:00
|
|
|
// Container width.
|
|
|
|
$understrap_container_type = get_theme_mod( 'understrap_container_type' );
|
|
|
|
if ( '' == $understrap_container_type ) {
|
|
|
|
set_theme_mod( 'understrap_container_type', 'container' );
|
|
|
|
}
|
2016-11-21 08:49:37 +00:00
|
|
|
}
|
2017-08-04 21:39:22 +00:00
|
|
|
endif;
|