Hello
I did install plugin that should change string with spaces to string without spaces.
Example “Aaa 1” should be"Aaa-1”
As a parameter I did provide tag from other plugin but this is not working. It is returning the same string, more of that when I print in plugin value that I get via $this->EE->TMPL->fetch_param(‘string’, ‘’) I see only tag.
How to change that tag to value?
Code:
//ExpressionEngine super object
$this->EE =& get_instance();
$haystack = $this->EE->TMPL->fetch_param('string', '');
$needle = $this->EE->TMPL->fetch_param('pattern', '');
$replace = $this->EE->TMPL->fetch_param('replace', '');
echo "<pre>";
print_r ($this->EE->TMPL->fetch_param('string'));
echo "</pre>";
//Output transformed string
$this->return_data = str_replace($needle, $replace, $haystack);
