This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
understrap/inc/wpcom.php

52 lines
1.1 KiB
PHP
Raw Permalink Normal View History

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
*/
2018-09-10 21:59:04 +00:00
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
2017-02-07 14:30:44 +00:00
/**
* Adds support for wp.com-specific theme functions.
*
* @global array $themecolors
*/
add_action( 'after_setup_theme', 'understrap_wpcom_setup' );
2018-11-18 23:24:26 +00:00
if ( ! function_exists( 'understrap_wpcom_setup' ) ) {
function understrap_wpcom_setup() {
global $themecolors;
2014-12-10 11:36:38 +00:00
// Set theme colors for third party services.
if ( ! isset( $themecolors ) ) {
$themecolors = array(
'bg' => '',
'border' => '',
'text' => '',
'link' => '',
'url' => '',
);
}
/* Add WP.com print styles */
add_theme_support( 'print-styles' );
2014-12-10 11:36:38 +00:00
}
}
2017-02-07 14:30:44 +00:00
/*
* WordPress.com-specific styles
*/
add_action( 'wp_enqueue_scripts', 'understrap_wpcom_styles' );
2018-11-18 23:24:26 +00:00
if ( ! function_exists( 'understrap_wpcom_styles' ) ) {
function understrap_wpcom_styles() {
wp_enqueue_style( 'understrap-wpcom', get_template_directory_uri() . '/inc/style-wpcom.css', array(), '20160411' );
}
}