font_registry = new Kirki_Fonts_Font_Registry(); $kirki->scripts = new Kirki_Scripts_Registry(); $kirki->api = new Kirki(); $kirki->styles = array( 'back' => new Kirki_Styles_Customizer(), 'front' => new Kirki_Styles_Frontend(), ); return $kirki; } global $kirki; $kirki = Kirki(); } if ( defined( 'KIRKI_REDUX_COMPATIBILITY' ) && KIRKI_REDUX_COMPATIBILITY ) { include_once( KIRKI_PATH.'/includes/redux-compatibility.php' ); } if ( ! function_exists( 'kirki_load_textdomain' ) ) { /** * Load plugin textdomain. * * @since 0.8.0 */ function kirki_load_textdomain() { $textdomain = 'kirki'; // Look for WP_LANG_DIR/{$domain}-{$locale}.mo if ( file_exists( WP_LANG_DIR.'/'.$textdomain.'-'.get_locale().'.mo' ) ) { $file = WP_LANG_DIR.'/'.$textdomain.'-'.get_locale().'.mo'; } // Look for KIRKI_PATH/languages/{$domain}-{$locale}.mo if ( ! isset( $file ) && file_exists( KIRKI_PATH.'/languages/'.$textdomain.'-'.get_locale().'.mo' ) ) { $file = KIRKI_PATH.'/languages/'.$textdomain.'-'.get_locale().'.mo'; } if ( isset( $file ) ) { load_textdomain( $textdomain, $file ); } load_plugin_textdomain( $textdomain, false, KIRKI_PATH.'/languages' ); } add_action( 'plugins_loaded', 'kirki_load_textdomain' ); } // Add an empty config for global fields Kirki::add_config( '' ); /** * The 2 following commented-out lines are for testing purposes. * You can uncomment whichever you want and fields will flood the customizer. */ // include_once( KIRKI_PATH . '/sample-config.php' ); // include_once( KIRKI_PATH . '/tests/kirki-user-tests.php' );