diff --git a/CHANGELOG.md b/CHANGELOG.md index 325f248203dd8f5f0ee946b6fef3cee0dc648a25..575421b0b701b93eb88c711b556963b4acf1d8b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [3.2.5] - 2024-03-18 +### Fixed +- remove duplicates for JS + ## [3.2.4] - 2024-03-11 ### Fixed - permission check on notice dismiss action diff --git a/src/WPDesk/Notice/AjaxHandler.php b/src/WPDesk/Notice/AjaxHandler.php index 64c9b7141b4bdc34ef6c2725831842ef26e3240a..23276a42310775250d9e99a365226071789297a2 100644 --- a/src/WPDesk/Notice/AjaxHandler.php +++ b/src/WPDesk/Notice/AjaxHandler.php @@ -66,7 +66,7 @@ class AjaxHandler implements HookablePluginDependant { * Add Java Script to admin header. */ public function addScriptToAdminHead() { - include __DIR__ . '/views/admin-head-js.php'; + require_once __DIR__ . '/views/admin-head-js.php'; } /** diff --git a/src/WPDesk/Notice/views/admin-head-js.php b/src/WPDesk/Notice/views/admin-head-js.php index 5509cb4a519cc87b6e0e30432ea3d82ac03572b3..7db9ca29c314a96067fc43fb530a245de682473b 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__, 5) . '/assets/js/notice.js'; ?> + <?php require_once dirname(__FILE__, 5) . '/assets/js/notice.js'; ?> </script>