<?php
/**
 * Probizz functions and definitions
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @package Probizz
 */

/**
 * Loads the child theme textdomain.
 */
if ( ! function_exists( 'probizz_child_theme_setup' ) ) :
	function probizz_child_theme_setup() {
	    load_child_theme_textdomain( 'nineteen', get_stylesheet_directory() . '/languages' );
	}
endif;
add_action( 'after_setup_theme', 'probizz_child_theme_setup' );

/* Dequeue scripts */
if ( ! function_exists( 'probizz_dequeue_parent' ) ) :
	function probizz_dequeue_parent() {
	    wp_dequeue_style( 'nineteen-main-style' );
	    wp_dequeue_script( 'nineteen-custom-script' );
	}
endif;
add_action( 'wp_print_styles', 'probizz_dequeue_parent' );

function probizz_fonts_url() {
    $fonts_url       = '';
    $font_families[] = 'Montserrat:400,600,800%7COpen+Sans:400,600,800';
    $query_args      = array(
        'family' => urlencode( implode( '|', $font_families ) ),
    );
    $fonts_url     = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
    
    return esc_url_raw( $fonts_url );
}

/*Enqueue scripts */
if ( ! function_exists( 'probizz_scripts' ) ) :
	function probizz_scripts() {
		wp_enqueue_style( 'google-fonts', probizz_fonts_url(), array(), null );
		wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css' );
		wp_enqueue_style( 'responsive', get_stylesheet_directory_uri() . '/dist/responsive.css' );
		wp_enqueue_style( 'master-fullscreen', get_stylesheet_directory_uri() . '/dist/ms-fullscreen.css' );
		wp_enqueue_style( 'master-slider-css', get_stylesheet_directory_uri() . '/dist/masterslider.main.css' );
		wp_enqueue_script( 'masterslider-js', get_stylesheet_directory_uri() . '/dist/masterslider.min.js', array( 'jquery' ), '1.0', true );
		wp_enqueue_script( 'custom-js', get_stylesheet_directory_uri() . '/dist/custom-script.js', array( 'jquery' ), '1.0', true );
	}
endif;
add_action( 'wp_enqueue_scripts', 'probizz_scripts' );

require get_stylesheet_directory().'/inc/menu_walker.php' ;
?>