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,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' );
|
||||||
|
|
Reference in New Issue