code format and customizer grid post small fix

This commit is contained in:
Stef Kariotidis 2016-11-21 19:47:45 +02:00
parent 0fab781b1c
commit 1d01962d1b
1 changed files with 31 additions and 32 deletions

View File

@ -29,7 +29,7 @@ if ( ! function_exists( 'understrap_theme_customize_register' ) ) {
/**
* 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 ) {
@ -172,7 +172,6 @@ if ( ! function_exists( 'understrap_theme_customize_register' ) ) {
return 'grid' == get_theme_mod( 'understrap_posts_index_style' );
}
if ( is_grid_enabled() ) {
// How many columns to use each grid post.
$wp_customize->add_setting( 'understrap_grid_post_columns', array(
'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.
$wp_customize->get_control( 'understrap_grid_post_columns' )->active_callback = 'is_grid_enabled';
}
} // endif function_exists( 'understrap_theme_customize_register' ).
add_action( 'customize_register', 'understrap_theme_customize_register' );