{"id":1475,"date":"2019-12-23T23:56:40","date_gmt":"2019-12-23T14:56:40","guid":{"rendered":"https:\/\/oboki.net\/workspace\/?p=1475"},"modified":"2020-01-05T14:04:53","modified_gmt":"2020-01-05T05:04:53","slug":"customized-theme-%ec%97%85%eb%8d%b0%ec%9d%b4%ed%8a%b8","status":"publish","type":"post","link":"https:\/\/oboki.net\/workspace\/wordpress\/customized-theme-%ec%97%85%eb%8d%b0%ec%9d%b4%ed%8a%b8\/","title":{"rendered":"[WordPress] customized theme \uc5c5\ub370\uc774\ud2b8"},"content":{"rendered":"<p>\uc6cc\ub4dc\ud504\ub808\uc2a4\ub97c \uc774\uc6a9\ud558\ub294 \uc7a5\uc810 \uc911 \ud558\ub098\uac00 \uc218\ub9ce\uc740 \ub514\uc790\uc774\ub108, \uac1c\ubc1c\uc790\ub4e4\uc774 \ub9cc\ub4e4\uc5b4\ub193\uc740 \ud14c\ub9c8\uac00 \uc788\uc5b4\uc11c \uc6f9\uc0ac\uc774\ud2b8 \ucee8\uc149\uc5d0 \ub9de\ub294 \uac83\uc744 \uace8\ub77c \uc801\uc6a9\ub9cc \ud558\uba74 \ub41c\ub2e4\ub294 \uac83\uc774\ub2e4. \ubb3c\ub860 \uc644\ubcbd\ud558\uac8c \ub0b4 \uc785\ub9db\uc5d0 \ub9de\ub294 \ud14c\ub9c8\ub97c \ucc3e\uc744 \uc218\ub294 \uc5c6\uace0 \uc601\ubbf8\uad8c \uc9c0\uc5ed\uc744 \ub300\uc0c1\uc73c\ub85c\ud55c \uac83\uc774 \ub300\ubd80\ubd84\uc774\uae30 \ub54c\ubb38\uc5d0, \ud070 \ud2c0\ub9cc \ub9de\uc73c\uba74 \uac00\uc838\ub2e4\uac00 \ucee4\uc2a4\ud130\ub9c8\uc774\uc9d5 \ud574\uc11c \uc0ac\uc6a9\ud558\uace0 \uc788\ub2e4.<\/p>\n<p>\ud50c\ub7ec\uadf8\uc778\uc744 \uc774\uc6a9\ud55c\ub2e4\uba74 \ud14c\ub9c8\ub294 \uc6d0\ubcf8 \uadf8\ub798\ub3c4 \ub194\ub450\uace0 \uc2a4\ud0c0\uc77c\uc2dc\ud2b8, \uc678\ubd80 \ub77c\uc774\ube0c\ub7ec\ub9ac \ub9c1\ud06c, functions \ub530\uc704\ub97c \ub36e\uc5b4\uc4f0\uae30 \ud615\ud0dc\ub85c \ubcc0\ud615\ud560 \uc218\ub294 \uc788\uc9c0\ub9cc \ud50c\ub7ec\uadf8\uc778\uc774 \ub298\uc5b4\ub0a0\uc218\ub85d \uad00\ub9ac\ud3ec\uc778\ud2b8\uac00 \ub9ce\uc544\uc9c0\ub294 \uac83\uc774\uae30\ub3c4 \ud558\uace0, \uac80\uc99d\ub41c(?) \ud50c\ub7ec\uadf8\uc778\uc778\uc9c0 \ud655\uc778\ud558\ub294 \ubc88\uac70\ub85c\uc6b4 \uc808\ucc28\ub3c4 \ud544\uc694\ud558\ub2e4.<\/p>\n<p>\ud50c\ub7ec\uadf8\uc778 \uc0ac\uc6a9 \uc5c6\uc774 <code>highlight.js<\/code>\uc640 \uac19\uc740 \ucd94\uac00 \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc801\uc6a9\ud558\uac70\ub098 <code>google analytics<\/code>, <code>google adsense<\/code> \ub97c \uc801\uc6a9\ud558\uae30 \uc704\ud574\uc11c \uc57d\uac04\uc758 \uc218\uc815\uc744 \ud558\ub294 \uacbd\uc6b0\uac00 \ub9ce\uc740\ub370, \uc774\ub807\uac8c \uc0ac\uc6a9\ud558\ub294 \uacbd\uc6b0 \ubf08\ub300\ub85c \uc0bc\uc558\ub358 \ud14c\ub9c8\ub97c \uadf8\ub0e5 \uc5c5\ub370\uc774\ud2b8\ud558\uba74 \ucee4\uc2a4\ud130\ub9c8\uc774\uc9d5\ud588\ub358 \ub0b4\uc6a9\uc774 \ubaa8\ub450 \ub36e\uc5b4\uc4f0\uc5ec\uc9c0\ub294 \ubb38\uc81c\uac00 \ubc1c\uc0dd\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p>\uadf8\ub9ac\uace0 \uc6cc\ub4dc\ud504\ub808\uc2a4\ub294 \ud14c\ub9c8 \uc790\uccb4\uc758 \ubc84\uadf8\ub098 \uc6cc\ub4dc\ud504\ub808\uc2a4 \ucf54\uc5b4 \ud328\uce58\ub97c \ubc18\uc601\ud558\uc9c0 \uc54a\uc740 \ubb38\uc81c\ub85c \uc778\ud55c \ucde8\uc57d\uc810\uc774 \ubc1c\uc0dd\ud560 \uc218 \uc788\uace0 \uc5c5\ub370\uc774\ud2b8\ub85c \ucd5c\uc801\ud654\uac00 \ub418\uae30\ub3c4 \ud558\uae30\ub54c\ubb38\uc5d0, \ud14c\ub9c8\uac00 \uc5c5\ub370\uc774\ud2b8 \ub54c\ub9c8\ub2e4 \ubc18\uc601\ud574\uc8fc\ub294 \uac83\uc774 \uc88b\ub2e4.<\/p>\n<h2>\uc5c5\ub370\uc774\ud2b8 \uc808\ucc28<\/h2>\n<p>\uc5b4\uca0b\ub4e0 \uc774\ub807\uac8c \ud55c\ub540\ud55c\ub540 \uc218\uc791\uc5c5\uc73c\ub85c \ucee4\uc2a4\ud130\ub9c8\uc774\uc9d5 \ud55c \uacbd\uc6b0\uc5d0 \ub0b4\uac00 \uc5c5\ub370\uc774\ud2b8\ub97c \ubc18\uc601(?)\ud558\ub294 \ubc29\ubc95\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4. <del>git \uc744 \uc774\uc6a9\ud55c\ub2e4\uba74 \uc880 \ub354 \ud3b8\ud558\uace0 \uc548\uc815\uc801\uc77c \uc218 \uc788\ub294\ub370 \uae30\ubcf8(?) \ucee8\uc149\uc740 \uac19\ub2e4.<\/del><\/p>\n<ol>\n<li>\uae30\uc874 \ud14c\ub9c8 \ubc31\uc5c5<\/li>\n<li>\ud14c\ub9c8 \uc5c5\ub370\uc774\ud2b8 \uc801\uc6a9<\/li>\n<li>difference \ud655\uc778<\/li>\n<li>\ud55c\ub540\ud55c\ub540 \uc218\uc815<\/li>\n<\/ol>\n<h3>1. \uae30\uc874 \ud14c\ub9c8 \ubc31\uc5c5<\/h3>\n<p>\uc6f9\uc11c\ubc84, <code>$WP_DIR\/wp-content\/themes<\/code> \uacbd\ub85c\uc5d0\uc11c <code>cp -r<\/code> \uba85\ub839\uc73c\ub85c \ubcf5\uc0ac<\/p>\n<pre><code class=\"language-bash\">THEME_NAME=twentytwenty\ncp -r ${THEME_NAME} ${THEME_NAME}_old<\/code><\/pre>\n<h3>2. \ud14c\ub9c8 \uc5c5\ub370\uc774\ud2b8 \uc801\uc6a9<\/h3>\n<p>\uc6f9\ube0c\ub77c\uc6b0\uc800, <code>$WP_URL\/wp-admin\/themes.php<\/code> \uc5d0\uc11c \ud574\ub2f9 \ud14c\ub9c8 \uc5c5\ub370\uc774\ud2b8 \ubc84\ud2bc \ud074\ub9ad<\/p>\n<h3>3. diff \ud655\uc778<\/h3>\n<p>\uc6f9\uc11c\ubc84\uc5d0\uc11c \uc544\ub798\uc640 \uac19\uc774 \ubaa8\ub4e0 \ud14c\ub9c8 \ud30c\uc77c\uc5d0 \ub300\ud574 \ubcc0\uacbd\uc0ac\ud56d \uc870\ud68c<\/p>\n<pre><code class=\"language-bash\">WP_DIR=\/var\/www\nTHEME_NAME=twentytwenty\ncd $WP_DIR\/wp-content\/themes\/${THEME_NAME}_old\nfor i in `find -type f`; do\n    dcnt=`diff ${i} ..\/${THEME_NAME}\/${i} | wc -l`\n    if [ ${dcnt} -ne 0 ]; then\n        echo &quot;file&quot; ${i} &quot;has&quot; ${dcnt} &quot;difference(s).&quot;\n    fi\ndone<\/code><\/pre>\n<p>\uc544\ub798\uc640 \uac19\uc774 10\uac1c \ud30c\uc77c\uc5d0\uc11c \ubcc0\uacbd\uc0ac\ud56d\uc774 \ud655\uc778\ub410\ub294\ub370 \ud328\uce58\ub85c \uc778\ud55c \uac83\uc778\uc9c0 \ucee4\uc2a4\ud130\ub9c8\uc774\uc9d5\uc73c\ub85c \uc778\ud55c \uac83\uc778\uc9c0\ub294 \ud655\uc778\ud574\ubd10\uc57c\uaca0\uc9c0\ub9cc \uc5b4\uca43\ub4e0 \ud55c\ub540\ud55c\ub540 \uace0\uccd0\ubd10\uc57c\uaca0\ub2e4.<\/p>\n<pre><code class=\"language-txt\">file .\/inc\/customizer.php has 805 difference(s).\nfile .\/inc\/functions-template.php has 10 difference(s).\nfile .\/single.php has 29 difference(s).\nfile .\/index.php has 10 difference(s).\nfile .\/style.css has 34 difference(s).\nfile .\/archive.php has 10 difference(s).\nfile .\/search.php has 5 difference(s).\nfile .\/404.php has 5 difference(s).\nfile .\/header.php has 54 difference(s).\nfile .\/functions.php has 55 difference(s).<\/code><\/pre>\n<h3>4. \ud55c\ub540\ud55c\ub540 \uc218\uc815<\/h3>\n<p><code>vimdiff<\/code> \ub85c \ub208\uc73c\ub85c \uc77c\uc77c\uc774 \ube44\uad50\ud558\uba74\uc11c \uace0\uccd0\ub098\uac00\uba74 \uc27d\ub2e4. \uc704 loop \uc5d0\uc11c \ubcc0\ub3d9\uc0ac\ud56d\uc774 \uc788\ub294 \ud30c\uc77c\uc5d0 \ub300\ud574\uc11c vimdiff \uba85\ub839\uc744 \ubf51\uc544\ub0b4\uba74 \uc880 \ub354 \uc218\uc6d4\ud558\uac8c \uc9c4\ud589\ud560 \uc218 \uc788\ub2e4.<\/p>\n<pre><code class=\"language-bash\">for i in `find -type f`; do\n    dcnt=`diff ${i} ..\/${THEME_NAME}\/${i} | wc -l`\n    if [ ${dcnt} -ne 0 ]; then\n        echo &quot;vimdiff ${i} ..\/${THEME_NAME}\/${i}&quot;\n    fi\ndone<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\uc6cc\ub4dc\ud504\ub808\uc2a4\ub97c \uc774\uc6a9\ud558\ub294 \uc7a5\uc810 \uc911 \ud558\ub098\uac00 \uc218\ub9ce\uc740 \ub514\uc790\uc774\ub108, \uac1c\ubc1c\uc790\ub4e4\uc774 \ub9cc\ub4e4\uc5b4\ub193\uc740 \ud14c\ub9c8\uac00 \uc788\uc5b4\uc11c \uc6f9\uc0ac\uc774\ud2b8 \ucee8\uc149\uc5d0 \ub9de\ub294 \uac83\uc744 \uace8\ub77c \uc801\uc6a9\ub9cc \ud558\uba74 \ub41c\ub2e4\ub294 \uac83\uc774\ub2e4. \ubb3c\ub860 \uc644\ubcbd\ud558\uac8c \ub0b4 \uc785\ub9db\uc5d0 \ub9de\ub294 \ud14c\ub9c8\ub97c \ucc3e\uc744 \uc218\ub294 \uc5c6\uace0 \uc601\ubbf8\uad8c \uc9c0\uc5ed\uc744 \ub300\uc0c1\uc73c\ub85c\ud55c \uac83\uc774 \ub300\ubd80\ubd84\uc774\uae30 \ub54c\ubb38\uc5d0, \ud070 \ud2c0\ub9cc \ub9de\uc73c\uba74 \uac00\uc838\ub2e4\uac00 \ucee4\uc2a4\ud130\ub9c8\uc774\uc9d5 \ud574\uc11c \uc0ac\uc6a9\ud558\uace0 \uc788\ub2e4. \ud50c\ub7ec\uadf8\uc778\uc744 \uc774\uc6a9\ud55c\ub2e4\uba74 \ud14c\ub9c8\ub294 \uc6d0\ubcf8 \uadf8\ub798\ub3c4 \ub194\ub450\uace0 \uc2a4\ud0c0\uc77c\uc2dc\ud2b8, \uc678\ubd80 \ub77c\uc774\ube0c\ub7ec\ub9ac \ub9c1\ud06c, functions \ub530\uc704\ub97c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-1475","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts\/1475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/comments?post=1475"}],"version-history":[{"count":0,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts\/1475\/revisions"}],"wp:attachment":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/media?parent=1475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/categories?post=1475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/tags?post=1475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}