aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/functions.php16
-rw-r--r--core/include/page/main.php2
-rw-r--r--core/include/post/main.php2
-rw-r--r--core/include/user/main.php2
4 files changed, 15 insertions, 7 deletions
diff --git a/core/functions.php b/core/functions.php
index 91a4006..fc97e3b 100644
--- a/core/functions.php
+++ b/core/functions.php
@@ -100,8 +100,12 @@ function generateItemData(Item $Item): array {
],
'BODY' => [
- 'TEXT' => $Item->getBody(),
- 'HTML' => $Item->getHTML()
+ 'TEXT' => function() use($Item) {
+ return $Item->getBody();
+ },
+ 'HTML' => function() use($Item) {
+ return $Item->getHTML();
+ }
],
'ATTR' => [
@@ -148,8 +152,12 @@ function generateUserItemData(User\Item $User): array {
],
'BODY' => [
- 'TEXT' => $User->getBody(),
- 'HTML' => $User->getHTML()
+ 'TEXT' => function() use($User) {
+ return $User->getBody();
+ },
+ 'HTML' => function() use($User) {
+ return $User->getHTML();
+ }
],
'ATTR' => [
diff --git a/core/include/page/main.php b/core/include/page/main.php
index bf3e03e..01579fc 100644
--- a/core/include/page/main.php
+++ b/core/include/page/main.php
@@ -47,7 +47,7 @@ try {
$MainTemplate->set('HTML', $PageTemplate);
$MainTemplate->set('HEAD', [
'NAME' => $page_data['ATTR']['NAME'],
- 'DESC' => description($page_data['BODY']['HTML'], Application::get('PAGE.DESCRIPTION_SIZE')),
+ 'DESC' => description($page_data['BODY']['HTML'](), Application::get('PAGE.DESCRIPTION_SIZE')),
'PERM' => $page_data['URL'],
'OG_IMAGES' => $page_data['FILE']['LIST']
]);
diff --git a/core/include/post/main.php b/core/include/post/main.php
index dc3cbdc..8cd0a49 100644
--- a/core/include/post/main.php
+++ b/core/include/post/main.php
@@ -47,7 +47,7 @@ try {
$MainTemplate->set('HTML', $PostTemplate);
$MainTemplate->set('HEAD', [
'NAME' => $post_data['ATTR']['NAME'],
- 'DESC' => description($post_data['BODY']['HTML'], Application::get('POST.DESCRIPTION_SIZE')),
+ 'DESC' => description($post_data['BODY']['HTML'](), Application::get('POST.DESCRIPTION_SIZE')),
'PERM' => $post_data['URL'],
'OG_IMAGES' => $post_data['FILE']['LIST']
]);
diff --git a/core/include/user/main.php b/core/include/user/main.php
index 79e0ea9..ba0d07b 100644
--- a/core/include/user/main.php
+++ b/core/include/user/main.php
@@ -62,7 +62,7 @@ try {
$MainTemplate->set('HTML', $UserTemplate);
$MainTemplate->set('HEAD', [
'NAME' => $user_data['ATTR']['FULLNAME'],
- 'DESC' => description($user_data['BODY']['HTML'], Application::get('USER.DESCRIPTION_SIZE')),
+ 'DESC' => description($user_data['BODY']['HTML'](), Application::get('USER.DESCRIPTION_SIZE')),
'PERM' => $User->getURL(),
'OG_IMAGES' => $User->getFiles()
]);