urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); } return esc_url_raw( $fonts_url ); } endif; /** * This function will enqueue all the styles the theme uses. */ function air_loadStyles() { //Load the needed fonts from Google wp_enqueue_style( 'air-google-font', air_fonts_url(), array(), null ); //Load the latest compiled and minified version of Twitter Bootstrap's stylesheet wp_enqueue_style('air-bootstrap', getAssetsPath('bootstrap/css/bootstrap.min.css')); //Load Font CSS wp_enqueue_style('air-font-awesome', getAssetsPath('custom/css/font-awesome.min.css')); wp_enqueue_style('air-main', get_stylesheet_uri()); //If the page is not 404 load those styles if(!is_404()) { //Important Owl stylesheet wp_enqueue_style('air-owl-carousel', getAssetsPath('owl-carousel/owl.carousel.css')); //Default Theme wp_enqueue_style('air-owl-theme', getAssetsPath('owl-carousel/owl.theme.css')); //For Slide Menu wp_enqueue_style('air-slide-menu', getAssetsPath('slide-menu/css/menu_elastic.css')); //For Portfolio Hover Effect wp_enqueue_style('air-hovereffect', getAssetsPath('HoverEffect/css/hovereffect.css')); wp_enqueue_style('air-grid-gallery', getAssetsPath('grid-gallery/css/component.css')); } } /** * This function will enqueue all the scripts the theme uses. */ function air_loadScripts() { //Load html5shim wp_enqueue_script('air-html5shim', getAssetsPath('require/html5.js')); wp_script_add_data('air-html5shim', 'conditional', 'lt IE 9'); //Load respond.js wp_enqueue_script('air-respond', getAssetsPath('require/respond.min.js') ); wp_script_add_data('air-respond', 'conditional', 'lt IE 9'); if(is_singular() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } //If the page is not 404 load those scripts if(!is_404()) { //Load Bootstrap's js wp_enqueue_script('air-bootstrap', getAssetsPath('bootstrap/js/bootstrap.min.js'), array('jquery')); //Load owl-carousel js wp_enqueue_script('air-owl-carousel', getAssetsPath('owl-carousel/owl.carousel.js'), array('jquery')); //For Page Scrolling js wp_enqueue_script('air-jquery-easing', getAssetsPath('custom/js/jquery.easing.min.js'), array('jquery')); //Scroll BAR js wp_enqueue_script('air-scrollbar', getAssetsPath('scroll/jquery.scrollbar.js'), array('jquery')); //Waypoints wp_enqueue_script('air-waypoints', getAssetsPath('custom/js/waypoints.min.js'), array('jquery')); //Scripts loaded in footer (after page load) //Slide-menu wp_enqueue_script('air-snap-svg', getAssetsPath('slide-menu/js/snap.svg-min.js'), array('jquery'), NULL, true); wp_enqueue_script('air-classie', getAssetsPath('slide-menu/js/classie.js'), array('jquery'), NULL, true); wp_enqueue_script('air-codrops_main', getAssetsPath('slide-menu/js/codrops_main.js'), array('jquery'), NULL, true); //Google Maps API wp_enqueue_script('air-google-maps-api', 'https://maps.googleapis.com/maps/api/js?v=3.exp', array('jquery'), NULL, true); //Custom wp_enqueue_script('air-custom', getAssetsPath('custom/js/custom.js'), array('jquery'), NULL, true); //Load those only if loading the homepage if (is_front_page() || (isset($options['one_page_switch']) && $options['one_page_switch'])) { //For Portfolio wp_enqueue_script('air-isotope', getAssetsPath('custom/js/isotope.pkgd.js'), array('jquery')); //For Portfolio Hover Effect wp_enqueue_script('air-modernizr', getAssetsPath('grid-gallery/js/modernizr.custom.js', array('jquery'))); //for Grid Gallery // wp_enqueue_script('air-imagesloaded', getAssetsPath('grid-gallery/js/imagesloaded.pkgd.min.js'), array('jquery'), NULL, true); // wp_enqueue_script('air-cbpGridGallery', getAssetsPath('grid-gallery/js/cbpGridGallery.js'), array('jquery'), NULL, true); //CountTo wp_enqueue_script('air-counto', getAssetsPath('countTo/jquery.countTo.js'), array('jquery'), NULL, true); } } } //Let's bind those functions... add_action('wp_enqueue_scripts', 'air_loadScripts'); add_action('wp_enqueue_scripts', 'air_loadStyles'); function air_setup() { // Translation load_theme_textdomain('air', get_template_directory() . '/languages'); //Navigation Menus add_theme_support('menus'); //Add featured image support add_theme_support('post-thumbnails', array('page', 'portfolio')); //This feature enables plugins and themes to manage the document title tag. add_theme_support('title-tag'); //Custom header is an image that is chosen as the representative image in the theme top header section. //add_theme_support('custom-header'); //Custom Backgrounds is a theme feature that provides for customization of the background color and image. //add_theme_support('custom-background'); //This feature adds RSS feed links to HTML . add_theme_support( 'automatic-feed-links' ); //Allow pages, posts and portfolios to have excerpts. add_post_type_support('portfolio', 'excerpt'); //Register custom image sizes add_image_size('pages', 673, 470, true); add_image_size('team', 203, 272); //add_image_size('portfolio', 337, 298, true); add_image_size('portfolio', 285,252, true); add_image_size('portfolio_big', 350, 233); add_image_size('testimonials', 150, 150, true); add_image_size('testimonials_side', 952, 636, true); add_image_size('contacts', 952, 921, true); add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 1140, 400, true ); } add_action('after_setup_theme', 'air_setup'); // Includes require_once dirname(__FILE__).'/classes/Navthemes_Nav_Menu.php'; //require_once dirname(__FILE__).'/admin/ReduxFramework/ReduxCore/inc/loader.php'; //require_once dirname(__FILE__).'/admin/menu-config.php'; //Let's require the theme's functions file... require_once dirname(__FILE__).'/navthemes_functions.php'; /** * Include the TGM_Plugin_Activation class. */ require_once dirname(__FILE__).'/inc/class-tgm-plugin-activation.php'; add_action('tgmpa_register', 'register_required_plugins'); //Let's require the theme's functions file... require_once dirname(__FILE__).'/theme-options.php';