WordPress内容被复制后自动添加文章链接

前端之家收集整理的这篇文章主要介绍了WordPress内容被复制后自动添加文章链接前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

的过程中,站长朋友们会发现自己在WordPress网站辛辛苦苦写的内容,很容易就被别人复制了,这是非常常见的事,这篇WordPress教程中,我们教您给自己的WordPress站点添加一个功能:内容被复制后,粘贴的时候自动在内容后面添加文章链接。

切换到主题目录,打开 functions.php 文件,加入以下代码:

Crayon-main" style="">Crayon-table">Crayon-row">
Crayon-nums " data-settings="show">
Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-1">1
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-2">2
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-3">3
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-4">4
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-5">5
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-6">6
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-7">7
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-8">8
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-9">9
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-10">10
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-11">11
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-12">12
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-13">13
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-14">14
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-15">15
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-16">16
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-17">17
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-18">18
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-19">19
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-20">20
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-21">21
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-22">22
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-23">23
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-24">24
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-25">25
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-26">26
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-27">27
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-28">28
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-29">29
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-30">30
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-31">31
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-32">32
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-33">33
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-34">34
Crayon-num" data-line="Crayon-5c891cbbe2cbe422352079-35">35
Crayon-num Crayon-striped-num" data-line="Crayon-5c891cbbe2cbe422352079-36">36
Crayon-code">
Crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
Crayon-line" id="Crayon-5c891cbbe2cbe422352079-1">Crayon-t">functionCrayon-h"> Crayon-e">add_copyright_textCrayon-sy">(Crayon-sy">)Crayon-h"> Crayon-sy">{
Crayon-line Crayon-striped-line" id="Crayon-5c891cbbe2cbe422352079-2">Crayon-h">Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-e">is_singleCrayon-sy">(Crayon-sy">)Crayon-sy">)Crayon-h"> Crayon-sy">{Crayon-h">
Crayon-line" id="Crayon-5c891cbbe2cbe422352079-3">Crayon-h">
Crayon-line Crayon-striped-line" id="Crayon-5c891cbbe2cbe422352079-4">Crayon-ta">
Crayon-line" id="Crayon-5c891cbbe2cbe422352079-31">
Crayon-line Crayon-striped-line" id="Crayon-5c891cbbe2cbe422352079-32">Crayon-ta">PHP
Crayon-line" id="Crayon-5c891cbbe2cbe422352079-33">Crayon-sy">}
Crayon-line Crayon-striped-line" id="Crayon-5c891cbbe2cbe422352079-34">Crayon-sy">}
Crayon-line" id="Crayon-5c891cbbe2cbe422352079-35">Crayon-h">
Crayon-line Crayon-striped-line" id="Crayon-5c891cbbe2cbe422352079-36">Crayon-e">add_actionCrayon-sy">(Crayon-h"> Crayon-s">'wp_head'Crayon-sy">,Crayon-h"> Crayon-s">'add_copyright_text'Crayon-sy">)Crayon-sy">;

注意:本方法只能防防君子,对于那些非要复制您内容的人来说是起不到作用的。

原文链接:https://www.f2er.com/wordpress/238365.html

猜你在找的wordpress相关文章