forked from mirror/_s
_s: Update wpcom compat file to wrap contents in a hooked callback.
This commit is contained in:
parent
6084274628
commit
caff68529f
|
@ -2,20 +2,29 @@
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
*/
|
*/
|
||||||
$themecolors = array(
|
function _s_wpcom_setup() {
|
||||||
|
global $themecolors;
|
||||||
|
|
||||||
|
// Set theme colors for third party services.
|
||||||
|
if ( ! isset( $themecolors ) ) {
|
||||||
|
$themecolors = array(
|
||||||
'bg' => '',
|
'bg' => '',
|
||||||
'border' => '',
|
'border' => '',
|
||||||
'text' => '',
|
'text' => '',
|
||||||
'link' => '',
|
'link' => '',
|
||||||
'url' => '',
|
'url' => '',
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'after_setup_theme', '_s_wpcom_setup' );
|
||||||
|
|
Reference in New Issue