gh google adsense 代码位置修改

master
Layne 2 years ago
parent 8bfafd1eef
commit 1634128338

@ -1698,6 +1698,22 @@ class Information extends CI_Controller
} }
} }
// 未勾选In Article 广告时,加入标签 <meta name="ezoic" content="noads"/>,让 ezoic 识别出该页面不展示广告。
$meta_google_ad_article = get_meta($information->ic_id, 'meta_google_ad_article');
if (empty($meta_google_ad_article) || !$meta_google_ad_article) {
$template = str_replace(
'<!--@Meta-Ezoic-NoAds@-->',
'<meta name="ezoic" content="noads"/>',
$template
);
} else {
$template = str_replace(
'<!--@Meta-Ezoic-NoAds@-->',
'',
$template
);
}
$why_us_covid_list_pc = $this->load->view( $why_us_covid_list_pc = $this->load->view(
$template_path . '-why-us-covid-list-pc', $template_path . '-why-us-covid-list-pc',
array(), array(),
@ -1845,22 +1861,6 @@ class Information extends CI_Controller
$html_path .= $html_path_ext; $html_path .= $html_path_ext;
create_folder_by_path(dirname($html_path)); create_folder_by_path(dirname($html_path));
file_put_contents($html_path, $template, LOCK_EX); file_put_contents($html_path, $template, LOCK_EX);
// 未勾选In Article 广告时,加入标签 <meta name="ezoic" content="noads"/>,让 ezoic 识别出该页面不展示广告。
$meta_google_ad_article = get_meta($information->ic_id, 'meta_google_ad_article');
if (empty($meta_google_ad_article) || !$meta_google_ad_article) {
$template = str_replace(
'<!--@Meta-Ezoic-NoAds@-->',
'<meta name="ezoic" content="noads"/>',
$template
);
} else {
$template = str_replace(
'<!--@Meta-Ezoic-NoAds@-->',
'',
$template
);
}
} }
public function make_www_cache_ah($device, $information, $recommand_information) public function make_www_cache_ah($device, $information, $recommand_information)

Loading…
Cancel
Save