|
|
|
|
@ -1186,9 +1186,26 @@ class Information extends CI_Controller {
|
|
|
|
|
if (empty($meta_product_code)) {
|
|
|
|
|
$template = str_replace('?product_code=', '', $template);
|
|
|
|
|
|
|
|
|
|
$meta_addon_picture = get_meta($information->ic_id, 'meta_addon_picture');
|
|
|
|
|
$meta_addon_picture_mobile = get_meta($information->ic_id, 'meta_addon_picture_mobile');
|
|
|
|
|
|
|
|
|
|
$article_image_list = [$meta_addon_picture, $meta_addon_picture_mobile];
|
|
|
|
|
$article_image_list = array_values(array_filter($article_image_list, function($value) {
|
|
|
|
|
return !empty($value);
|
|
|
|
|
}));
|
|
|
|
|
$article_image_json = json_encode($article_image_list, JSON_UNESCAPED_SLASHES);
|
|
|
|
|
|
|
|
|
|
$article_published_date = new DateTime($information->is_datetime, new DateTimeZone('UTC'));
|
|
|
|
|
$article_modified_date = new DateTime('now', new DateTimeZone('UTC'));
|
|
|
|
|
|
|
|
|
|
$article_structured_data_content = $this->load->view(
|
|
|
|
|
$template_path . '-structured-data-article',
|
|
|
|
|
['information' => $information, 'author_name' => $data_H1['author'], 'author_url' => $author_url],
|
|
|
|
|
$template_path . '-structured-data-article', [
|
|
|
|
|
'information' => $information,
|
|
|
|
|
'article_published_date' => $article_published_date,
|
|
|
|
|
'article_modified_date' => $article_modified_date,
|
|
|
|
|
'author_name' => $data['author'], 'author_url' => $author_url,
|
|
|
|
|
'article_image_urls' => $article_image_json
|
|
|
|
|
],
|
|
|
|
|
true
|
|
|
|
|
);
|
|
|
|
|
$template = str_replace('<!--@STRUCTURED-DATA-ARTICLE-BLOCK@-->', $article_structured_data_content, $template);
|
|
|
|
|
|