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 Apostrophe 2
  8. */
  9. /**
  10. * Adds support for wp.com-specific theme functions.
  11. *
  12. * @global array $themecolors
  13. */
  14. function apostrophe_2_wpcom_setup() {
  15. global $themecolors;
  16. // Set theme colors for third party services.
  17. if ( ! isset( $themecolors ) ) :
  18. $themecolors = array(
  19. 'bg' => 'ffffff',
  20. 'text' => '3a3a3a',
  21. 'link' => '117bb8',
  22. 'border' => 'a0a0a0',
  23. 'url' => '117bb8',
  24. );
  25. endif;
  26. // Use standard print stylesheet.
  27. add_theme_support( 'print-style' );
  28. }
  29. add_action( 'after_setup_theme', 'apostrophe_2_wpcom_setup' );
  30. /**
  31. * Enqueue WordPress.com-specific styles
  32. */
  33. function apostrophe_2_wpcom_styles() {
  34. wp_enqueue_style( 'apostrophe-2-wpcom', get_template_directory_uri() . '/inc/style-wpcom.css', '20170523' );
  35. }
  36. add_action( 'wp_enqueue_scripts', 'apostrophe_2_wpcom_styles' );
  37. /**
  38. * Disabling Widont filter for titles
  39. */
  40. function apostrophe_2_wido() {
  41. remove_filter( 'the_title', 'widont' );
  42. }
  43. add_action( 'init', 'apostrophe_2_wido' );