_s: Update wpcom compat file to wrap contents in a hooked callback.

This commit is contained in:
obenland 2013-11-24 18:24:11 +00:00
parent 6084274628
commit caff68529f
1 changed files with 19 additions and 10 deletions

View File

@ -2,16 +2,22 @@
/** /**
* WordPress.com-specific functions and definitions. * WordPress.com-specific functions and definitions.
* *
* This file is centrally included from `wp-content/mu-plugins/wpcom-theme-compat.php`.
*
* @package _s * @package _s
*/ */
global $themecolors;
/** /**
* Set a default theme color array for WP.com. * Adds support for wp.com-specific theme functions.
* *
* @global array $themecolors * @global array $themecolors
* @return void
*/ */
function _s_wpcom_setup() {
global $themecolors;
// Set theme colors for third party services.
if ( ! isset( $themecolors ) ) {
$themecolors = array( $themecolors = array(
'bg' => '', 'bg' => '',
'border' => '', 'border' => '',
@ -19,3 +25,6 @@ $themecolors = array(
'link' => '', 'link' => '',
'url' => '', 'url' => '',
); );
}
}
add_action( 'after_setup_theme', '_s_wpcom_setup' );