2014-12-10 11:36:38 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2017-02-07 14:30:44 +00:00
|
|
|
* WordPress.com-specific functions and definitions
|
2014-12-10 11:36:38 +00:00
|
|
|
*
|
|
|
|
* This file is centrally included from `wp-content/mu-plugins/wpcom-theme-compat.php`.
|
|
|
|
*
|
2015-09-15 14:53:38 +00:00
|
|
|
* @package understrap
|
2014-12-10 11:36:38 +00:00
|
|
|
*/
|
|
|
|
|
2019-06-20 08:57:12 +00:00
|
|
|
// Exit if accessed directly.
|
|
|
|
defined( 'ABSPATH' ) || exit;
|
2018-09-10 21:59:04 +00:00
|
|
|
|
2018-03-30 15:51:43 +00:00
|
|
|
add_action( 'after_setup_theme', 'understrap_wpcom_setup' );
|
|
|
|
|
2018-11-18 23:24:26 +00:00
|
|
|
if ( ! function_exists( 'understrap_wpcom_setup' ) ) {
|
2020-04-19 10:08:39 +00:00
|
|
|
/**
|
|
|
|
* Adds support for wp.com-specific theme functions.
|
|
|
|
*
|
|
|
|
* @global array $themecolors
|
|
|
|
*/
|
2018-03-30 15:51:43 +00:00
|
|
|
function understrap_wpcom_setup() {
|
|
|
|
global $themecolors;
|
2014-12-10 11:36:38 +00:00
|
|
|
|
2018-03-30 15:51:43 +00:00
|
|
|
// Set theme colors for third party services.
|
|
|
|
if ( ! isset( $themecolors ) ) {
|
|
|
|
$themecolors = array(
|
|
|
|
'bg' => '',
|
|
|
|
'border' => '',
|
|
|
|
'text' => '',
|
|
|
|
'link' => '',
|
|
|
|
'url' => '',
|
|
|
|
);
|
|
|
|
}
|
2018-09-23 04:52:11 +00:00
|
|
|
|
2018-03-30 15:51:43 +00:00
|
|
|
/* Add WP.com print styles */
|
|
|
|
add_theme_support( 'print-styles' );
|
2014-12-10 11:36:38 +00:00
|
|
|
}
|
|
|
|
}
|
2018-03-30 15:51:43 +00:00
|
|
|
|
2017-02-07 14:30:44 +00:00
|
|
|
add_action( 'wp_enqueue_scripts', 'understrap_wpcom_styles' );
|
2018-03-30 15:51:43 +00:00
|
|
|
|
2018-11-18 23:24:26 +00:00
|
|
|
if ( ! function_exists( 'understrap_wpcom_styles' ) ) {
|
2020-04-19 10:08:39 +00:00
|
|
|
/**
|
|
|
|
* WordPress.com-specific styles
|
|
|
|
*/
|
2018-03-30 15:51:43 +00:00
|
|
|
function understrap_wpcom_styles() {
|
2018-09-23 04:52:11 +00:00
|
|
|
wp_enqueue_style( 'understrap-wpcom', get_template_directory_uri() . '/inc/style-wpcom.css', array(), '20160411' );
|
2018-03-30 15:51:43 +00:00
|
|
|
}
|
2018-09-23 04:52:11 +00:00
|
|
|
}
|