From 02a4c642ad94e17e1464f1cc14e3ddd17cbc8864 Mon Sep 17 00:00:00 2001
From: Bart Jaskulski <bjaskulski@protonmail.com>
Date: Thu, 9 Feb 2023 13:20:30 +0100
Subject: [PATCH] fix: work around dodgy strings

Replace *dodgy strings* for leveled `dirname` to comply with Automattic
plugin approval process.

Signed-off-by: Bart Jaskulski <bjaskulski@protonmail.com>
---
 src/WPDesk/Notice/views/admin-head-js-gutenberg.php | 2 +-
 src/WPDesk/Notice/views/admin-head-js.php           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/WPDesk/Notice/views/admin-head-js-gutenberg.php b/src/WPDesk/Notice/views/admin-head-js-gutenberg.php
index 4cc3d12..aceb3db 100644
--- a/src/WPDesk/Notice/views/admin-head-js-gutenberg.php
+++ b/src/WPDesk/Notice/views/admin-head-js-gutenberg.php
@@ -4,5 +4,5 @@ if ( ! defined( 'ABSPATH' ) ) {
 } // Exit if accessed directly
 ?>
 <script type="text/javascript">
-    <?php include dirname(__FILE__) . '/../../../../assets/js/gutenberg.js'; ?>
+    <?php include dirname(__FILE__, 4) . '/assets/js/gutenberg.js'; ?>
 </script>
diff --git a/src/WPDesk/Notice/views/admin-head-js.php b/src/WPDesk/Notice/views/admin-head-js.php
index 08532f1..95c17c6 100644
--- a/src/WPDesk/Notice/views/admin-head-js.php
+++ b/src/WPDesk/Notice/views/admin-head-js.php
@@ -4,5 +4,5 @@ if ( ! defined( 'ABSPATH' ) ) {
 } // Exit if accessed directly
 ?>
 <script type="text/javascript">
-    <?php include dirname(__FILE__) . '/../../../../assets/js/notice.min.js'; ?>
+    <?php include dirname(__FILE__, 4) . '/assets/js/notice.min.js'; ?>
 </script>
-- 
GitLab