{"id":583,"date":"2019-05-02T18:43:42","date_gmt":"2019-05-02T10:43:42","guid":{"rendered":"https:\/\/blog.naibabiji.com\/?p=583"},"modified":"2020-09-21T17:14:33","modified_gmt":"2020-09-21T09:14:33","slug":"wordpress-ping-lun-yan-hua-xiao-guo","status":"publish","type":"post","link":"https:\/\/blog.naibabiji.com\/tutorial\/wordpress-ping-lun-yan-hua-xiao-guo.html","title":{"rendered":"WordPress\u8bc4\u8bba\u754c\u9762\u6dfb\u52a0\u70df\u82b1????\u6548\u679c"},"content":{"rendered":"<p>\u8fd9\u51e0\u5929\u5728\u901b\u522b\u4eba\u535a\u5ba2\u7684\u65f6\u5019\uff0c\u597d\u51e0\u4e2a\u7ad9\u7684\u8bc4\u8bba\u754c\u9762\u6253\u5b57\u90fd\u6709\u793c\u82b1????\u7279\u6548\uff0c\u6709\u7684\u8fd8\u6709\u9707\u52a8\u7279\u6548\uff0c\u6240\u4ee5\u5c31\u53bb\u641c\u4e86\u4e0b\uff0c\u5b9e\u73b0\u7684\u65b9\u6cd5\u975e\u5e38\u7b80\u5355\uff0c\u4e0b\u9762\u5206\u4eab\u4e00\u4e0b\u5b9e\u73b0<a title=\"\u67e5\u770b\u66f4\u591a\u201c\u67e5\u770b\u66f4\u591aWordPress\u201d\u7684\u6587\u7ae0\" href=\"https:\/\/blog.naibabiji.com\/an-zhuang-wordpress\">WordPress<\/a>\u8bc4\u8bba\u6846\u70df\u82b1\u548c\u9707\u52a8\u7279\u6548\u7684\u5b9e\u73b0\u65b9\u6cd5\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-584\" src=\"https:\/\/edgeone.naibabiji.com\/wp-content\/uploads\/2019\/05\/activate-power-mode.gif\" alt=\"\u8bc4\u8bba\u70df\u82b1\u7279\u6548\" width=\"294\" height=\"235\" \/><\/p>\n<p><strong>\u70df\u82b1\u7279\u6548js\u6587\u4ef6\u4e0b\u8f7d\uff1a<\/strong><\/p>\n<p>\u5b9e\u73b0\u793c\u82b1\u7efd\u653e\u7279\u6548\u4e3b\u8981\u5c31\u662f\u4f9d\u9760\u7684\u8fd9\u4e2ajs\u6587\u4ef6\uff0c\u5177\u4f53\u4ee3\u7801\u5982\u4e0b\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u628a\u4e0b\u9762\u7684\u4ee3\u7801\u590d\u5236\u4e86\u65b0\u5efa\u4e3a\u4e00\u4e2ajs\u6587\u4ef6\uff0c\u4e5f\u53ef\u4ee5\u76f4\u63a5\u70b9\u8fd9\u91cc\u4e0b\u3002<a href=\"https:\/\/www.lanzoux.com\/irunRgtj42f\">activate-power-mode.zip<\/a><\/p>\n<pre>(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==='object'&amp;&amp;typeof module==='object')module.exports=factory();else if(typeof define==='function'&amp;&amp;define.amd)define([],factory);else if(typeof exports==='object')exports[\"POWERMODE\"]=factory();else root[\"POWERMODE\"]=factory()})(this,function(){return(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:false};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.loaded=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.p=\"\";return __webpack_require__(0)})([function(module,exports,__webpack_require__){'use strict';var canvas=document.createElement('canvas');canvas.width=window.innerWidth;canvas.height=window.innerHeight;canvas.style.cssText='position:fixed;top:0;left:0;pointer-events:none;z-index:999999';window.addEventListener('resize',function(){canvas.width=window.innerWidth;canvas.height=window.innerHeight});document.body.appendChild(canvas);var context=canvas.getContext('2d');var particles=[];var particlePointer=0;POWERMODE.shake=true;function getRandom(min,max){return Math.random()*(max-min)+min}function getColor(el){if(POWERMODE.colorful){var u=getRandom(0,360);return'hsla('+getRandom(u-10,u+10)+', 100%, '+getRandom(50,80)+'%, '+1+')'}else{return window.getComputedStyle(el).color}}function getCaret(){var el=document.activeElement;var bcr;if(el.tagName==='TEXTAREA'||(el.tagName==='INPUT'&amp;&amp;el.getAttribute('type')==='text')){var offset=__webpack_require__(1)(el,el.selectionStart);bcr=el.getBoundingClientRect();return{x:offset.left+bcr.left,y:offset.top+bcr.top,color:getColor(el)}}var selection=window.getSelection();if(selection.rangeCount){var range=selection.getRangeAt(0);var startNode=range.startContainer;if(startNode.nodeType===document.TEXT_NODE){startNode=startNode.parentNode}bcr=range.getBoundingClientRect();return{x:bcr.left,y:bcr.top,color:getColor(startNode)}}return{x:0,y:0,color:'transparent'}}function createParticle(x,y,color){return{x:x,y:y,alpha:1,color:color,velocity:{x:-1+Math.random()*2,y:-3.5+Math.random()*2}}}function POWERMODE(){{var caret=getCaret();var numParticles=5+Math.round(Math.random()*10);while(numParticles--){particles[particlePointer]=createParticle(caret.x,caret.y,caret.color);particlePointer=(particlePointer+1)%500}}{if(POWERMODE.shake){var intensity=1+2*Math.random();var x=intensity*(Math.random()&gt;0.5?-1:1);var y=intensity*(Math.random()&gt;0.5?-1:1);document.body.style.marginLeft=x+'px';document.body.style.marginTop=y+'px';setTimeout(function(){document.body.style.marginLeft='';document.body.style.marginTop=''},75)}}};POWERMODE.colorful=false;function loop(){requestAnimationFrame(loop);context.clearRect(0,0,canvas.width,canvas.height);for(var i=0;i&lt;particles.length;++i){var particle=particles[i];if(particle.alpha&lt;=0.1)continue;particle.velocity.y+=0.075;particle.x+=particle.velocity.x;particle.y+=particle.velocity.y;particle.alpha*=0.96;context.globalAlpha=particle.alpha;context.fillStyle=particle.color;context.fillRect(Math.round(particle.x-1.5),Math.round(particle.y-1.5),3,3)}}requestAnimationFrame(loop);module.exports=POWERMODE},function(module,exports){(function(){var properties=['direction','boxSizing','width','height','overflowX','overflowY','borderTopWidth','borderRightWidth','borderBottomWidth','borderLeftWidth','borderStyle','paddingTop','paddingRight','paddingBottom','paddingLeft','fontStyle','fontVariant','fontWeight','fontStretch','fontSize','fontSizeAdjust','lineHeight','fontFamily','textAlign','textTransform','textIndent','textDecoration','letterSpacing','wordSpacing','tabSize','MozTabSize'];var isFirefox=window.mozInnerScreenX!=null;function getCaretCoordinates(element,position,options){var debug=options&amp;&amp;options.debug||false;if(debug){var el=document.querySelector('#input-textarea-caret-position-mirror-div');if(el){el.parentNode.removeChild(el)}}var div=document.createElement('div');div.id='input-textarea-caret-position-mirror-div';document.body.appendChild(div);var style=div.style;var computed=window.getComputedStyle?getComputedStyle(element):element.currentStyle;style.whiteSpace='pre-wrap';if(element.nodeName!=='INPUT')style.wordWrap='break-word';style.position='absolute';if(!debug)style.visibility='hidden';properties.forEach(function(prop){style[prop]=computed[prop]});if(isFirefox){if(element.scrollHeight&gt;parseInt(computed.height))style.overflowY='scroll'}else{style.overflow='hidden'}div.textContent=element.value.substring(0,position);if(element.nodeName==='INPUT')div.textContent=div.textContent.replace(\/\\s\/g,\"\\u00a0\");var span=document.createElement('span');span.textContent=element.value.substring(position)||'.';div.appendChild(span);var coordinates={top:span.offsetTop+parseInt(computed['borderTopWidth']),left:span.offsetLeft+parseInt(computed['borderLeftWidth'])};if(debug){span.style.backgroundColor='#aaa'}else{document.body.removeChild(div)}return coordinates}if(typeof module!=\"undefined\"&amp;&amp;typeof module.exports!=\"undefined\"){module.exports=getCaretCoordinates}else{window.getCaretCoordinates=getCaretCoordinates}}())}])});<\/pre>\n<p><strong>\u70df\u82b1\u8bc4\u8bba\u7279\u6548\u5177\u4f53\u5b9e\u73b0\u6b65\u9aa4\uff1a<\/strong><\/p>\n<p>\u628a\u4e0b\u8f7d\u7684js\u6587\u4ef6\u4e0a\u4f20\u5230\u4f60\u7f51\u7ad9\uff0c\u53ef\u4ee5\u4e0a\u4f20\u5230\u4f60\u4e3b\u9898\u6587\u4ef6\u5939\u6216\u8005\u5176\u4ed6\u4f60\u4e60\u60ef\u7684\u6587\u4ef6\u5939\u91cc\u9762\u3002<\/p>\n<p>\u7136\u540e\u7f16\u8f91\u4f60\u4e3b\u9898\u7684\u4e3b\u9898\u9875\u811a (footer.php)\u6587\u4ef6\uff0c\u52a0\u5165\u4e0b\u9762\u8fd9\u4e32\u4ee3\u7801<\/p>\n<pre>&lt;?php if (is_single() || is_page() ) { ?&gt;\r\n&lt;script src=\"&lt;?php bloginfo('template_directory'); ?&gt;\/js\/activate-power-mode.js \"&gt;&lt;\/script&gt; \r\n&lt;script&gt;\r\nPOWERMODE.colorful = true; \/\/ ture \u4e3a\u542f\u7528\u793c\u82b1\u7279\u6548\r\nPOWERMODE.shake = false; \/\/ false \u4e3a\u7981\u7528\u9707\u52a8\u7279\u6548\r\ndocument.body.addEventListener('input', POWERMODE);\r\n&lt;\/script&gt;\r\n&lt;?php }?&gt;<\/pre>\n<p>\u6dfb\u52a0\u4f4d\u7f6e\u4f60\u4e0d\u77e5\u9053\u52a0\u54ea\u91cc\u5c31\u52a0\u5230&lt;\/body&gt;\u6807\u7b7e\u524d\u9762\u3002\u6ce8\u610f\u5982\u679c\u4f60\u4e0d\u662f\u628ajs\u6587\u4ef6\u4e0a\u4f20\u5230\u4f60\u4e3b\u9898\u6587\u4ef6\u5939\u4e0b\u9762\u7684\u5c31\u9700\u8981\u4fee\u6539script src=\u540e\u9762\u7684\u4f4d\u7f6e\u4fe1\u606f\u3002<\/p>\n<p>\u65b9\u6cd5\u6765\u81ea<a href=\"https:\/\/www.ithmz.com\/comment-input-effects.html\" target=\"_blank\" rel=\"noopener noreferrer\">\u4ece\u826f\u672a\u9042<\/a><\/p>\n<p>\u53e6\u5916\uff0c\u5976\u7238\u8fd8\u5206\u4eab\u4e86\u7ed9WordPress\u6dfb\u52a0\u7f51\u9875\u80cc\u666f\u7279\u6548\u7684\u6587\u7ae0\uff0c\u611f\u5174\u8da3\u7684\u8bdd\u770b\u4e00\u770b\uff1a<a href=\"https:\/\/blog.naibabiji.com\/files\/wordpress-shu-biao-xian-duan-te-xiao.html\">\u7ed9WordPress\u7f51\u7ad9\u6dfb\u52a0\u7ebf\u6bb5\u5438\u9644\u9f20\u6807\u7279\u6548<\/a><\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;583&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;4&quot;,&quot;greet&quot;:&quot;\u7ed9\u672c\u6587\u6253\u5206 post&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;WordPress\u8bc4\u8bba\u754c\u9762\u6dfb\u52a0\u70df\u82b1????\u6548\u679c&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\">\u7ed9\u672c\u6587\u6253\u5206 post<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u51e0\u5929\u5728\u901b\u522b\u4eba\u535a\u5ba2\u7684\u65f6\u5019\uff0c\u597d\u51e0\u4e2a\u7ad9\u7684\u8bc4\u8bba\u754c\u9762\u6253\u5b57\u90fd\u6709\u793c\u82b1????\u7279\u6548\uff0c\u6709\u7684\u8fd8\u6709\u9707\u52a8\u7279\u6548\uff0c\u6240\u4ee5\u5c31\u53bb\u641c\u4e86\u4e0b\uff0c\u5b9e\u73b0\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1512,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"WordPress\u8bc4\u8bba\u754c\u9762\u6dfb\u52a0\u70df\u82b1????\u6548\u679c - \u5976\u7238\u5efa\u7ad9\u7b14\u8bb0","description":"\u8fd9\u51e0\u5929\u5728\u901b\u522b\u4eba\u535a\u5ba2\u7684\u65f6\u5019\uff0c\u597d\u51e0\u4e2a\u7ad9\u7684\u8bc4\u8bba\u754c\u9762\u6253\u5b57\u90fd\u6709\u793c\u82b1????\u7279\u6548\uff0c\u6709\u7684\u8fd8\u6709\u9707\u52a8\u7279\u6548\uff0c\u6240\u4ee5\u5c31\u53bb\u641c\u4e86\u4e0b\uff0c\u5b9e\u73b0\u7684\u65b9\u6cd5\u975e\u5e38\u7b80\u5355\uff0c\u4e0b\u9762\u5206\u4eab\u4e00\u4e0b\u5b9e\u73b0 WordPress \u8bc4\u8bba\u6846\u70df\u82b1\u548c\u9707\u52a8\u7279\u6548\u7684\u5b9e\u73b0\u65b9\u6cd5\u3002 \u70df\u82b1\u7279\u6548js\u6587\u4ef6\u4e0b\u8f7d\uff1a \u5b9e\u73b0\u793c\u82b1\u7efd\u653e\u7279\u6548\u4e3b\u8981\u5c31\u662f\u4f9d\u9760\u7684\u8fd9\u4e2ajs\u6587\u4ef6\uff0c\u5177\u4f53\u4ee3\u7801\u5982\u4e0b\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u628a\u4e0b\u9762\u7684\u4ee3\u7801\u590d\u5236\u4e86\u65b0\u5efa\u4e3a\u4e00\u4e2ajs"},"footnotes":""},"categories":[141],"tags":[],"class_list":["post-583","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial"],"_links":{"self":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts\/583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/comments?post=583"}],"version-history":[{"count":0,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts\/583\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/media\/1512"}],"wp:attachment":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/media?parent=583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/categories?post=583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/tags?post=583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}