After a new update, I noticed a change the broke my sites.
I added a few custom elements to support one of the themes I use. The way I did it was using do_shortcode() inside frontend.php, so basically, the input of the module form is passed to a function that parses it, builds a shortcode string, then sends it to do_shortcode() in order to convert it to HTML.
I realized when I enter the page, the shortcode is converted without any problem. However, when I edit the module form and the “refresh” event happens, the shortcode will not be converted. The reason being is that when the AJAX request is sent, the shortcode tag is not defined.
What was the change and how do you suggest that I deal with it? Would be great to mention the best practices to extend a theme using their shortcode.
Is there any way to include files that are not gone when the AJAX request happens? (it seems to me impossible, the AJAX is not a full request and therefore does not initialize all plugin files, correct?).
Do you have any event that is guaranteed to run before all AJAX request when “refresh” happens?