<?php
/**
 * Attorneypress Theme Customizer
 *
 * @package attorneypress
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function attorneypress_customize_register( $wp_customize ) {
	$wp_customize->remove_section( 'colors' );
	$wp_customize->remove_section( 'header_image' );
	$wp_customize->remove_section( 'background_image' );
	$wp_customize->remove_section( 'custom_css' );
}

add_action( 'customize_register', 'attorneypress_customize_register' );

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function attorneypress_customize_preview_js() {
	wp_enqueue_script( 'attorneypress_customizer', get_parent_theme_file_uri( '/js/customizer.js' ), array( 'customize-preview' ), '20151215', true );
}

add_action( 'customize_preview_init', 'attorneypress_customize_preview_js' );
