/** * Creates a new instance. Called on 'after_setup_theme'. * May be used to access class methods from outside. * * @see __construct() * @static * @return \wp_less */ public static function init() { global $cc2_color_schemes; null === self::$instance and self::$instance = new self(); $cc2_color_schemes = self::$instance; return self::$instance; }
function cc2_init_scheme_helper() { global $cc2_color_schemes; //$cc2_color_schemes = $GLOBALS['cc2_color_schemes']; if (empty($cc2_color_schemes) || !is_object($cc2_color_schemes)) { //new __debug( array( 'cc2_color_schemes' => $cc2_color_schemes ), 'init_scheme_helper starts' ); //new __debug( defined( 'CC2_COLOR_SCHEMES_CLASS' ) ? 'color_scheme_class is defined' : 'something went HAGGARDLY wrong!' , 'init_scheme_helper starts' ); do_action('cc2_init_color_schemes'); // should be unset-table / replaceable via plugin / filter hooks if (class_exists('cc2_ColorSchemes')) { $cc2_color_schemes = cc2_ColorSchemes::init(); } } //new __debug( $cc2_color_schemes, 'init_scheme_helper ends' ); return $cc2_color_schemes; }