feat: 增加FB分享标题和描述标签

master
Jimmy Liow 2 years ago
parent 9d76daafbc
commit 5448f94158

@ -1380,6 +1380,16 @@ class Information extends CI_Controller
if (!empty($meta_index_set)) {
$template = str_replace('<!--@Meta_Robots@-->', '<meta name="robots" content="' . $meta_index_set . '" />', $template);
}
$meta_note_ogtitle = get_meta($information->ic_id, 'meta_note_ogtitle');
if (!empty($meta_note_ogtitle)) {
$template = str_replace('<!--@meta_og:title@-->', '<meta property="og:title" content="' . $meta_note_ogtitle . '" />', $template);
}
$meta_note = get_meta($information->ic_id, 'meta_note');
if (!empty($meta_note)) {
$template = str_replace('<!--@meta_og:description@-->', '<meta property="og:description" content="' . $meta_note . '" />', $template);
}
//设置内容图片缓加载
$lazy_content = $this->html_optimize_lib->set_lazy_loader($information->ic_content, 'https://data.chinahighlights.com/grey.gif');
$template = str_replace('<!--@CUSTOM-CONENT@-->', $lazy_content, $template);

@ -12,6 +12,8 @@
<meta name="apple-mobile-web-app-title" content="China Highlights - Since 1998!">
<meta name="description" content="<!--@DESCRIPTION@-->">
<!--@Meta_Robots@-->
<!--@meta_og:title@-->
<!--@meta_og:description@-->
<!--@Meta-Ezoic-NoAds@-->
<link rel="canonical" href="<!--@CANONICAL@-->">

@ -8,6 +8,8 @@
</title>
<meta name="description" content="<!--@DESCRIPTION@-->">
<!--@Meta_Robots@-->
<!--@meta_og:title@-->
<!--@meta_og:description@-->
<meta content="width=device-width,minimum-scale=1,initial-scale=1" name="viewport">
<!--@Meta-Ezoic-NoAds@-->

Loading…
Cancel
Save