0 ) { foreach ( $file_paths as $file_path ) { $files = wp_normalize_path( "{$file_path}.php" ); if ( file_exists( $files ) ) { require_once $files; } } } if ( ! function_exists( 'business_class_kirki_config' ) ) { /** * Initial configs for kirki framework. * * @param array $configs Kirki configurations. */ function business_class_kirki_configs( $configs ) { /** * Disable customizer preview loader logo. */ $configs['disable_loader'] = true; return $configs; } add_filter( 'kirki_config', 'business_class_kirki_configs' ); } /** * Remove admin notices. */ add_filter( 'kirki_telemetry', '__return_false' ); /** * Bail early if "business_class_recursively_get_files_path" function is not created in themes customizer-helpers.php file */ if ( ! function_exists( 'business_class_recursively_get_files_path' ) ) { wp_die( 'Warning: Function business_class_recursively_get_files_path not found for customizer-loader.php.
Please include that function in customizer-helpers.php to work.', 'Function not found' ); } /** * Auto load section files. */ $section_files = wp_normalize_path( "{$customizer_root}/sections" ); $section_files = business_class_recursively_get_files_path( $section_files ); if ( is_array( $section_files ) && count( $section_files ) ) { foreach ( $section_files as $section_file_path ) { if ( file_exists( $section_file_path ) ) { require_once $section_file_path; } } } if ( ! function_exists( 'business_class_init_customizer_fields' ) ) { /** * Hook customizer fields to init hook. * It is necessary as some functionality, eg: Custom Taxonomies, need it. */ function business_class_init_customizer_fields() { $customizer_root = get_template_directory() . '/inc/customizer'; $field_files = wp_normalize_path( "{$customizer_root}/fields" ); $field_files = business_class_recursively_get_files_path( $field_files ); /** * Auto load field files. */ if ( is_array( $field_files ) && count( $field_files ) ) { foreach ( $field_files as $field_file_path ) { if ( file_exists( $field_file_path ) ) { require_once $field_file_path; } } } } add_action( 'init', 'business_class_init_customizer_fields' ); }