Name of the Photo Series: ‘ . $photoSeriesName . ‘

‘;
echo ‘

Model Name: ‘ . $modelName . ‘

‘;
echo ‘

Total Number of Photos: ‘ . $photoNumber . ‘ photos

‘;
echo ‘

Zip Password: ‘ . $zipPassword . ‘

‘;
echo ‘

Download: TeraBox

‘;

echo ‘

Tips:
    – Pictures viewed online are compressed and watermarked on the images.
    – The pictures in the download link are high-definition without watermark.
    – Recommended to download photo collection for best image quality!

‘;

/* 获取帖子的内容 */
global $post;
$content = $post->post_content;

/* 捕获帖子中的所有URL*/
preg_match_all(‘#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#’, $content, $match);

//遍历所有URL,检查每个URL是否是一个有效的图片链接
$image_urls = [];
foreach($match[0] as $url) {
$ext = strtolower(pathinfo($url, PATHINFO_EXTENSION));
if(in_array($ext, array(‘jpg’, ‘jpeg’, ‘gif’, ‘png’))) {
$image_urls[] = $url;
}
}

/* 输出图片相册 */
if(!empty($image_urls)) {
echo ‘

‘;
}
}
}

get_footer();
?>