wpcom.php 696 B

1234567891011121314151617
  1. <?php declare( strict_types = 1 ); ?>
  2. <?php
  3. /**
  4. * WordPress.com-specific functions and definitions.
  5. *
  6. * This file is centrally included from `wp-content/mu-plugins/wpcom-theme-compat.php`.
  7. *
  8. * @package Stow
  9. */
  10. require_once get_template_directory() . '/inc/wpcom-colors-css-variables.php';
  11. /**
  12. * Bind JS handlers to instantly live-preview changes.
  13. */
  14. function stow_wpcom_color_annotations_preview_js() {
  15. wp_enqueue_script( 'stow_wpcom_color_annotations_preview', get_template_directory_uri() . '/inc/color-annotations-preview.js', array( 'customize-preview' ), wp_get_theme()->get( 'Version' ), true );
  16. }
  17. add_action( 'customize_preview_init', 'stow_wpcom_color_annotations_preview_js' );