_plugin_directory = plugin_dir_path(__FILE__); $this->_fileName = $_fileName; $this->_params = $_params; $this->loadScriptFromFile($this->_fileName, $this->_params); } function loadScriptFromFile($fileName, $params){ $this->_scriptFileContent = file_get_contents($this->_plugin_directory.'js/'.$fileName); $this->_currentScript = str_replace(array_keys($params),array_values($params),$this->_scriptFileContent); } function appendScript($jscript){ $this->_currentScript .= $jscript; } function __toString() { return $this->_currentScript; } function getScriptMarkupString(){ return ""; } }