code format and customizer grid post small fix
This commit is contained in:
parent
0fab781b1c
commit
1d01962d1b
|
@ -29,7 +29,7 @@ if ( ! function_exists( 'understrap_theme_customize_register' ) ) {
|
||||||
/**
|
/**
|
||||||
* Register individual settings through customizer's API.
|
* Register individual settings through customizer's API.
|
||||||
*
|
*
|
||||||
* @param object $wp_customize Customizer reference.
|
* @param WP_Customize_Manager $wp_customize Customizer reference.
|
||||||
*/
|
*/
|
||||||
function understrap_theme_customize_register( $wp_customize ) {
|
function understrap_theme_customize_register( $wp_customize ) {
|
||||||
|
|
||||||
|
@ -172,7 +172,6 @@ if ( ! function_exists( 'understrap_theme_customize_register' ) ) {
|
||||||
return 'grid' == get_theme_mod( 'understrap_posts_index_style' );
|
return 'grid' == get_theme_mod( 'understrap_posts_index_style' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( is_grid_enabled() ) {
|
|
||||||
// How many columns to use each grid post.
|
// How many columns to use each grid post.
|
||||||
$wp_customize->add_setting( 'understrap_grid_post_columns', array(
|
$wp_customize->add_setting( 'understrap_grid_post_columns', array(
|
||||||
'default' => '6',
|
'default' => '6',
|
||||||
|
@ -203,9 +202,9 @@ if ( ! function_exists( 'understrap_theme_customize_register' ) ) {
|
||||||
)
|
)
|
||||||
) );
|
) );
|
||||||
|
|
||||||
}
|
|
||||||
// hook to auto-hide/show depending the understrap_posts_index_style option.
|
// hook to auto-hide/show depending the understrap_posts_index_style option.
|
||||||
$wp_customize->get_control( 'understrap_grid_post_columns' )->active_callback = 'is_grid_enabled';
|
$wp_customize->get_control( 'understrap_grid_post_columns' )->active_callback = 'is_grid_enabled';
|
||||||
|
|
||||||
}
|
}
|
||||||
} // endif function_exists( 'understrap_theme_customize_register' ).
|
} // endif function_exists( 'understrap_theme_customize_register' ).
|
||||||
add_action( 'customize_register', 'understrap_theme_customize_register' );
|
add_action( 'customize_register', 'understrap_theme_customize_register' );
|
||||||
|
|
Reference in New Issue