naudefj wrote on Mon, 18 April 2011 18:53Much better!
... several POST_TEMPLATE plugings can be activated to change the HTML before it is outputted.
In that case, it'll be better to do ...
/* Call themed template. */
if (defined('plugins')) {
plugin_call_hook('PRE_TEMPLATE');
if (isset($plugin_hooks['POST_TEMPLATE'])) {
ob_start();
}
}
require($WWW_ROOT_DISK . fud_theme .'language.inc'); // Initialize theme's language helper functions.
require($WWW_ROOT_DISK . fud_theme . $t .'.php');
if (defined('plugins') && isset($plugin_hooks['POST_TEMPLATE'])) {
$htmlData = ob_get_contents();
ob_end_clean();
$htmlData = plugin_call_hook('POST_TEMPLATE', $htmlData);
echo $htmlData;
}
}
Question: How can a user influence the order in which multiple plugins are run on the same hook?