tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Set woocommerce support * */ add_theme_support( 'woocommerce' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); add_image_size( 'ariana_image_1200_800', 1200,800, true ); add_image_size( 'ariana_image_200_200', 200,200, true ); add_image_size( 'ariana_image_870_984', 870,984, true ); add_image_size( 'ariana_image_210_100', 210,100, true ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'ariana' ), ) ); add_theme_support( 'post-formats', array( 'audio', 'video', 'quote', ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'ariana_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); add_editor_style( array( 'assets/css/editor-style.css', ariana_fonts_url() ) ); } endif; add_action( 'after_setup_theme', 'ariana_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function ariana_content_width() { $GLOBALS['content_width'] = apply_filters( 'ariana_content_width', 640 ); } add_action( 'after_setup_theme', 'ariana_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function ariana_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'ariana' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'ariana' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Shop Sidebar', 'ariana' ), 'id' => 'sidebar-2', 'description' => esc_html__( 'Add widgets here.', 'ariana' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'ariana_widgets_init' ); /** * register google fonts */ function ariana_fonts_url() { $fonts_url = ''; /* Translators: If there are characters in your language that are not * supported by Source Sans Pro, translate this to 'off'. Do not translate * into your own language. */ $cousine = _x( 'on', 'Cousine font: on or off', 'ariana' ); /* Translators: If there are characters in your language that are not * supported by Merriweather, translate this to 'off'. Do not translate * into your own language. */ $montserrat = _x( 'on', 'Montserrat font: on or off', 'ariana' ); if ( 'off' !== $cousine || 'off' !== $montserrat ) { $font_families = array(); if ( 'off' !== $cousine ) { $font_families[] = 'Cousine:400,700'; } if ( 'off' !== $montserrat ) { $font_families[] = 'Montserrat:400,700'; } $query_args = array( 'family' => 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 ); } /** * Enqueue scripts and styles. */ function ariana_scripts() { //google font wp_enqueue_style( 'google-fonts', ariana_fonts_url(), array(), null ); // Load CSS wp_enqueue_style('bootstrap' , get_template_directory_uri(). '/assets/bootstrap/css/bootstrap.min.css'); wp_enqueue_style('font-awesome.min' , get_template_directory_uri(). '/assets/fonts/font-awesome.min.css'); wp_enqueue_style('prettyPhoto' , get_template_directory_uri(). '/assets/css/prettyPhoto.css'); wp_enqueue_style('owl.carousel' , get_template_directory_uri(). '/assets/owlcarousel/css/owl.carousel.css'); wp_enqueue_style('owl.theme' , get_template_directory_uri(). '/assets/owlcarousel/css/owl.theme.css'); wp_enqueue_style('animate' , get_template_directory_uri(). '/assets/css/animate.css'); wp_enqueue_style('style' , get_template_directory_uri(). '/assets/css/style.css'); // Load JS Files wp_enqueue_script( 'html5shiv', get_template_directory_uri() . '/js/html5shiv.min.js', array(), '3.7.2' ); wp_script_add_data( 'html5shiv', 'conditional', 'lt IE 9' ); wp_enqueue_script( 'respond', get_template_directory_uri() . '/js/respond.min.js', array(), '1.4.2' ); wp_script_add_data( 'respond', 'conditional', 'lt IE 9' ); wp_enqueue_style( 'ariana-style', get_stylesheet_uri() ); wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/bootstrap/js/bootstrap.min.js', array('jquery'), '254685', true ); wp_enqueue_script( 'modernizr-2.8.3.min', get_template_directory_uri() . '/assets/js/modernizr-2.8.3.min.js', array('jquery'), '254685', true ); wp_enqueue_script( 'jquery.prettyPhoto', get_template_directory_uri() . '/assets/js/jquery.prettyPhoto.js', array('jquery'), '254685', true ); wp_enqueue_script( 'owl.carousel.min', get_template_directory_uri() . '/assets/owlcarousel/js/owl.carousel.min.js', array('jquery'), '254685', true ); wp_enqueue_script( 'scrolltopcontrol', get_template_directory_uri() . '/assets/js/scrolltopcontrol.js', array('jquery'), '254685', true ); wp_enqueue_script( 'wow.min', get_template_directory_uri() . '/assets/js/wow.min.js', array('jquery'), '254685', true ); wp_enqueue_script( 'jquery.nav', get_template_directory_uri() . '/assets/js/jquery.nav.js', array('jquery'), '254685', true ); wp_enqueue_script( 'scripts', get_template_directory_uri() . '/assets/js/scripts.js', array('jquery'), '254685', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'ariana_scripts' ); function ariana_main_menu() { wp_nav_menu( array( 'theme_location' => 'primary', 'depth' => 5, 'container' => false, 'menu_class' => 'nav navbar-nav navbar-right', 'fallback_cb' => 'ariana_navwalker::fallback', ) ); } /*--------------------------------------------- Initialising KingComposer shortcode editor ----------------------------------------------*/ if (class_exists('KingComposer')) { function ariana_requireVcExtend(){ include_once( get_template_directory().'/kc_extend/extend_kc.php'); } add_action('init', 'ariana_requireVcExtend',2); } // modify search widget function ariana_my_search_form( $form ) { $form = '
'; return $form; } add_filter( 'get_search_form', 'ariana_my_search_form' ); // comment list modify function ariana_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>
  • id="comment-">
       
    comment_approved == '0') : ?>

  • '; return $arg; } add_filter('comment_form_defaults','ariana_comment_reform'); // comment form modify function ariana_modify_comment_form_fields($fields){ $commenter = wp_get_current_commenter(); $req = get_option( 'require_name_email' ); $fields['author'] = '
    '; $fields['email'] = '
    '; $fields['url'] = '
    '; return $fields; } add_filter('comment_form_default_fields','ariana_modify_comment_form_fields'); /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php'; require get_template_directory() . '/inc/navwalker.php'; require get_template_directory() . '/inc/metabox/custom_metabox.php'; require get_template_directory() . '/inc/custom-functions.php'; require get_template_directory() . '/inc/admin/ariana-options.php'; require get_template_directory() . '/inc/admin/custom_css.php'; require get_template_directory() . '/inc/plugin-activator.php'; require get_template_directory() . '/inc/required-plugin.php'; require get_template_directory() . '/inc/ariana-wc-function.php';