by Davo Smith.
Please explain the context a little more:
- Is this in your own plugin, or are you messing around with text from another plugin?
- You say the function 'file rewrite plugin file urls' does not work - I assume you mean 'file_rewrite_pluginfile_urls', this function has been used successfully as part of Moodle core for several years now, so I suspect it is the way you are trying to use it which is wrong, not the function itself.
- Please give an example of some text with 'https://moodle.org/pluginfile.php/178/mod_forum/post/1126637/' within it which you are trying to use, with the parameters you have passed to 'file_rewrite_pluginfile_urls' and the result you are getting out of this (also with any error messages, or an explanation of what is not working).