add_section(
'kihon_footer_info',
array(
'title' => __( 'Footer Info', 'kihon' ),
'description' => __( 'Change the footer info (copyright text).', 'kihon' ),
// 'panel' => ''
)
);
// Custom settings and controls
$wp_customize->add_setting(
'kihon_site_footer_info',
array(
'default' => 'Copyright 2015 kihon',
'sanitize_callback' => 'kihon_sanitize_text',
)
);
$wp_customize->add_control(
'kihon_site_footer_info',
array(
'label' => __( 'Site Footer Info.', 'kihon' ),
'description' => __( 'Usually the copyirght text.', 'kihon' ),
'section' => 'kihon_footer_info',
'type' => 'textarea',
)
);
}
endif;
add_action( 'kihon_register_customizer_settings', 'kihon_customize_register_footer' );
if ( ! function_exists( 'kihon_footer_info_content_setting' ) ) :
/**
* Prints footer info set by user.
*
* @since 1.0.0
*/
function kihon_footer_info_content_setting( $footer_info ) {
$footer_info = get_theme_mod( 'kihon_site_footer_info', 'Copyright 2015 kihon' );
return $footer_info;
}
add_filter( 'kihon_footer_info_content', 'kihon_footer_info_content_setting');
endif;