Make WordPress Core


Ignore:
Timestamp:
07/25/2012 07:42:55 PM (13 years ago)
Author:
lancewillett
Message:

Twenty Twelve: enable async body class value changes for custom background color changes in Theme Customizer. See #21226.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentytwelve/functions.php

    r21327 r21343  
    366366}
    367367add_action( 'template_redirect', 'twentytwelve_content_width' );
     368
     369/**
     370 * Bind JS handler to make Theme Customizer preview reload
     371 * custom background `body_class` value changes asynchronously.
     372 *
     373 * @since Twenty Twelve 1.0
     374 */
     375function twentytwelve_customize_preview_js() {
     376    wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20120725', true );
     377}
     378add_action( 'customize_preview_init', 'twentytwelve_customize_preview_js' );
Note: See TracChangeset for help on using the changeset viewer.