From be3761cfd6eacd89138e65bab63187e32d16b4ad Mon Sep 17 00:00:00 2001
From: cristiano <cs.almeida@protonmail.ch>
Date: Tue, 30 Apr 2019 17:05:20 +0100
Subject: [PATCH] Sets dynamic theme path for video file.

---
 wp-content/themes/foundry0/functions.php | 2 ++
 wp-content/themes/foundry0/header.php    | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/wp-content/themes/foundry0/functions.php b/wp-content/themes/foundry0/functions.php
index c408604..e3a67ba 100644
--- a/wp-content/themes/foundry0/functions.php
+++ b/wp-content/themes/foundry0/functions.php
@@ -22,4 +22,6 @@ function register_my_menus() {
    );
  }
  add_action( 'init', 'register_my_menus' );
+
+$theme_path = get_template_directory_uri("/wp-content/themes/foundry0");
  ?>
\ No newline at end of file
diff --git a/wp-content/themes/foundry0/header.php b/wp-content/themes/foundry0/header.php
index dd97034..7822e0e 100644
--- a/wp-content/themes/foundry0/header.php
+++ b/wp-content/themes/foundry0/header.php
@@ -1,3 +1,4 @@
+<?php global $theme_path; ?>
 <!DOCTYPE html>
     <head>
         <title>
@@ -31,9 +32,8 @@
 <body>
        <div class="splash">
             <video width="100%" height="100%" autoplay muted playsinline id="splash">
-                <source src="./img/Neon-Splash.mp4" type="video/mp4">
+                <source src="<?php echo $theme_path ?>/img/Neon-Splash.mp4" type="video/mp4">
             </video> 
-            
         </div>
         <div class="gris">
         </div>
-- 
GitLab