{"id":28972,"date":"2024-11-25T10:45:27","date_gmt":"2024-11-25T02:45:27","guid":{"rendered":"https:\/\/fwq.ai\/blog\/28972\/"},"modified":"2024-11-25T10:45:27","modified_gmt":"2024-11-25T02:45:27","slug":"wordpress%e6%96%87%e7%ab%a0%e9%98%b2%e5%a4%8d%e5%88%b6%e4%bb%a3%e7%a0%81%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/28972\/","title":{"rendered":"WordPress\u6587\u7ae0\u9632\u590d\u5236\u4ee3\u7801\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>\u901a\u8fc7\u4e0b\u9762\u7684js\u4ee3\u7801\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u9632\u6b62\u522b\u4eba\u76f4\u63a5\u590d\u5236\u62f7\u8d1d\u4f60\u7684\u6587\u7ae0\uff0c\u7528frame\u6807\u7b7e\u5f15\u7528\u4f60\u7684\u6587\u7ae0\u65f6\uff0c\u4f1a\u81ea\u52a8\u8df3\u8f6c\u5230\u6587\u7ae0\u6b63\u5e38\u94fe\u63a5\uff0c\u540c\u65f6\u7981\u6b62\u53f3\u952e\u83dc\u5355\u3002\u4e0b\u9762\u7531\/&#8221; target=&#8221;_blank&#8221;&gt;<strong>wordpress\u6559\u7a0b<\/strong>\u680f\u76ee\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u5177\u4f53\u65b9\u6cd5\u3002<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/020\/5dc4e2100c2be475.jpg\" class=\"aligncenter\" title=\"WordPress\u6587\u7ae0\u9632\u590d\u5236\u4ee3\u7801\u7684\u65b9\u6cd5\u63d2\u56fe\" alt=\"WordPress\u6587\u7ae0\u9632\u590d\u5236\u4ee3\u7801\u7684\u65b9\u6cd5\u63d2\u56fe\" \/><\/p>\n<p><strong>\u4f7f\u7528\u65b9\u6cd5\u4e00\uff1a<\/strong><\/p>\n<p>\u6253\u5f00\u5f53\u524d\u4e3b\u9898\u5934\u90e8\u6a21\u677fheader.php\u627e\u5230\uff1a \u5c06\u4e0b\u9762\u4ee3\u7801\u6dfb\u52a0\u5230\u540e\u9762\uff1a<\/p>\n<pre>&lt;script&gt;\n\/\/ \u7981\u6b62\u53f3\u952e\ndocument.oncontextmenu = function() {\nreturn false\n};\n\/\/ \u7981\u6b62\u56fe\u7247\u62d6\u653e\ndocument.ondragstart = function() {\nreturn false\n};\n\/\/ \u7981\u6b62\u9009\u62e9\u6587\u672c\ndocument.onselectstart = function() {\nif (event.srcElement.type != \"text\" &amp;&amp; event.srcElement.type != \"textarea\" &amp;&amp; event.srcElement.type != \"password\") return false;\nelse return true;\n};\nif (window.sidebar) {\ndocument.onmousedown = function(e) {\nvar obj = e.target;\nif (obj.tagName.toUpperCase() == \"INPUT\" || obj.tagName.toUpperCase() == \"TEXTAREA\" || obj.tagName.toUpperCase() == \"PASSWORD\") return true;\nelse return false;\n}\n};\n\/\/ \u7981\u6b62frame\u6807\u7b7e\u5f15\u7528\nif (parent.frames.length &gt; 0) top.location.replace(document.location);\n&lt;\/script&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u4f7f\u7528\u65b9\u6cd5\u4e8c\uff1a<\/strong><\/p>\n<p>\u4e0a\u9762\u7684\u65b9\u6cd5\u67e5\u770b\u6e90\u4ee3\u7801\u65f6\u6709\u4e9b\u4e71\uff0c\u53ef\u4ee5\u5728\u5f53\u524d\u4e3b\u9898\u76ee\u5f55\u65b0\u5efa\u4e00\u4e2a\u540d\u79f0\u4e3acopyright.js\u6587\u4ef6\uff0c\u5c06\u4e0b\u9762\u4ee3\u7801\u6dfb\u52a0\u8fdb\u53bb\uff1a<\/p>\n<pre>\/\/&nbsp;\u7981\u6b62\u53f3\u952e\ndocument.oncontextmenu&nbsp;=&nbsp;function()&nbsp;{\nreturn&nbsp;false\n};\n\/\/&nbsp;\u7981\u6b62\u56fe\u7247\u62d6\u653e\ndocument.ondragstart&nbsp;=&nbsp;function()&nbsp;{\nreturn&nbsp;false\n};\n\/\/&nbsp;\u7981\u6b62\u9009\u62e9\u6587\u672c\ndocument.onselectstart&nbsp;=&nbsp;function()&nbsp;{\nif&nbsp;(event.srcElement.type&nbsp;!=&nbsp;\"text\"&nbsp;&amp;amp;&amp;amp;&nbsp;event.srcElement.type&nbsp;!=&nbsp;\"textarea\"&nbsp;&amp;amp;&amp;amp;&nbsp;event.srcElement.type&nbsp;!=&nbsp;\"password\")&nbsp;return&nbsp;false;\nelse&nbsp;return&nbsp;true;\n};\nif&nbsp;(window.sidebar)&nbsp;{\ndocument.onmousedown&nbsp;=&nbsp;function(e)&nbsp;{\nvar&nbsp;obj&nbsp;=&nbsp;e.target;\nif&nbsp;(obj.tagName.toUpperCase()&nbsp;==&nbsp;\"INPUT\"&nbsp;||&nbsp;obj.tagName.toUpperCase()&nbsp;==&nbsp;\"TEXTAREA\"&nbsp;||&nbsp;obj.tagName.toUpperCase()&nbsp;==&nbsp;\"PASSWORD\")&nbsp;return&nbsp;true;\nelse&nbsp;return&nbsp;false;\n}\n};\n\/\/&nbsp;\u7981\u6b62frame\u6807\u7b7e\u5f15\u7528\nif&nbsp;(parent.frames.length&nbsp;&amp;gt;&nbsp;0)&nbsp;top.location.replace(document.location);<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u7136\u540e\u518d\u5c06\u4e0b\u9762\u4ee3\u7801\u6dfb\u52a0\u5230\u5f53\u524d\u4e3b\u9898\u51fd\u6570\u6a21\u677ffunctions.php\u7684\u6700\u540e\uff1a<\/p>\n<pre>function&nbsp;copyrightpro_scripts()&nbsp;{\nwp_enqueue_script(&nbsp;'copyright',&nbsp;get_template_directory_uri()&nbsp;.&nbsp;'\/copyright.js',&nbsp;array(),&nbsp;&nbsp;false&nbsp;);\n}\n&nbsp;\nif&nbsp;(!&nbsp;current_user_can('level_10')&nbsp;)&nbsp;{\nadd_action(&nbsp;'wp_enqueue_scripts',&nbsp;'copyrightpro_scripts'&nbsp;);\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee3\u7801\u4e2d\u52a0\u4e86\u5224\u65ad\uff0c\u7ba1\u7406\u5458\u767b\u5f55\u72b6\u6001\u4e00\u4e0b\uff0c\u9632\u590d\u5236\u4ee3\u7801\u65e0\u6548\u3002<\/p>\n<p>\u5f53\u7136\u4e0a\u9762\u7684\u65b9\u6cd5\uff0c\u4e5f\u53ea\u662f\u5ffd\u60a0\u4e00\u4e0b\u5c0f\u767d\uff0c\u6d4f\u89c8\u5668\u7981\u7528JavaScript\u540e\uff0c\u5c06\u5931\u53bb\u6548\u679c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fWordPress\u6587\u7ae0\u9632\u590d\u5236\u4ee3\u7801\u7684\u65b9\u6cd5\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7\u4e0b\u9762\u7684js\u4ee3\u7801\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u9632\u6b62\u522b\u4eba\u76f4\u63a5\u590d\u5236\u62f7\u8d1d\u4f60\u7684\u6587\u7ae0\uff0c\u7528frame\u6807\u7b7e\u5f15\u7528\u4f60\u7684\u6587\u7ae0\u65f6\uff0c\u4f1a\u81ea\u52a8\u8df3\u8f6c\u5230\u6587\u7ae0\u6b63\u5e38\u94fe\u63a5\uff0c\u540c\u65f6\u7981\u6b62\u53f3\u952e\u83dc\u5355\u3002\u4e0b\u9762\u7531\/&#8221; target=&#8221;_blank&#8221;&gt;wordpress\u6559\u7a0b\u680f\u76ee\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u5177\u4f53\u65b9\u6cd5\u3002 \u4f7f\u7528\u65b9\u6cd5\u4e00\uff1a \u6253\u5f00\u5f53\u524d\u4e3b\u9898\u5934\u90e8\u6a21\u677fheader.php\u627e\u5230\uff1a \u5c06\u4e0b\u9762\u4ee3\u7801\u6dfb\u52a0\u5230\u540e\u9762\uff1a &lt;script&gt; \/\/ \u7981\u6b62\u53f3\u952e document.oncontextmenu = function() { return false }; \/\/ \u7981\u6b62\u56fe\u7247\u62d6\u653e document.ondragstart = function() { return false }; \/\/ \u7981\u6b62\u9009\u62e9\u6587\u672c document.onselectstart = function() { if (event.srcElement.type != &#8220;text&#8221; &amp;&amp; event.srcElement.type != &#8220;textarea&#8221; &amp;&amp; event.srcElement.type != &#8220;password&#8221;) return false; else return true; }; if (window.sidebar) { document.onmousedown = function(e) { [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-28972","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/28972","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=28972"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/28972\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=28972"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=28972"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=28972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}