define('EVENTERRA_TEMPLATE_DIR', get_template_directory()); // without the trailing slash define('EVENTERRA_TEMPLATE_DIR_URI', get_template_directory_uri()); // without trailing slash define('EVENTERRA_THEME_VERSION', '1.2.4'); /************************************************************************************* * WordPress minimum required version check *************************************************************************************/ if(version_compare($wp_version, '4.4', '<')) { function eventerra_wordpress_version_error() { echo '

'.esc_html__('The theme requires WordPress 4.4 or greater. Please, update to proceed.', 'eventerra').'

'; } add_action( 'admin_notices', 'eventerra_wordpress_version_error' ); return; } /************************************************************************************* * Load Olevmedia Framework *************************************************************************************/ require_once (EVENTERRA_TEMPLATE_DIR . '/om-framework/om-framework.php'); omfw_Framework::init(); omfw_Framework::$theme_version=EVENTERRA_THEME_VERSION; omfw_Framework::$primary_style_handler='eventerra-style'; /************************************************************************************* * Translation Text Domain *************************************************************************************/ load_theme_textdomain('eventerra', EVENTERRA_TEMPLATE_DIR . '/languages'); /************************************************************************************* * Register Menu *************************************************************************************/ if( !function_exists( 'eventerra_register_menu' ) ) { function eventerra_register_menu() { register_nav_menu('primary-menu', esc_html__('Primary Menu', 'eventerra')); register_nav_menu('secondary-menu', esc_html__('Secondary Menu', 'eventerra')); register_nav_menu('menu-404', esc_html__('Menu for 404 Error page', 'eventerra')); } add_action('init', 'eventerra_register_menu'); } if( !function_exists( 'eventerra_primary_menu_fallback' ) ) { function eventerra_primary_menu_fallback($args) { $menu_safe=wp_page_menu(array( 'echo' => false, )); $args['menu_class'].=' primary-menu-fallback'; $menu_safe=str_replace('','',$menu_safe); if(isset($args['echo']) && $args['echo'] == false) { return $menu_safe; } else { echo $menu_safe; } } } if( !function_exists( 'eventerra_primary_mobile_menu_fallback' ) ) { function eventerra_primary_mobile_menu_fallback($args) { $menu_safe=wp_page_menu(array( 'echo' => false, )); $args['menu_class'].=' primary-menu-fallback'; $menu_safe=str_replace('