<?php
/**
 * Divi Awesome Child Theme
 * Functions.php
 *
 * ===== NOTES ==================================================================
 * 
 * Unlike style.css, the functions.php of a child theme does not override its 
 * counterpart from the parent. Instead, it is loaded in addition to the parent's 
 * functions.php. (Specifically, it is loaded right before the parent's file.)
 * 
 * In that way, the functions.php of a child theme provides a smart, trouble-free 
 * method of modifying the functionality of a parent theme. 
 * 
 * 
 * =============================================================================== */
 add_action( 'wp_enqueue_scripts', 'metan_divi_child_theme', 20  );
function metan_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 metan_dequeue() {
    wp_dequeue_style( 'divi-style' );
}
add_action( 'wp_enqueue_scripts', 'metan_dequeue', 1  );
add_action( 'wp_head', 'metan_dequeue', 1 );