联系我们

{ "@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld", "@id": "'.get_the_permalink().'", "appid": "1578318824802963", "title": "'.get_the_title().'", "images": ["'.fanly_post_imgs().'"], "pubDate": "'.get_the_time('Y-m-d\TH:i:s').'" } ';} //获取文章中的图 last update 2018/01/22 function fanly_post_imgs(){ global $post; $src = ''; $content = $post->post_content; preg_match_all('//', $content, $strResult, PREG_PATTERN_ORDER); $n = count($strResult[1]); if($n >= 3){ $src = $strResult[1][0].'","'.$strResult[1][1].'","'.$strResult[1][2]; }elseif($n >= 1){ $src = $strResult[1][0]; } return $src; } ?>