Add pluggable function wrappers to inc/wpcom.php
This commit is contained in:
parent
140da01e60
commit
3083096ef7
|
@ -12,29 +12,36 @@
|
||||||
*
|
*
|
||||||
* @global array $themecolors
|
* @global array $themecolors
|
||||||
*/
|
*/
|
||||||
function understrap_wpcom_setup() {
|
|
||||||
global $themecolors;
|
|
||||||
|
|
||||||
// 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' );
|
|
||||||
}
|
|
||||||
add_action( 'after_setup_theme', 'understrap_wpcom_setup' );
|
add_action( 'after_setup_theme', 'understrap_wpcom_setup' );
|
||||||
|
|
||||||
|
if ( ! function_exists ( 'understrap_wpcom_setup' ) ) {
|
||||||
|
function understrap_wpcom_setup() {
|
||||||
|
global $themecolors;
|
||||||
|
|
||||||
|
// 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' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* WordPress.com-specific styles
|
* WordPress.com-specific styles
|
||||||
*/
|
*/
|
||||||
function understrap_wpcom_styles() {
|
|
||||||
wp_enqueue_style( 'understrap-wpcom', get_template_directory_uri() . '/inc/style-wpcom.css', '20160411' );
|
|
||||||
}
|
|
||||||
add_action( 'wp_enqueue_scripts', 'understrap_wpcom_styles' );
|
add_action( 'wp_enqueue_scripts', 'understrap_wpcom_styles' );
|
||||||
|
|
||||||
|
if ( ! function_exists ( 'understrap_wpcom_styles' ) ) {
|
||||||
|
function understrap_wpcom_styles() {
|
||||||
|
wp_enqueue_style( 'understrap-wpcom', get_template_directory_uri() . '/inc/style-wpcom.css', '20160411' );
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue