wpcom.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 Independent_Publisher_2
  8. */
  9. /**
  10. * Adds support for wp.com-specific theme functions.
  11. *
  12. * @global array $themecolors
  13. */
  14. function independent_publisher_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. 'border' => 'dddddd',
  21. 'text' => '000000',
  22. 'link' => '0087be',
  23. 'url' => '0087be',
  24. );
  25. }
  26. // Add print stylesheet.
  27. add_theme_support( 'print-style' );
  28. }
  29. add_action( 'after_setup_theme', 'independent_publisher_2_wpcom_setup' );
  30. /**
  31. * WordPress.com specific styles
  32. */
  33. function independent_publisher_2_wpcom_styles() {
  34. wp_enqueue_script( 'independent-publisher-2-wpcom-functions', get_template_directory_uri() . '/inc/script-wpcom.js', array(), '20210111', true );
  35. wp_enqueue_style( 'independent-publisher-2-wpcom-style', get_template_directory_uri() . '/inc/style-wpcom.css', '20150827' );
  36. }
  37. add_action( 'wp_enqueue_scripts', 'independent_publisher_2_wpcom_styles' );