<?php

/**
 * @author Divi Awesome
 * @copyright 2022
 */

function popup_enqueue_scripts(){
    wp_enqueue_script( 'magnific-popup', ET_BUILDER_URI . '/feature/dynamic-assets/assets/js/magnific-popup.js', array( 'jquery' ), '1.3.0', true );
    wp_enqueue_style('et_jquery_magnific_popup', ET_BUILDER_URI . "/feature/dynamic-assets/assets/css/magnific_popup.css", [], '1.3.0');
}
add_action('wp_enqueue_scripts', 'popup_enqueue_scripts', 20);

add_action('wp_enqueue_scripts', 'da_ct_loadjs');

function da_ct_loadjs() {
	wp_enqueue_script('da-theme-script', get_stylesheet_directory_uri() . '/da-script.js', array('jquery'));
}

if ( ! defined('ABSPATH') ) {
	die();
}

add_action( 'wp_enqueue_scripts', 'kleen_divi_child_theme', 20  );
function kleen_divi_child_theme() {
    wp_enqueue_style( 'parent-theme', get_template_directory_uri() . '/style.css', array(), et_get_theme_version() );
    wp_enqueue_style( 'child-theme', get_stylesheet_uri(), array(), filemtime( get_stylesheet_directory() . '/style.css' ) );
}
 
function kleen_dequeue() {
    wp_dequeue_style( 'divi-style' );
}
add_action( 'wp_enqueue_scripts', 'kleen_dequeue', 1  );
add_action( 'wp_head', 'kleen_dequeue', 1 );