get('Name')); define( 'WHISTLE_THEME_VERSION', $themeData->get('Version')); endif; /* --------------------------------------------------------------------------- * Loads Kirki * ---------------------------------------------------------------------------*/ require_once( WHISTLE_THEME_DIR .'/kirki/index.php' ); /* --------------------------------------------------------------------------- * Loads Codestar * ---------------------------------------------------------------------------*/ if( !defined( 'CS_OPTION' ) ) { define( 'CS_OPTION', '_whistle_cs_options' ); } require_once WHISTLE_THEME_DIR .'/cs-framework/cs-framework.php'; if( !defined( 'CS_ACTIVE_TAXONOMY' ) ) { define( 'CS_ACTIVE_TAXONOMY', false ); } if( !defined( 'CS_ACTIVE_SHORTCODE' ) ) { define( 'CS_ACTIVE_SHORTCODE', false ); } if( !defined( 'CS_ACTIVE_CUSTOMIZE' ) ) { define( 'CS_ACTIVE_CUSTOMIZE', false ); } /* --------------------------------------------------------------------------- * Create function to get theme options * --------------------------------------------------------------------------- */ function whistle_cs_get_option($key, $value = '') { $v = cs_get_option( $key ); if ( !empty( $v ) ) { return $v; } else { return $value; } } /* --------------------------------------------------------------------------- * Loads Theme Textdomain * ---------------------------------------------------------------------------*/ define( 'WHISTLE_LANG_DIR', WHISTLE_THEME_DIR. '/languages' ); load_theme_textdomain( 'whistle', WHISTLE_LANG_DIR ); /* --------------------------------------------------------------------------- * Loads the Admin Panel Style * ---------------------------------------------------------------------------*/ function whistle_admin_scripts() { wp_enqueue_style('whistle-admin', WHISTLE_THEME_URI .'/cs-framework-override/style.css'); } add_action( 'admin_enqueue_scripts', 'whistle_admin_scripts' ); /* --------------------------------------------------------------------------- * Loads Theme Functions * ---------------------------------------------------------------------------*/ // Functions -------------------------------------------------------------------- require_once( WHISTLE_THEME_DIR .'/framework/register-functions.php' ); // Header ----------------------------------------------------------------------- require_once( WHISTLE_THEME_DIR .'/framework/register-head.php' ); // Hooks ------------------------------------------------------------------------ require_once( WHISTLE_THEME_DIR .'/framework/register-hooks.php' ); // Post Functions --------------------------------------------------------------- require_once( WHISTLE_THEME_DIR .'/framework/register-post-functions.php' ); new whistle_post_functions; // Widgets ---------------------------------------------------------------------- add_action( 'widgets_init', 'whistle_widgets_init' ); function whistle_widgets_init() { require_once( WHISTLE_THEME_DIR .'/framework/register-widgets.php' ); } // Plugins ---------------------------------------------------------------------- require_once( WHISTLE_THEME_DIR .'/framework/register-plugins.php' ); // WooCommerce ------------------------------------------------------------------ if( function_exists( 'is_woocommerce' ) && ! class_exists ( 'DTWooPlugin' ) ){ require_once( WHISTLE_THEME_DIR .'/framework/register-woocommerce.php' ); } // WP Store Locator ------------------------------------------------------------- if( class_exists( 'WP_Store_locator' ) ){ require_once( WHISTLE_THEME_DIR .'/framework/register-storelocator.php' ); } // Register Gutenberg ----------------------------------------------------------- require_once( WHISTLE_THEME_DIR .'/framework/register-gutenberg-editor.php' );