【发布时间】:2015-08-08 09:31:56
【问题描述】:
使用我的 Joomla 插件,我想在创建输出之前获取和修改所有内容。
function newContent($html)
{
$html = "new content";
return $html;
}
function onContentPrepare()
{
ob_start(array($this, "newContent"));
return true;
}
function onContentBeforeDisplay()
{
ob_end_flush();
return true;
}
我尝试使用onContentAfterDisplay,但它继续只改变一小部分而不是所有输出。
【问题讨论】: