<?php // Theme Customizer options

// Clean up the customizer by removing unwanted sections and controls
function theme_customizer_cleanup( $wp_customize ) {
    
    $wp_customize->remove_control("header_image");
    $wp_customize->remove_control("header_textcolor");
    
}
add_action( "customize_register", "theme_customizer_cleanup" );

/* -------------------- */
/* Customizer Functions */
/* -------------------- */

// Sanitize text fields
function sanitize_text( $text ) {
    return sanitize_text_field( $text );
}

// Add new lines to textarea
function textarea_newlines( $textarea ) {
    $lines = explode("\n", $textarea);
    foreach( $lines as $line ) {
        echo $line . '<br/>';
    }
}
// End

// Create new customizer sections and controls
function new_customizer_settings( $wp_customize ) {
    
    // Theme settings
    include_once('_theme-settings.php');
    
    // Site Information
    include_once('_site-information.php');
    
    // Social Media
    include_once('_social-media.php');
    

}
add_action( 'customize_register', 'new_customizer_settings' );