<code id='CDF7491342'></code><style id='CDF7491342'></style>
    • <acronym id='CDF7491342'></acronym>
      <center id='CDF7491342'><center id='CDF7491342'><tfoot id='CDF7491342'></tfoot></center><abbr id='CDF7491342'><dir id='CDF7491342'><tfoot id='CDF7491342'></tfoot><noframes id='CDF7491342'>

    • <optgroup id='CDF7491342'><strike id='CDF7491342'><sup id='CDF7491342'></sup></strike><code id='CDF7491342'></code></optgroup>
        1. <b id='CDF7491342'><label id='CDF7491342'><select id='CDF7491342'><dt id='CDF7491342'><span id='CDF7491342'></span></dt></select></label></b><u id='CDF7491342'></u>
          <i id='CDF7491342'><strike id='CDF7491342'><tt id='CDF7491342'><pre id='CDF7491342'></pre></tt></strike></i>

          WordPress无电子游戏爆分大奖插件外部链接自动添加nofollow标签炸金花app下载免费单机版/金币版/苹果版

          2025-06-20 05:16:08 2

          在wordpress写文章时,当然我们也可以通过代码实现无插件添加方法。严格要求的话是需要在外部链接全部加上nofollow标签。有时内容会引用或分享一些外部链接地址,如果手动电子炸金花app下载免费单机版/金币版/苹果版游戏爆分大奖每个链接加入是很麻烦,

          //文章自动nofollowadd_filter( 'the_content', 'tin_seo_wl');function tin_seo_wl( $content ) {    $regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>";    if(preg_match_all("/$regexp/siU", $content, $matches, PREG_SET_ORDER)) {        if( !empty($matches) ) {               $srcUrl = get_option('siteurl');            for ($i=0; $i < count($matches); $i++)            {                   $tag = $matches[$i][0];                $tag2 = $matches[$i][0];                $url = $matches[$i][0];                   $noFollow = '';                $pattern = '/target\s*=\s*"\s*_blank\s*"/';                preg_match($pattern, $tag2, $match, PREG_OFFSET_CAPTURE);                if( count($match) < 1 )                    $noFollow .= ' target="_blank" ';                   $pattern = '/rel\s*=\s*"\s*[n|d]ofollow\s*"/';                preg_match($pattern, $tag2, $match, PREG_OFFSET_CAPTURE);                if( count($match) < 1 ) $noFollow .= ' rel="nofollow" '; $pos = strpos($url,$srcUrl); if ($pos === false) { $tag = rtrim ($tag,'>');                    $tag .= $noFollow.'>';                    $content = str_replace($tag2,$tag,$content);                }            }        }    }       $content = str_replace(']]>', ']]>', $content);    return $content;}

          添加到当前主题Funcions.php 文件中,在技术层面是有传递出去权重。有些外部链接是没有加Nofollow标签,**炸金花app下载免费单机版/金币版/苹果版ng>电子游戏爆分大奖****当然目前一些wordpress主题设置有这个nofollow标签功能。这样所有的外部链接就会自动加上nofollow标签。可以直接找一些wordpress插件安装。

          本文地址:http://8krn1.xny028cc.com/taste/3-25.html
          版权声明

          本文仅代表作者观点,不代表本站立场。
          本文系作者授权发表,未经许可,不得转载。

          热门标签

          全站热门

          HTML5+CSS3实现列表式音乐播放器特效源码

          WordPress博客网站.htaccess文件的作用

          注册的域名怎么出售卖出去,域名交易渠道有哪些

          8款CSS3鼠标滑过图片动画特效代码

          泰达股份拟出售扬州万运100%股权聚焦生态环保主业

          wordpress响应式清新博客主题Lover

          PHP宝塔安装Swoole Loader扩展教程方法

          图片/书本的文字如何快速提取(复制)?

          友情链接