wpcom.php 897 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * WordPress.com-specific functions and definitions.
  4. *
  5. * This file is centrally included from `wp-content/mu-plugins/wpcom-theme-compat.php`.
  6. *
  7. * @package Libretto
  8. */
  9. /**
  10. * Adds support for wp.com-specific theme functions.
  11. *
  12. * @global array $themecolors
  13. */
  14. function libretto_wpcom_setup() {
  15. global $themecolors;
  16. // Set theme colors for third party services.
  17. if ( ! isset( $themecolors ) ) :
  18. $themecolors = array(
  19. 'bg' => 'eae9e6',
  20. 'text' => '363431',
  21. 'link' => '932817',
  22. 'border' => 'd9d6d0',
  23. 'url' => '787065',
  24. );
  25. endif;
  26. add_theme_support( 'print-style' );
  27. }
  28. add_action( 'after_setup_theme', 'libretto_wpcom_setup' );
  29. // Load WordPress.com-specific styles
  30. function libretto_wpcom_styles() {
  31. wp_enqueue_style( 'libretto-wpcom', get_template_directory_uri() . '/inc/style-wpcom.css', '20150709' );
  32. }
  33. add_action( 'wp_head', 'libretto_wpcom_styles', 99 );