Add link preview description for blog posts
This commit is contained in:
parent
390915a884
commit
935a7e9e76
2 changed files with 4 additions and 2 deletions
|
@ -99,9 +99,10 @@ class Page
|
|||
/**
|
||||
* Non-Static
|
||||
*/
|
||||
public string $language = DEFAULT_LOCALE;
|
||||
public array $messages = array();
|
||||
public string $language = DEFAULT_LOCALE;
|
||||
public array $messages = array();
|
||||
public string $link_preview;
|
||||
public string $description;
|
||||
|
||||
/**
|
||||
* __construct
|
||||
|
|
|
@ -17,6 +17,7 @@ $page = new Page(__FILE__, $post->title->rendered);
|
|||
|
||||
if (isset($postMedia->source_url)) {
|
||||
$page->link_preview = $postMedia->source_url;
|
||||
$page->description = $post->excerpt->rendered;
|
||||
}
|
||||
|
||||
$page->header();
|
||||
|
|
Loading…
Reference in a new issue