wpcom.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 Shoreditch
  8. */
  9. /**
  10. * Adds support for wp.com-specific theme functions.
  11. *
  12. * @global array $themecolors
  13. */
  14. function shoreditch_wpcom_setup() {
  15. global $themecolors;
  16. // Set theme colors for third party services.
  17. if ( ! isset( $themecolors ) ) {
  18. $themecolors = array(
  19. 'bg' => 'ffffff',
  20. 'border' => 'f3f3f3',
  21. 'text' => '73757D',
  22. 'link' => '3e69dc',
  23. 'url' => '3e69dc',
  24. );
  25. }
  26. // Add print stylesheet.
  27. add_theme_support( 'print-style' );
  28. }
  29. add_action( 'after_setup_theme', 'shoreditch_wpcom_setup' );
  30. /**
  31. * Enqueue wp.com-specific styles.
  32. */
  33. function shoreditch_wpcom_styles() {
  34. wp_enqueue_style( 'shoreditch-wpcom', get_template_directory_uri() . '/inc/style-wpcom.css', '20160405' );
  35. }
  36. add_action( 'wp_enqueue_scripts', 'shoreditch_wpcom_styles' );
  37. /**
  38. * Remove the widont filter.
  39. */
  40. function shoreditch_wido() {
  41. remove_filter( 'the_title', 'widont' );
  42. }
  43. add_action( 'init', 'shoreditch_wido' );