前言
最近果核更新了 WPOPT 插件到 2.4.5 版本,从该版本开始,集成了外链跳转插件的功能,同时支持自定义外链跳转界面的模板,于是我也把直接写的针对wp外链跳转插件的模板给移植过来了。
使用方法
查看果核的官方文档:https://www.yuque.com/applek/wpopt/link
自定义内容部分参照注释修改对应对位置的内容即可。
效果一
样式

代码
<?php
/**
* name:广然笔记外链模板
*/
global $url;
?>
<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" href="https://logo.grbj.cn/favicon.ico" type="image/x-icon"/><!--favicon图片地址-->
<title>广然笔记 - 安全中心</title><!--修改文字-->
<style>
body { margin: 0; font-family: 'PingFangSC', sans-serif; background-color: #EFF4FA; }
.go-wild-box { display: flex; justify-content: center; align-items: center; height: 100vh; }
.go-wild-container { width: 770px; height: 330px; max-width: 90%; padding: 90px 15px; background-color: #fff; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); text-align: center; }
.logo-img { width: 120px; height: auto; }
.tips-title { margin: 20px 0; font-size: 22px; color: #2a3c59; font-weight: 500; }
.address { margin-bottom: 20px; padding: 15px; background-color: #EFF4FA; border-radius: 8px; color: #2a3c59; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 80%; max-width: 600px; margin: 0 auto; }
.tips-subtitle { font-size: 14px; color: #2a3c59; margin-bottom: 30px;margin-top: 20px; }
.btn-groups { display: flex; justify-content: center; gap: 10px; margin-top: 60px; }
.ant-btn { width: 152px; height: 44px; line-height: 44px; border-radius: 20px; border: none; cursor: pointer; font-size: 14px; transition: all 0.3s ease; }
.ant-btn-primary { background: linear-gradient(152deg, #07C160 0%, #07c183 100%); color: #fff; }
.ant-btn-default { background-color: #fff; color: #2a3c59; border: 1px solid #ccc; }
.ant-btn-default:hover { background-color: #fff; border-color: #07C160; color: #07C160; }
</style>
</head>
<body>
<div class="go-wild-box">
<div class="go-wild-container">
<a href="https://www.grbj.cn/">
<img alt="广然笔记" src="https://logo.grbj.cn/logo_black.png" class="logo-img" /><!--修改Logo地址-->
</a>
<div class="tips-title">您即将从广然笔记跳转到外部网站</div><!--修改文字-->
<div class="address"><?php echo $url ?></div>
<div class="tips-subtitle">请注意您的账号和财产安全</div>
<div class="btn-groups">
<button onclick="try { window.close(); } catch(e) { alert('请手动关闭此页面'); }" type="button" class="ant-btn ant-btn-default">取消访问</button>
<a href="<?php echo htmlspecialchars($link); ?><?php echo $url ?>" rel="nofollow">
<button type="button" class="ant-btn ant-btn-primary">继续访问</button>
</a>
</div>
</div>
</div>
</body>
</html>
效果二
样式

代码
<?php
/**
* name:仿CSDN模板
*/
global $url;
?>
<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" href="https://logo.grbj.cn/favicon.ico" type="image/x-icon"/>
<title>广然笔记 - 安全中心</title>
<style>
html{background:#f4f5f5;}#box{margin:auto;background:#fff;padding:35px 30px 15px 30px;max-width:500px;box-sizing:border-box;border:1px solid #e5e6eb;border-radius:15px;}.note{font-size:18px;line-height:20px;}.link{padding:10px 0 10px;position:relative;color:gray;font-family:"PingFang SC";font-size:14px;word-break:break-all;}.btn-plane{text-align:right;}button{margin-top:10px;color:#248888;border-radius:25px;border:2px solid #248888;background:#fff;height:42px;font-size:14px;padding:0 24px;cursor:pointer;outline:0;}button a{color:#248888;text-decoration:none}.logo-img{text-align:center;margin-top:13%;display:block;margin-bottom:16px;}.link-a{color:#248888;}.loading-img{width:23px;height:23px;}.loading-text{font-size:18px;font-weight:600;color:#222226;line-height:22px;display: flex;align-items: center;}img{vertical-align:middle;}
</style>
</head>
<body>
<div class="logo-img">
<a href="https://www.grbj.cn/"> <img alt= "广然笔记" src="https://logo.grbj.cn/logo_black.png" style="width:150px;height:auto;" /> </a>
</div>
<div id="box">
<div class="loading-text"><div><svg t="1742641887877" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2621" width="30" height="30"><path d="M957.6 872l-432-736c-6.4-10.4-21.6-10.4-27.2 0l-432 736c-6.4 10.4 1.6 24 13.6 24h864c12 0 20-13.6 13.6-24z m-416-104h-64v-64h64v64z m-63.2-128V384h64v256h-64z" p-id="2622" fill="#d81e06"></path></svg></div> 请注意您的账号和财产安全</div>
<p class="link">您即将离开《广然笔记》,去往:<a class="link-a"><?php echo $url ?></p></a>
<p class="btn-plane">
<a href="<?php echo $url ?>" rel="nofollow"><button>继续访问</button></a>
</p>
</div>
</body>
</html>


![[openEuler实验]部署和管理个人博客系统WordPress](https://images.grbj.cn/202501100344817.png)







