{"id":69,"date":"2008-09-16T13:22:50","date_gmt":"2008-09-16T18:22:50","guid":{"rendered":"http:\/\/osric.com\/chris\/accidental-developer\/?p=69"},"modified":"2008-09-16T13:22:53","modified_gmt":"2008-09-16T18:22:53","slug":"smarty-prefilters-need-to-have-the-compiled-templates-wiped-to-work","status":"publish","type":"post","link":"https:\/\/osric.com\/chris\/accidental-developer\/2008\/09\/smarty-prefilters-need-to-have-the-compiled-templates-wiped-to-work\/","title":{"rendered":"Smarty prefilters need to have the compiled templates wiped to work."},"content":{"rendered":"<p><img decoding=\"async\" style=\"max-width: 800px;\" src=\"https:\/\/osric.com\/chris\/accidental-developer\/wp-content\/uploads\/2008\/09\/smarty-logo-orange.gif\" align=\"left\" \/>I just thought I would drop this little tidbit to help save someone some time (hopefully). In the smarty template engine there is a pretty useful call &#8220;register_prefilter&#8221; which basically lets you pass a function to smarty that gets run on the whole template file before the template file itself has any of the substitutions made to it. This can be a god-send, however the first time you use it it probably won&#8217;t seem like it&#8217;s working. The secret is that you need to go into your templates_c directory, and dump all of the compiled templates every time you change the pre-filter. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just thought I would drop this little tidbit to help save someone some time (hopefully). In the smarty template engine there is a pretty useful call &#8220;register_prefilter&#8221; which basically lets you pass a function to smarty that gets run on the whole template file before the template file itself has any of the substitutions &hellip; <a href=\"https:\/\/osric.com\/chris\/accidental-developer\/2008\/09\/smarty-prefilters-need-to-have-the-compiled-templates-wiped-to-work\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Smarty prefilters need to have the compiled templates wiped to work.<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":0,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"wp:attachment":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}