国产欧美日韩第一页|日本一二三不卡视频|在线精品小视频,亚洲第一免费播放区,metcn人体亚洲一区,亚洲精品午夜视频

wodpress博客的評論外鏈加上跳轉的方法

2016-06-02 08:21:05 7349

wodpress博客的評論外鏈已經(jīng)是許多博主不可接受的一種程度了,我們下面來(lái)給各位介紹一篇把外連通過(guò)修改成跳轉的連接了,這樣不會(huì )影響到網(wǎng)站權重了.

模板function.php添加下面的代碼:

  1. /**博客的評論里的外鏈轉內鏈**/ 

  2. add_filter('get_comment_author_link','add_redirect_comment_link', 5); 

  3. add_filter('comment_text''add_redirect_comment_link', 99); 

  4. function add_redirect_comment_link($text''){ 

  5.   $text=str_replace('href="','href="'.get_option('home').'/goto.php?url='$text); 

  6.   $text=str_replace("href='","href='".get_option('home')."/goto.php?url="$text); //phpfensi.com 

  7.   return$text

上面的代碼其實(shí)就是把頁(yè)面顯示的鏈接都修改成http://www.tjdsmy.cn/goto.php?url=【網(wǎng)站鏈接】

新建goto.php,放到跟目錄下.

  1. <!doctype html> 

  2. <html lang="en"> 

  3. <head> 

  4. <meta charset="UTF-8"> 

  5. <meta name="Author" content=""> 

  6. <meta name="Keywords" content=""> 

  7. <meta name="Description" content=""> 

  8. <meta name="robots"content="noindex,nofollow"> 

  9.  

  10. <meta http-equiv="refresh"content="3;url=<?php $url=$_GET['url']; echo htmlspecialchars($url);?>"> 

  11. <title>跳轉頁(yè)面</title> 

  12. <style> 

  13. .spinner { 

  14. margin: 100px auto 0; 

  15. width: 150px; 

  16. text-align: center; 

  17.  

  18. .spinner > div { 

  19. width: 30px; 

  20. height: 30px; 

  21.  

  22.  

  23. border-radius: 100%; 

  24. display: inline-block; 

  25. -webkit-animation: bouncedelay 1.4s infinite ease-in-out; 

  26. animation: bouncedelay 1.4s infinite ease-in-out; 

  27. /* Prevent first frame from flickering when animation starts */ 

  28. -webkit-animation-fill-mode: both; 

  29. animation-fill-mode: both; 

  30.  

  31. .spinner .bounce1 { 

  32. -webkit-animation-delay: -0.32s; 

  33. animation-delay: -0.32s; 

  34. background-color: #428bca; 

  35.  

  36. .spinner .bounce2 { 

  37. -webkit-animation-delay: -0.16s; 

  38. animation-delay: -0.16s; 

  39. background-color: #Dd534F; 

  40.  

  41. .spinner .bounce3 { 

  42. -webkit-animation-delay: -0.01s; 

  43. animation-delay: -0.01s; 

  44. background-color: #67CF22; 

  45.  

  46. @-webkit-keyframes bouncedelay { 

  47. 0%, 80%, 100% { -webkit-transform: scale(0.0) } 

  48. 40% { -webkit-transform: scale(1.0) } 

  49.  

  50. @keyframes bouncedelay { 

  51. 0%, 80%, 100% { 

  52. transform: scale(0.0); 

  53. -webkit-transform: scale(0.0); 

  54. } 40% { 

  55. transform: scale(1.0); 

  56. -webkit-transform: scale(1.0); 

  57. </style> 

  58. </head> 

  59. <body> 

  60. <div class="spinner"> 

  61. <div class="bounce1"></div> 

  62. <div class="bounce2"></div> 

  63. <div class="bounce3"></div> 

  64. </div> 

  65. </body> 

  66. </html> 


提交成功!非常感謝您的反饋,我們會(huì )繼續努力做到更好!

這條文檔是否有幫助解決問(wèn)題?

非常抱歉未能幫助到您。為了給您提供更好的服務(wù),我們很需要您進(jìn)一步的反饋信息:

在文檔使用中是否遇到以下問(wèn)題:
-->