From 8b6c5f80588bf0e23c173a28bf2bb82aaff4cb0c Mon Sep 17 00:00:00 2001 From: alexandergull Date: Tue, 24 Dec 2024 13:45:20 +0500 Subject: [PATCH] Upd. Docs added and redundant separator removed. --- lib/CleantalkSP/Common/Enqueue/Enqueue.php | 30 +++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/CleantalkSP/Common/Enqueue/Enqueue.php b/lib/CleantalkSP/Common/Enqueue/Enqueue.php index 0a334792..a04e8b04 100644 --- a/lib/CleantalkSP/Common/Enqueue/Enqueue.php +++ b/lib/CleantalkSP/Common/Enqueue/Enqueue.php @@ -8,13 +8,37 @@ class Enqueue { use Singleton; + /** + * @var string + */ protected $plugin_version = ''; + /** + * @var string + */ protected $assets_path = ''; + /** + * @var string + */ protected $plugin_path = ''; + /** + * @var string + */ protected $css_subdir_path = '/css/'; + /** + * @var string + */ protected $js_subdir_path = '/js/'; + /** + * @var string + */ private $type = ''; + /** + * @var array + */ private $errors = array(); + /** + * @var array + */ private $handles_to_register = array(); /** @@ -152,7 +176,7 @@ private function prepareData($asset_file_name, $deps, $args, $media) if (!@file_exists($this->getPath($work_script_name, false))) { $work_script_name = $asset_file_name; if (!@file_exists($this->getPath($work_script_name, false))) { - $work_script_name = 'src/' . DIRECTORY_SEPARATOR . $asset_file_name; + $work_script_name = 'src' . DIRECTORY_SEPARATOR . $asset_file_name; } } $fresh_version = $this->getFreshVersion($work_script_name); @@ -283,6 +307,10 @@ public function isAllHandlesQueued() return true; } + /** + * Does enqueue process has errors occurred. + * @return bool + */ public function hasErrors() { return !empty($this->errors);