<!--熊掌号改造开始-->
<script src="//msite.baidu.com/sdk/c.js?appid=1613038489707269"></script>
<?php
if(is_single()||is_page()){
//文章发布时间
$pubDate=get_the_time('Y-m-d\TH:i:s');
//文章修改时间
$upDate=get_the_modified_time('Y-m-d\TH:i:s');
//更新时间小于发布时间,则更新时间等于发布时间
if(strtotime($upDate)<strtotime($pubDate)){
$upDate=$pubDate;
//echo '更新时间小于发布时间';
}else{
//echo '更新时间大于发布时间';
}
echo '<script type="application/ld+json">{
"@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
"@id": "'.get_the_permalink().'",
"appid": "1613038489707269",
"title": "'.get_the_title().'",
"images": ["'.fanly_post_imgs().'"],
"description": "'.fanly_custom_excerpt().'",
"pubDate": "'.get_the_time('Y-m-d\TH:i:s').'",
"upDate": "'.$upDate.'",
"isOriginal": "'.is_yc(get_the_ID()).'"
}</script>
';
}
?>
<!--熊掌号改造结束-->
WordPress熊掌号改造
最新推荐文章于 2022-10-13 13:54:20 发布