<?php

// Coeur Includes

require_once locate_template('/framework/options.php');
require_once locate_template('/framework/scripts.php');
require_once locate_template('/framework/general.php');
require_once locate_template('comments.php');
require_once locate_template('/framework/wp_bootstrap_navwalker.php');

// Theme Background Options

add_action( 'customize_register', 'jt_customize_register' );

function jt_customize_register( $wp_customize ) {

    /* Remove the WordPress background image control. */
    $wp_customize->remove_control( 'background_image' );

    /* Load our custom background image control. */
    require_once( trailingslashit( get_template_directory() ) . '/framework/customize-control-background-image.php' );

    /* Add our custom background image control. */
    $wp_customize->add_control( new JT_Customize_Control_Background_Image( $wp_customize ) );
}

add_filter( 'jt_default_backgrounds', 'jt_default_backgrounds' );

function jt_default_backgrounds( $backgrounds ) {

    $backgrounds['example-1'] = array(
        'url'           => '%s/framework/img/bg/shattered.png',
        'thumbnail_url' => '%s/framework/img/bg/shattered.png',
        );

    $backgrounds['example-2'] = array(
        'url'           => '%s/framework/img/bg/stardust.png',
        'thumbnail_url' => '%s/framework/img/bg/stardust.png',
        );

    $backgrounds['example-3'] = array(
        'url'           => '%s/framework/img/bg/tree_bark.png',
        'thumbnail_url' => '%s/framework/img/bg/tree_bark.png',
        );

    $backgrounds['example-4'] = array(
        'url'           => '%s/framework/img/bg/gradient_squares.png',
        'thumbnail_url' => '%s/framework/img/bg/gradient_squares.png',
        );

    $backgrounds['example-5'] = array(
        'url'           => '%s/framework/img/bg/diagonal_striped_brick.png',
        'thumbnail_url' => '%s/framework/img/bg/diagonal_striped_brick.png',
        );

    $backgrounds['example-6'] = array(
        'url'           => '%s/framework/img/bg/gradient_squares.png',
        'thumbnail_url' => '%s/framework/img/bg/gradient_squares.png',
        );

    $backgrounds['example-7'] = array(
        'url'           => '%s/framework/img/bg/arches.png',
        'thumbnail_url' => '%s/framework/img/bg/arches.png',
        );

    $backgrounds['example-8'] = array(
        'url'           => '%s/framework/img/bg/congruent_pentagon.png',
        'thumbnail_url' => '%s/framework/img/bg/congruent_pentagon.png',
        );

    $backgrounds['example-9'] = array(
        'url'           => '%s/framework/img/bg/congruent_outline.png',
        'thumbnail_url' => '%s/framework/img/bg/congruent_outline.png',
        );

    $backgrounds['example-10'] = array(
        'url'           => '%s/framework/img/bg/gplaypattern.png',
        'thumbnail_url' => '%s/framework/img/bg/gplaypattern.png',
        );

    $backgrounds['example-11'] = array(
        'url'           => '%s/framework/img/bg/vintage_speckles.png',
        'thumbnail_url' => '%s/framework/img/bg/vintage_speckles.png',
        );

    $backgrounds['example-12'] = array(
        'url'           => '%s/framework/img/bg/noisy_grid.png',
        'thumbnail_url' => '%s/framework/img/bg/noisy_grid.png',
        );

    $backgrounds['example-13'] = array(
        'url'           => '%s/framework/img/bg/shattered_turquoise.png',
        'thumbnail_url' => '%s/framework/img/bg/shattered_turquoise.png',
        );
    
    return $backgrounds;
}