{"id":740,"date":"2019-09-27T10:46:52","date_gmt":"2019-09-27T02:46:52","guid":{"rendered":"http:\/\/www.laihp.top\/zqb\/?p=740"},"modified":"2019-09-27T17:28:00","modified_gmt":"2019-09-27T09:28:00","slug":"wordpress%e7%9f%ad%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%e6%96%87%e7%ab%a0%e5%86%85%e5%ae%b9%e6%8a%98%e5%8f%a0","status":"publish","type":"post","link":"https:\/\/www.laihp.top\/zqb\/?p=740","title":{"rendered":"WordPress\u77ed\u4ee3\u7801\u5b9e\u73b0\u6587\u7ae0\u5185\u5bb9\u6298\u53e0"},"content":{"rendered":"<h1 class=\"post-title\">WordPress\u77ed\u4ee3\u7801\u5b9e\u73b0\u6587\u7ae0\u5185\u5bb9\u6298\u53e0<\/h1>\n<p><span style=\"font-size: 18pt;\"><strong>1\u3001<\/strong><\/span><\/p>\n<p>\u60f3\u81ea\u884c\u521b\u5efa\u5e93\u548cjs\u6587\u4ef6\u52a0\u8f7d\u7684\u770b\u8fd9\u7b2c\u4e00\u6b65\u3002<strong>\u5982\u679c\u60f3\u76f4\u63a5\u8c03\u7528\u672c\u7f51\u7ad9\u7684\u5e93\u548cjs\u6587\u4ef6\u7684\u53ef\u4ee5\u76f4\u63a5\u8fdb\u884c\u7b2c\u4e8c\u6b65\u3002<\/strong><\/p>\n<p>\u52a0\u8f7djQuery\u5e93\uff08\u5df2\u52a0\u8f7d\u8fc7\u7684\u8bf7\u65e0\u89c6\uff09\u3002<\/p>\n<p>\u521b\u5efaJS\u6587\u4ef6foldcontent.js\u3002\u7136\u540e\u518dhead\u4e2d\u8c03\u7528\uff1a<\/p>\n<p>[scfc id=&#8221;scfctxt&#8221; title=&#8221;foldcontent.js\u5185\u5bb9\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 +++\u70b9\u51fb\u6536\u7f29\/\u5c55\u5f00&#8212;&#8220;]<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">jQuery(function($){\r\n $('.foldcontent-title').css({cursor:\"s-resize\"});\r\n $('span.foldcontent-title').click(function(){\r\n $(this).next('div').slideToggle('500');return false;     \/\/ \u6ce8\u610f\u4e0b\u4e00\u4e2a'div'\u5373\u4e3a\u6298\u53e0\u5185\u5bb9\u7684\u5c3e\u90e8\r\n });\r\n});<\/code><\/pre>\n<p>[\/scfc]<\/p>\n<p><span style=\"font-size: 18pt;\"><strong>2\u3001<\/strong><\/span><\/p>\n<p>\u52a0\u5165\u4ee3\u7801\u5230.\/wp-content\/themes\/$theme\/header.php\u6587\u4ef6\u7684head\u6807\u7b7e\u4e2d\uff1a<\/p>\n<p>[scfc id=&#8221;scfctxt&#8221; title=&#8221;+++\u70b9\u51fb\u6536\u7f29\/\u5c55\u5f00&#8212;&#8220;]<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">\t&lt;style&gt;\r\n\t\t.foldcontent{}\r\n\t\t.foldcontent-title{overflow:auto;white-space:nowrap;}\r\n\t\t#scfccd,#scfctxt,#scfcvd,#scfcpe{\r\n\t\tdisplay:block;     \/*-- \u6ed1\u52a8\u521d\u59cb\u6548\u679c --*\/\r\n\t\tbackground-repeat:no-repeat;     \/*-- \u80cc\u666f\u56fe\u7247\u4e0d\u91cd\u590d --*\/\r\n\t\tposition:relative;     \/*-- \u5b9a\u4f4d --*\/\r\n\t\tcolor:#00c;     \/*-- \u6807\u9898\u9ed8\u8ba4\u989c\u8272 --*\/\r\n\t\t}\r\n\t\t#scfccd:hover,#scfctxt:hover,#scfcvd:hover,#scfcpe:hover{\r\n\t\tcolor:#e14d43;     \/*-- \u9f20\u6807\u7ecf\u8fc7\u53d8\u8272 --*\/\r\n\t\t}\r\n\t\t.foldcontent-content{\r\n\t\tdisplay:block;\r\n\t\t}\r\n\t&lt;\/style&gt;\r\n\t\r\n\t&lt;script src=\"https:\/\/cdn.staticfile.org\/jquery\/1.10.2\/jquery.min.js\"&gt;&lt;\/script&gt;\r\n\t&lt;script type=\"text\/javascript\" src=\"http:\/\/www.laihp.top\/zqb\/wp-content\/themes\/generatepress\/foldcontent.js\"&gt;&lt;\/script&gt;\r\n<\/code><\/pre>\n<p>[\/scfc]<\/p>\n<p><span style=\"font-size: 18pt;\"><strong>3\u3001<\/strong><\/span><\/p>\n<p>\u52a0\u5165\u4ee3\u7801\u5230.\/wp-content\/themes\/$theme\/functions.php\u6587\u4ef6\u4e2d\u9002\u5f53\u4f4d\u7f6e\uff1a<\/p>\n<p>[scfc id=&#8221;scfctxt&#8221; title=&#8221;+++\u70b9\u51fb\u6536\u7f29\/\u5c55\u5f00&#8212;&#8220;]<\/p>\n<pre class=\"pure-highlightjs\">\u00a0<code class=\"null\">function shortcodefoldcontent($atts,$content = null) {\r\n\textract(shortcode_atts(array(\"id\"=&gt;'',\"title\"=&gt;''),$atts));\r\n\t$scfccd = 'fa fa-file-code-o';\r\n\t$scfcpe = 'fa fa-file-picture-o';\r\n\treturn '&lt;div id=\"foldcontent\"&gt;&lt;span class=\"foldcontent-title\" id=\"'.$id.'\" title=\"OPEN\/CLOSE\"&gt;&lt;div style=\"float:right\"&gt;&lt;i class=\"'.$$id.'\"&gt;&lt;\/i&gt;&lt;\/div&gt;&lt;div style=\"float:left\"&gt;'.$title.'&lt;\/div&gt;&lt;\/span&gt;&lt;div class=\"foldcontent-content\" style=\"display:block;\"&gt;'.$content.'&lt;\/div&gt;&lt;\/div&gt;';\r\n}\r\nadd_shortcode(\"scfc\",\"shortcodefoldcontent\");<\/code><\/pre>\n<p>[\/scfc]<\/p>\n<p><span style=\"font-size: 18pt;\"><strong>4\u3001<\/strong><\/span><\/p>\n<p>\u5927\u529f\u544a\u6210\uff0c\u53ea\u9700\u8981\u5728\u6587\u7ae0\u4e2d\u4f7f\u7528\u77ed\u4ee3\u7801\uff1a\uff08<strong>\u4ee5\u4e0b\u4e2d\u6587\u5927\u62ec\u53f7\u6539\u6210\u82f1\u6587\u5927\u62ec\u53f7<\/strong>\uff09<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"php\">\n<p>\u3010scfc id=&#8221;&#8221; title=&#8221;&#8221;]\u5185\u5bb9[\/scfc\u3011<\/p>\n<p>\/** \u53c2\u6570\uff1a scfccd\uff1a\u4ee3\u7801\u56fe\u6807 scfctxt\uff1a\u6587\u6863\u56fe\u6807 scfcvd\uff1a\u89c6\u9891\u56fe\u6807 scfcpe\uff1a\u56fe\u7247\u56fe\u6807<\/p>\n<p>\/\/ \u53ef\u81ea\u884c\u6dfb\u52a0\u6837\u5f0f\uff0cid\u586b\u4ee5\u4e0a\u53c2\u6570\uff0ctitle\u586b\u5199\u8981\u6587\u7ae0\u4e2d\u5c55\u793a\u7684\u6587\u5b57\u3002<\/p>\n<p>\/\/\u6bd4\u5982\u6211\u6587\u7ae0\u4e2d\uff0c\u3010scfc id=&#8221;scfctxt&#8221; title=&#8221;+++\u70b9\u51fb\u6536\u7f29\/\u5c55\u5f00&#8212;&#8220;]**\u5185\u5bb9**[\/scfc\u3011 *\/<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u53c2\u8003\u6587\u732e\uff1a<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"eKoKdEa0wD\"><p><a href=\"http:\/\/www.xhlss.net\/site\/wordpress\/wordpress-loads-the-jquery-library-js-file-css-styles.html\">WordPress\u52a0\u8f7d jQuery\u5e93\u3001js\u6587\u4ef6\u3001css\u6837\u5f0f<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"http:\/\/www.xhlss.net\/site\/wordpress\/wordpress-loads-the-jquery-library-js-file-css-styles.html\/embed#?secret=eKoKdEa0wD\" data-secret=\"eKoKdEa0wD\" width=\"600\" height=\"338\" title=\"\u300aWordPress\u52a0\u8f7d jQuery\u5e93\u3001js\u6587\u4ef6\u3001css\u6837\u5f0f\u300b\u2014\u867e\u7c73\u81ea\u7559\u5730\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress\u77ed\u4ee3\u7801\u5b9e\u73b0\u6587\u7ae0\u5185\u5bb9\u6298\u53e0 1\u3001 \u60f3\u81ea\u884c\u521b\u5efa\u5e93\u548cjs\u6587\u4ef6\u52a0\u8f7d\u7684\u770b\u8fd9\u7b2c\u4e00\u6b65\u3002\u5982\u679c\u60f3\u76f4\u63a5\u8c03\u7528\u672c\u7f51\u7ad9\u7684 &#8230; <a title=\"WordPress\u77ed\u4ee3\u7801\u5b9e\u73b0\u6587\u7ae0\u5185\u5bb9\u6298\u53e0\" class=\"read-more\" href=\"https:\/\/www.laihp.top\/zqb\/?p=740\" aria-label=\"\u7ee7\u7eed\u9605\u8bfbWordPress\u77ed\u4ee3\u7801\u5b9e\u73b0\u6587\u7ae0\u5185\u5bb9\u6298\u53e0\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-740","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts\/740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=740"}],"version-history":[{"count":14,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts\/740\/revisions"}],"predecessor-version":[{"id":754,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=\/wp\/v2\/posts\/740\/revisions\/754"}],"wp:attachment":[{"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laihp.top\/zqb\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}