wpcom.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 Dyad
  8. */
  9. /**
  10. * Enqueue WordPress.com-specific styles
  11. */
  12. function dyad_2_wpcom_styles() {
  13. wp_enqueue_style( 'dyad-2-wpcom', get_template_directory_uri() . '/inc/style-wpcom.css', '20151023' );
  14. }
  15. add_action( 'wp_enqueue_scripts', 'dyad_2_wpcom_styles' );
  16. /**
  17. * Disabling Widont filter for titles
  18. */
  19. function dyad_2_wido() {
  20. remove_filter( 'the_title', 'widont' );
  21. }
  22. add_action( 'init', 'dyad_2_wido' );
  23. /**
  24. * Adds support for wp.com-specific theme functions.
  25. *
  26. * @global array $themecolors
  27. */
  28. function dyad_2_wpcom_setup() {
  29. global $themecolors;
  30. // Set theme colors for third party services.
  31. if ( ! isset( $themecolors ) ) {
  32. $themecolors = array(
  33. 'bg' => 'ffffff',
  34. 'border' => 'c0c9d3',
  35. 'text' => '6a6c6e',
  36. 'link' => '6a6c6e',
  37. 'url' => '6a6c6e',
  38. );
  39. }
  40. // Add print styles
  41. add_theme_support( 'print-style' );
  42. }
  43. add_action( 'after_setup_theme', 'dyad_2_wpcom_setup' );