GetSimple Support Forum
Simple: filter content generated by other plugins - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Feature Requests (http://get-simple.info/forums/forumdisplay.php?fid=7)
+--- Thread: Simple: filter content generated by other plugins (/showthread.php?tid=750)



Simple: filter content generated by other plugins - blazer82 - 2010-05-27

Sometimes it may be useful to filter content generated by another plugin.
This works only, if the filter method of the other plugin was called before yours.

So, there may be a dependency system between plugins or some kind of sort order.

Or.... Smile
Just a simple change within the existing theme function get_page_content().

By writing:
Code:
while ($content != exec_filter('content',$content))
{
    $content = exec_filter('content',$content);
}

instead of just
Code:
$content = exec_filter('content',$content);

it will be assured that there's nothing to do for any of the filters before the content is sent back.

Of course, this means a little more execution costs, but you may want to think about it.

Thanks
blazer82