Update theme-settings.php
If someone tries to override in child temp
This commit is contained in:
parent
9baf0b29fb
commit
c5a142b762
|
@ -5,25 +5,28 @@
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function setup_theme_default_settings() {
|
|
||||||
|
|
||||||
// check if settings are set, if not set defaults.
|
if ( ! function_exists( 'setup_theme_default_settings' ) ) :
|
||||||
// Caution: DO NOT check existence using === always check with == .
|
function setup_theme_default_settings() {
|
||||||
// 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.
|
// check if settings are set, if not set defaults.
|
||||||
$understrap_sidebar_position = get_theme_mod( 'understrap_sidebar_position' );
|
// Caution: DO NOT check existence using === always check with == .
|
||||||
if ( '' == $understrap_sidebar_position ) {
|
// Latest blog posts style.
|
||||||
set_theme_mod( 'understrap_sidebar_position', 'right' );
|
$understrap_posts_index_style = get_theme_mod( 'understrap_posts_index_style' );
|
||||||
}
|
if ( '' == $understrap_posts_index_style ) {
|
||||||
|
set_theme_mod( 'understrap_posts_index_style', 'default' );
|
||||||
|
}
|
||||||
|
|
||||||
// Container width.
|
// Sidebar position.
|
||||||
$understrap_container_type = get_theme_mod( 'understrap_container_type' );
|
$understrap_sidebar_position = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
if ( '' == $understrap_container_type ) {
|
if ( '' == $understrap_sidebar_position ) {
|
||||||
set_theme_mod( 'understrap_container_type', 'container' );
|
set_theme_mod( 'understrap_sidebar_position', 'right' );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Container width.
|
||||||
|
$understrap_container_type = get_theme_mod( 'understrap_container_type' );
|
||||||
|
if ( '' == $understrap_container_type ) {
|
||||||
|
set_theme_mod( 'understrap_container_type', 'container' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
endif;
|
||||||
|
|
Reference in New Issue