Exemplo n.º 1
0
 /**
  * Replaces the place holders for required externals with the actual requirements.
  * This approach is needed to ensure that all requirements are properly included,
  * even if they are included after the comment has been rendered.
  *
  * @param XenForo_Template_Abstract $template The container template object; used to get the requirements
  * @param string $rendered Already rendered output
  *
  * @return string
  */
 public function replaceRequiredExternalPlaceholders(XenForo_Template_Abstract $template, $rendered)
 {
     return strtr($rendered, array('<!--XenForo_Require:JS-->' => $template->getRequiredExternalsAsHtml('js'), '<!--XenForo_Require:CSS-->' => $template->getRequiredExternalsAsHtml('css'), '{/*<!--XenForo_Required_Scripts-->*/}' => $template->getRequiredExternalsAsJson()));
 }