init(); /*-----------------------------------------------------------------------------------*/ /* ReduxFramework Admin Panel /*-----------------------------------------------------------------------------------*/ if ( !class_exists( 'ReduxFramework' ) ) { require_once( get_template_directory() . '/inc/admin-core/framework.php' ); } if ( !isset( $redux_demo ) ) { require_once( get_template_directory() . '/inc/admin-core/admin-config.php' ); } //include template functions: require_once( get_template_directory() . '/inc/template.php' ); /* ==================================== Include Scripts ===================================== */ /** * aakanksha functions and definitions * * @package aakanksha */ if ( ! function_exists( 'aakanksha_setup' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. */ function aakanksha_setup() { /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on aakanksha, use a find and replace * to change 'aakanksha' to the name of your theme in all the template files */ load_theme_textdomain( 'aakanksha', get_template_directory() . '/languages' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); // Content width global $content_width; if ( ! isset( $content_width ) ) { $content_width = 1170; /* pixels */ } /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded
' . '
'; $fields['url'] = ''. '
'; return $fields; } public function load_text_domain(){ load_theme_textdomain('aakanksha', get_template_directory() . '/languages'); } /*-----------------------------------------------------------------------------------*/ /* Register New Post Types & Taxonomies /*-----------------------------------------------------------------------------------*/ public function theme_init() { /*-----------------------------------------------------------------------------------*/ /* Register Menus /*-----------------------------------------------------------------------------------*/ register_nav_menus( array( 'main_nav'=>__('Main Nav', 'aakanksha'), ) ); register_nav_menus( array( 'footer_nav'=>__('Footer Nav', 'aakanksha'), ) ); $s_labels = array( 'name' => _x( 'Sliders', 'post type general name', 'aakanksha' ), 'singular_name' => _x( 'Slider', 'post type singular name', 'aakanksha' ), 'menu_name' => _x( 'Sliders', 'admin menu', 'aakanksha' ), 'name_admin_bar' => _x( 'Slider', 'add new on admin bar', 'aakanksha' ), 'add_new' => _x( 'Add New', 'Slider', 'aakanksha' ), 'add_new_item' => __( 'Add New Slider', 'aakanksha' ), 'new_item' => __( 'New Slider', 'aakanksha' ), 'edit_item' => __( 'Edit Slider', 'aakanksha' ), 'view_item' => __( 'View Slider', 'aakanksha' ), 'all_items' => __( 'All Sliders', 'aakanksha' ), 'search_items' => __( 'Search Sliders', 'aakanksha' ), 'parent_item_colon' => __( 'Parent Sliders:', 'aakanksha' ), 'not_found' => __( 'No Sliders found.', 'aakanksha' ), 'not_found_in_trash' => __( 'No Portfolios found in Trash.', 'aakanksha' ), ); $s_args = array( 'labels' => $s_labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'slider' ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ) ); /*register_post_type( 'slider', $s_args );*/ $p_labels = array( 'name' => _x( 'Portfolios', 'post type general name', 'aakanksha' ), 'singular_name' => _x( 'Portfolio', 'post type singular name', 'aakanksha' ), 'menu_name' => _x( 'Portfolios', 'admin menu', 'aakanksha' ), 'name_admin_bar' => _x( 'Portfolio', 'add new on admin bar', 'aakanksha' ), 'add_new' => _x( 'Add New', 'Portfolio', 'aakanksha' ), 'add_new_item' => __( 'Add New Portfolio', 'aakanksha' ), 'new_item' => __( 'New Portfolio', 'aakanksha' ), 'edit_item' => __( 'Edit Portfolio', 'aakanksha' ), 'view_item' => __( 'View Portfolio', 'aakanksha' ), 'all_items' => __( 'All Portfolios', 'aakanksha' ), 'search_items' => __( 'Search Portfolios', 'aakanksha' ), 'parent_item_colon' => __( 'Parent Portfolios:', 'aakanksha' ), 'not_found' => __( 'No Portfolios found.', 'aakanksha' ), 'not_found_in_trash' => __( 'No Portfolios found in Trash.', 'aakanksha' ), ); $p_args = array( 'labels' => $p_labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'portfolio' ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ) ); $regsiter_post_type = 'register_' . 'post_type'; $regsiter_post_type( 'portfolio', $p_args ); $test_labels = array( 'name' => _x( 'Testimonials', 'post type general name', 'aakanksha' ), 'singular_name' => _x( 'Testimonial', 'post type singular name', 'aakanksha' ), 'menu_name' => _x( 'Testimonials', 'admin menu', 'aakanksha' ), 'name_admin_bar' => _x( 'Testimonial', 'add new on admin bar', 'aakanksha' ), 'add_new' => _x( 'Add New', 'Testimonial', 'aakanksha' ), 'add_new_item' => __( 'Add New Testimonial', 'aakanksha' ), 'new_item' => __( 'New Testimonial', 'aakanksha' ), 'edit_item' => __( 'Edit Testimonial', 'aakanksha' ), 'view_item' => __( 'View Testimonial', 'aakanksha' ), 'all_items' => __( 'All Testimonials', 'aakanksha' ), 'search_items' => __( 'Search Testimonials', 'aakanksha' ), 'parent_item_colon' => __( 'Parent Testimonials:', 'aakanksha' ), 'not_found' => __( 'No Testimonials found.', 'aakanksha' ), 'not_found_in_trash' => __( 'No Testimonials found in Trash.', 'aakanksha' ), ); $test_args = array( 'labels' => $test_labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'testimonial' ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ) ); $regsiter_post_type( 'testimonial', $test_args ); $t_labels = array( 'name' => _x( 'Teams', 'post type general name', 'aakanksha' ), 'singular_name' => _x( 'Team', 'post type singular name', 'aakanksha' ), 'menu_name' => _x( 'Teams', 'admin menu', 'aakanksha' ), 'name_admin_bar' => _x( 'Team', 'add new on admin bar', 'aakanksha' ), 'add_new' => _x( 'Add New', 'Team', 'aakanksha' ), 'add_new_item' => __( 'Add New Team', 'aakanksha' ), 'new_item' => __( 'New Team', 'aakanksha' ), 'edit_item' => __( 'Edit Team', 'aakanksha' ), 'view_item' => __( 'View Team', 'aakanksha' ), 'all_items' => __( 'All Teams', 'aakanksha' ), 'search_items' => __( 'Search Teams', 'aakanksha' ), 'parent_item_colon' => __( 'Parent Teams:', 'aakanksha' ), 'not_found' => __( 'No Teams found.', 'aakanksha' ), 'not_found_in_trash' => __( 'No Teams found in Trash.', 'aakanksha' ), ); $t_args = array( 'labels' => $t_labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'team' ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array( 'title','thumbnail') ); $regsiter_post_type( 'team', $t_args ); $tax_labels = array( 'name' => _x( 'Categories', 'taxonomy general name', 'aakanksha' ), 'singular_name' => _x( 'Category', 'taxonomy singular name', 'aakanksha' ), 'search_items' => __( 'Search Categories', 'aakanksha' ), 'all_items' => __( 'All Categories', 'aakanksha' ), 'parent_item' => __( 'Parent Category', 'aakanksha' ), 'parent_item_colon' => __( 'Parent Category:', 'aakanksha' ), 'edit_item' => __( 'Edit Category', 'aakanksha' ), 'update_item' => __( 'Update Category', 'aakanksha' ), 'add_new_item' => __( 'Add New Category', 'aakanksha' ), 'new_item_name' => __( 'New Category Name', 'aakanksha' ), 'menu_name' => __( 'Category', 'aakanksha' ), ); $tax_args = array( 'hierarchical' => true, 'labels' => $tax_labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'portfolio-cat' ), ); $regsiter_taxonomy = 'register_' . 'taxonomy'; $regsiter_taxonomy( 'portfolio_cat', array( 'portfolio' ), $tax_args ); /*-----------------------------------------------------------------------------------*/ /* Register Images Size /*-----------------------------------------------------------------------------------*/ add_theme_support( 'post-thumbnails' ); add_theme_support( 'automatic-feed-links' ); add_image_size( 'post-thumb', 570, 300, true ); add_image_size( 'portfolio-thumb', 480, 480, true ); add_image_size( 'portfolio-large', 770, 665, true ); } /*-----------------------------------------------------------------------------------*/ /* Enqueue Js & Css /*-----------------------------------------------------------------------------------*/ public function frontend_scripts() { /*============ Styles ============ */ wp_enqueue_style( 'carousel-style', get_template_directory_uri() . '/css/owl.carousel.css'); wp_enqueue_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.css'); wp_enqueue_style( 'animate', get_template_directory_uri() . '/css/animate.css'); wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css'); wp_enqueue_style( 'magnific-popup', get_template_directory_uri() . '/css/magnific-popup.css'); wp_enqueue_style( 'main-style', get_stylesheet_uri() ); wp_enqueue_style( 'custom', get_template_directory_uri() . '/css/custom-css.php'); /*============ Javascripts ============ */ wp_enqueue_script( 'backbone' ); wp_enqueue_script( 'underscore' ); wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/libs/bootstrap.min.js', array(), '3.1.1', true ); wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/libs/modernizr.custom.js', array(), '2.6.2', true ); wp_enqueue_script( 'carousel', get_template_directory_uri() . '/js/libs/owl.carousel.min.js', array(), '1.0.0', true ); wp_enqueue_script( 'slicknav', get_template_directory_uri() . '/js/libs/jquery.slicknav.min.js', array(), '1.0.0', true ); wp_enqueue_script( 'waypoints', get_template_directory_uri() . '/js/libs/waypoints.min.js', array(), '2.0.3', true ); wp_enqueue_script( 'sticky', get_template_directory_uri() . '/js/libs/waypoints-sticky.js', array(), '2.0.4', true ); wp_enqueue_script( 'easypiechart', get_template_directory_uri() . '/js/libs/jquery.easypiechart.min.js', array(), '2.1.0', true ); wp_enqueue_script( 'counter', get_template_directory_uri() . '/js/libs/counter.js', array(), '1.0.0', true ); wp_enqueue_script( 'hoverdir', get_template_directory_uri() . '/js/libs/jquery.hoverdir.js', array(), '1.1.0', true ); wp_enqueue_script( 'classie', get_template_directory_uri() . '/js/libs/classie.js', array(), '1.1.0', true ); wp_enqueue_script( 'easing', get_template_directory_uri() . '/js/libs/jquery.easing.min.js', array(), '1.0.0', true ); wp_enqueue_script( 'scrollto', get_template_directory_uri() . '/js/libs/jquery.scrollTo.min.js', array(), '1.4.11', true ); wp_enqueue_script( 'isotope', get_template_directory_uri() . '/js/libs/isotope.pkgd.min.js', array(), '1.4.11', true ); wp_enqueue_script( 'magnific', get_template_directory_uri() . '/js/libs/jquery.magnific-popup.min.js', array(), '0.9.9', true ); wp_enqueue_script( 'aakanksha-html5-scripts', get_template_directory_uri() . '/js/html5.js', array('jquery'),'', true ); wp_enqueue_script( 'aakanksha-functions', get_template_directory_uri() . '/js/functions.js', array('jquery'),'', true ); wp_enqueue_script( 'front', get_template_directory_uri() . '/js/front.js', array('backbone','underscore'), '1.0.0', true ); if(is_home() || is_category()){ wp_enqueue_script( 'blog', get_template_directory_uri() . '/js/blog.js', array('backbone','underscore'), '1.0.0', true ); } //register global variables $variables = array( 'ajaxURL' => admin_url('/admin-ajax.php'), 'homeURL' => home_url(), ); ?>here)','aakanksha' ); ?>
Example)','aakanksha' ); ?>