WPOPT插件 外链跳转模板
介绍
WPOPT插件 外链跳转模板是一个可以让网站点击链接在到达时生成一个中间页
插件官网
【WordPress优化插件】WPOPT v2.4.5 - Lovestu
代码安装
在这个目录下,/wp-content/plugins/wp-opt/pages/link-template
创建一个PHP文件
并把代码放进去。
<?php
/**
* name:小P的个人笔记
*/
global $url;
$iconUrl = "https://ico.n3v.cn/get.php?url=" . urlencode($url);
$defaultIcon = "https://cdn.panxp.com/img/2/2025/03/23/67dee073969d9.png"; // 默认图标
?>
<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>小P的个人笔记 - 安全中心</title>
<meta name="robots" content="noindex, nofollow">
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background: linear-gradient(135deg, #EFF2F5, #d1e4fa);
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
main {
max-width: 600px;
width: 90%;
margin: auto;
animation: fadeIn 0.5s ease-in-out;
}
.main-box {
border: 1px solid #f0f0f0;
background: #fff;
padding: 30px;
border-radius: 15px;
line-height: 1.6;
color: #333;
font-size: 16px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
text-align: center;
}
.t-1 {
font-size: 24px;
font-weight: bold;
margin-bottom: 15px;
color: #0a7aff;
}
.icon {
margin: 20px 0;
}
.icon img {
width: 48px;
height: 48px;
border-radius: 50%;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
display: block;
margin: 0 auto;
}
.url {
margin: 20px 0;
padding: 10px;
background: #f9f9f9;
border-radius: 5px;
word-break: break-all;
color: #555;
}
.footer {
border-top: 1px solid #f0f0f0;
text-align: right;
padding-top: 20px;
}
a {
color: #fff;
text-decoration: none;
}
button {
border: none;
background: #0a7aff;
color: #fff;
padding: 12px 20px;
border-radius: 5px;
cursor: pointer;
transition: background 0.3s ease;
}
button:hover {
background: #005bb5;
}
.warning {
color: #ff4d4d;
font-weight: bold;
margin-top: 15px;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
</style>
</head>
<body>
<main>
<div class="main-box">
<div class="t-1">即将离开本站</div>
<div>您即将离开本站,请注意您的帐号和财产安全。</div>
<div class="icon">
<img src="<?php echo $iconUrl; ?>" onerror="this.src='<?php echo $defaultIcon; ?>'" alt="网站图标">
</div>
<div class="url"><?php echo $url ?></div>
<div class="warning">警告:请确保您信任该链接,以防止钓鱼网站或恶意软件。</div>
<div class="footer">
<button><a href="<?php echo $url ?>">继续访问</a></button>
</div>
</div>
</main>
</body>
</html>
版权声明
1:文章:WPOPT插件 外链跳转模板
2:链接:https://www.panxp.com/600.html
3:文章内容来源于网络,仅供大家学习与交流,如下载了本站中的任何资源,请于24小时内删除,如有侵犯您的权益,请发送邮件至silverornament@qq.com,我们会在24小时内删除处理。
4 本站一切资源不代表本站立场,不代表本站赞同其观点和对其真实性负责。
5 如您发现本站提供资源链接失效或有违规现象,请联系我们处理。
1:文章:WPOPT插件 外链跳转模板
2:链接:https://www.panxp.com/600.html
3:文章内容来源于网络,仅供大家学习与交流,如下载了本站中的任何资源,请于24小时内删除,如有侵犯您的权益,请发送邮件至silverornament@qq.com,我们会在24小时内删除处理。
4 本站一切资源不代表本站立场,不代表本站赞同其观点和对其真实性负责。
5 如您发现本站提供资源链接失效或有违规现象,请联系我们处理。
THE END

0

打赏

分享

二维码

海报
发表评论
您需要登录后评论
赶快来坐沙发