mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-12 00:14:26 +02:00
replace macros
implement new replaceMacros function
This commit is contained in:
parent
f6c86649c2
commit
91facd2d0a
91 changed files with 335 additions and 249 deletions
10
src/App.php
10
src/App.php
|
@ -777,7 +777,7 @@ class App
|
|||
* since the code added by the modules frequently depends on it
|
||||
* being first
|
||||
*/
|
||||
$this->page['htmlhead'] = replace_macros($tpl, [
|
||||
$this->page['htmlhead'] = Core\Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => $this->getBaseURL(),
|
||||
'$local_user' => local_user(),
|
||||
'$generator' => 'Friendica' . ' ' . FRIENDICA_VERSION,
|
||||
|
@ -823,7 +823,7 @@ class App
|
|||
} else {
|
||||
$link = 'toggle_mobile?off=1&address=' . curPageURL();
|
||||
}
|
||||
$this->page['footer'] .= replace_macros(get_markup_template("toggle_mobile_footer.tpl"), [
|
||||
$this->page['footer'] .= Core\Renderer::replaceMacros(get_markup_template("toggle_mobile_footer.tpl"), [
|
||||
'$toggle_link' => $link,
|
||||
'$toggle_text' => Core\L10n::t('toggle mobile')
|
||||
]);
|
||||
|
@ -832,7 +832,7 @@ class App
|
|||
Core\Addon::callHooks('footer', $this->page['footer']);
|
||||
|
||||
$tpl = get_markup_template('footer.tpl');
|
||||
$this->page['footer'] = replace_macros($tpl, [
|
||||
$this->page['footer'] = Core\Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => $this->getBaseURL(),
|
||||
'$footerScripts' => $this->footerScripts,
|
||||
]) . $this->page['footer'];
|
||||
|
@ -1793,7 +1793,7 @@ class App
|
|||
|
||||
header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . Core\L10n::t('Not Found'));
|
||||
$tpl = get_markup_template("404.tpl");
|
||||
$this->page['content'] = replace_macros($tpl, [
|
||||
$this->page['content'] = Core\Renderer::replaceMacros($tpl, [
|
||||
'$message' => Core\L10n::t('Page not found.')
|
||||
]);
|
||||
}
|
||||
|
@ -1881,7 +1881,7 @@ class App
|
|||
|
||||
// Add the navigation (menu) template
|
||||
if ($this->module != 'install' && $this->module != 'maintenance') {
|
||||
$this->page['htmlhead'] .= replace_macros(get_markup_template('nav_head.tpl'), []);
|
||||
$this->page['htmlhead'] .= Core\Renderer::replaceMacros(get_markup_template('nav_head.tpl'), []);
|
||||
$this->page['nav'] = Content\Nav::build($this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue