{"id":785,"date":"2014-03-31T16:58:17","date_gmt":"2014-03-31T07:58:17","guid":{"rendered":"http:\/\/lovelinux.mydns.jp\/?p=785"},"modified":"2014-03-31T19:13:46","modified_gmt":"2014-03-31T10:13:46","slug":"wordpress%e3%81%ae%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e4%bd%9c%e6%88%90%ef%bc%88%e4%bd%9c%e6%88%90%e6%89%8b%e9%a0%86%e7%b7%a8%ef%bc%89","status":"publish","type":"post","link":"https:\/\/lovelinux.mydns.jp\/?p=785","title":{"rendered":"WordPress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u4f5c\u6210\uff08\u4f5c\u6210\u624b\u9806\u7de8\uff09"},"content":{"rendered":"<p>\uff11\u9031\u9593\u307b\u3069\u524d\u306b\u3001\u6025\u306bWordpress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u4f5c\u308a\u305f\u304f\u306a\u3063\u3066\u3001\uff12\u65e5\u9593\u307b\u3069\u6c17\u5408\u3092\u5165\u308c\u3066\u5b9f\u88c5\u3057\u305f\u3002\u4f5c\u6210\u624b\u9806\u7de8\u3067\u306f\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u4f5c\u6210\u306e\u521d\u6b69\u304b\u3089\u3001Wordpress.org\u3078\u306e\u7533\u8acb\u307e\u3067\u306e\u624b\u9806\u3092\u8aac\u660e\u3059\u308b\u3002<\/p>\n<p class=\"point1\"><i class=\"fa fa-hand-o-right\"><\/i>\u30d7\u30e9\u30b0\u30a4\u30f3\u4f5c\u6210\u306e\u304a\u4f5c\u6cd5\u3092\u8abf\u3079\u308b\u306e\u306b\u5c11\u3005\u6642\u9593\u304c\u304b\u304b\u308b<\/p>\n<p class=\"point1\"><i class=\"fa fa-hand-o-right\"><\/i>\u30bd\u30fc\u30b9\u306e\u5b9f\u88c5\u81ea\u4f53\u306f\u3001\u305f\u3060\u306ePHP\u306a\u306e\u3067\u305d\u308c\u307b\u3069\u96e3\u3057\u304f\u306f\u306a\u3044<\/p>\n<p class=\"point1\"><i class=\"fa fa-hand-o-right\"><\/i>\u591a\u8a00\u8a9e\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306e\u60c5\u5831\u53ce\u96c6\uff06\u5b9f\u88c5 \u306b\u306f\u3061\u3087\u3063\u3068\u6642\u9593\u304c\u5fc5\u8981<\/p>\n<p class=\"point1\"><i class=\"fa fa-hand-o-right\"><\/i>\u7533\u8acb\u306e\u305f\u3081\u306b\u5fc5\u8981\u306aWordpress \u30d7\u30e9\u30b0\u30a4\u30f3\u66f8\u5f0f\u306b\u5247\u3063\u305fReadme.txt\u3092\u4f5c\u308b\u306e\u304c\u3060\u308b\u3044<\/p>\n<p class=\"point1\"><i class=\"fa fa-hand-o-right\"><\/i>WordPress.org\u306e\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u3059\u308b<\/p>\n<p class=\"point1\"><i class=\"fa fa-hand-o-right\"><\/i>\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u7533\u8acb\u3092\u51fa\u3059\u3002<\/p>\n<p class=\"point1\"><i class=\"fa fa-hand-o-right\"><\/i>\u7533\u8acb\u5f8c\u3001\u62c5\u5f53\u8005\uff08Wordpress.org\u306e\u4e2d\u306e\u4eba\uff08\u5916\u4eba\uff09\uff09\u3068\u82f1\u8a9e\u3067\u3084\u308a\u3068\u308a\u3059\u308b\u306e\u306f\u3001\u610f\u5916\u306b\u305f\u3081\u306a\u308b<\/p>\n<p class=\"point1\"><i class=\"fa fa-hand-o-right\"><\/i>\u7533\u8acb\u901a\u904e<\/p>\n<p class=\"point1\"><i class=\"fa fa-hand-o-right\"><\/i>\u73fe\u6642\u70b9\u3067\u306e\u96d1\u611f<\/p>\n<p>\u3053\u308c\u3089\u3092\u9806\u3092\u8ffd\u3063\u3066\u5927\u96d1\u628a\u306b\u307e\u3068\u3081\u3066\u304a\u304f\u3002<\/p>\n<h3>\u30d7\u30e9\u30b0\u30a4\u30f3\u4f5c\u6210\u306e\u304a\u4f5c\u6cd5\u3092\u8abf\u3079\u308b\u306e\u306b\u5c11\u3005\u6642\u9593\u304c\u304b\u304b\u308b<\/h3>\n<p>\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u3069\u3046\u3044\u3046\u4ed5\u7d44\u307f\u3067\u52d5\u3044\u3066\u3044\u308b\u304b\u3001\u666e\u901a\u306e\u4eba\u306f\u77e5\u308b\u306f\u305a\u3082\u306a\u3044\u306e\u3067\u3001\u3053\u308c\u3092\u8abf\u3079\u306a\u304d\u3083\u306a\u308a\u307e\u305b\u3093\u3002\u3050\u3050\u3063\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u7d20\u6674\u3089\u3057\u304f\u30d4\u30f3\u30dd\u30a4\u30f3\u30c8\u3067\u60c5\u5831\u3092\u63d0\u4f9b\u3057\u3066\u304f\u308c\u3066\u3044\u308b\u3088\u3046\u306a\u30b5\u30a4\u30c8\u306f\u306a\u304f\u3001\u3044\u304f\u3064\u304b\u306e\u30b5\u30a4\u30c8\u306e\u60c5\u5831\u3092\u95b2\u89a7\u3059\u308b\u3002\u52a0\u3048\u3066\u3001\u65e2\u306b\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u7c21\u5358\u305d\u3046\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30bd\u30fc\u30b9\u3092\u8ffd\u3063\u304b\u3051\u3066\u307f\u308b\u3002\u3067\u3001\u306a\u3093\u3068\u304b\u7406\u89e3\u3067\u304d\u305f\u3068\u3044\u3046\u611f\u3058\u3067\u3059\u3002<\/p>\n<p>\u8a73\u7d30\u306b\u66f8\u304f\u306e\u306f\u3061\u3087\u3063\u3068\u9762\u5012\u306a\u306e\u3067\u3001\u3056\u3063\u304f\u308a\u3068\u3060\u3051\u624b\u9806\u3092\u8a18\u8f09\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<ol class=\"point1\">\n<li>\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u540d\u524d\u3092\u6c7a\u3081\u308b<\/li>\n<p>\u79c1\u304c\u516c\u958b\u4e88\u5b9a\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u540d\u304c text-cache-controller \u306a\u306e\u3067\u3001\u305d\u306e\u904e\u7a0b\u3067\u8a71\u3092\u9032\u3081\u307e\u3059\u3002<\/p>\n<li>\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u753b\u9762\u3092\u4f5c\u308b<\/li>\n<p>WordPress\u306e\u30eb\u30fc\u30c8\u30d5\u30a9\u30eb\u30c0\/wp-content\/plugins\/\u3000\u30d5\u30a9\u30eb\u30c0\u5185\u306b<br \/>\n\u30d7\u30e9\u30b0\u30a4\u30f3\u540d\u3067\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u308a\u3001\u305d\u306e\u4e2d\u306b \u30d7\u30e9\u30b0\u30a4\u30f3\u540d.php (text-cache-controller.php)\u3000\u3092\u4f5c\u308b\u3002<\/p>\n<li>\u30d7\u30e9\u30b0\u30a4\u30f3\u8a2d\u5b9a\u753b\u9762\u306eCSS\u3092\u4f5c\u308b<\/li>\n<p>\u30d7\u30e9\u30b0\u30a4\u30f3\u540d.css (text-cache-controller.css)\u3000\u3092\u4f5c\u308b\u3002<\/p>\n<li>\u30d7\u30e9\u30b0\u30a4\u30f3\u540d.php\u5185\u306b\u30af\u30e9\u30b9\u3092\u5b9a\u7fa9\u3057\u3001\u5fc5\u9808\u3068\u306a\u308bfunction\u3092\u5b9a\u7fa9<\/li>\n<p>\u25c7\u30af\u30e9\u30b9\u540d\u306b\u306f\u7279\u306b\u6c7a\u307e\u308a\u306f\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u25c7\u30af\u30e9\u30b9\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067\u3001Wordpress\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306e\u5de6\u5074\u306b\u8868\u793a\u3055\u308c\u308b\u30e1\u30cb\u30e5\u30fc\u306b\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306efunction\u3092\u5b9a\u7fa9\u3059\u308b\u3002<\/p>\n<p>\u25c7add_action\u3068\u3044\u3046\u306e\u306fWP\u5074\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u95a2\u6570\u307f\u305f\u3044\u306a\u306e\u3067\u3001\u3053\u3044\u3064\u3092\u7b2c\u4e00\u5f15\u6570 &#8220;admin_menu&#8221; \u3067\u547c\u3073\u51fa\u3057\u3066\u3001\u7b2c\u4e8c\u5f15\u6570\u306b\u914d\u5217\u3067\u3001$this\u3068\u30e1\u30cb\u30e5\u30fc\u5b9a\u7fa9\u306e\u8a73\u7d30\u3092\u6c7a\u5b9a\u3059\u308bfunction\u3092\u6e21\u3057\u3066\u3084\u308b\u3002<\/p>\n<p>\u25c7\u6307\u5b9a\u3057\u305ffunction\u5185\u306b \u3053\u308c\u307e\u305fWP\u5074\u3067\u5b9a\u7fa9\u3055\u308c\u305f add_submenu_page\u3092\u547c\u3073\u51fa\u3057\u3066\u3084\u308b\u3002<br \/>\n\u7b2c\u4e00\u5f15\u6570\u306e &#8220;options-general.php&#8221;\u3000\u306f \u30e1\u30cb\u30e5\u30fc\u306e\u3069\u306e\u4f4d\u7f6e\u306b\u81ea\u5206\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u30ea\u30f3\u30af\u3092\u8ffd\u52a0\u3059\u308b\u304b\u3068\u3044\u3046\u5b9a\u7fa9\u3067\u3001\u5f8c\u308d\u304b\u3089\uff12\u3064\u76ee\u306e\u914d\u5217\u5f15\u6570\u3067\u3001$this\u3068\u81ea\u5206\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u753b\u9762\u306eHTML\u3092\u63cf\u753b\u3059\u308b\u305f\u3081\u306efunction\u3092\u8a2d\u5b9a\u3057\u3066\u3084\u308b\u3002<\/p>\n<p>[php]<br \/>\nclass TextCacheControllerAdmin {<br \/>\n\tfunction __construct() {<br \/>\n\t\tadd_action(&#8220;admin_menu&#8221;, array($this, &#8220;add_pages&#8221;));<br \/>\n\t}<\/p>\n<p>\tfunction add_pages() {<br \/>\n\t\tadd_submenu_page(&#8220;options-general.php&#8221;,&#8221;Text Cache Controller Settings&#8221;<br \/>\n\t\t\t\t,&#8221;Text Cache Controller&#8221;,  &#8220;level_8&#8243;, __FILE__, array($this,&#8221;showOptions&#8221;), &#8220;&#8221;, 26);<br \/>\n\t}<\/p>\n<p>\tfunction showOptions() {<br \/>\n\t\t\u3053\u3053\u306b\u3001\u30ac\u30ea\u30ac\u30ea\u3068\u81ea\u5206\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u753b\u9762\u306eHTML\u51fa\u529b\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<br \/>\n\t}<\/p>\n<p>}<\/p>\n<p>$tccadmin = new TextCacheControllerAdmin();<\/p>\n<p>[\/php]<\/p>\n<li>\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u5229\u7528\u3059\u308bCSS\u3068JS\u3092\u8aad\u307f\u8fbc\u3080\u305f\u3081\u306e\u5b9a\u7fa9\u3092\u8ffd\u52a0<\/li>\n<p>\u3053\u308c\u306f\u3001\u4e0a\u8a18\u306e\u30af\u30e9\u30b9\u5916\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u3001\u8ffd\u52a0\u3057\u3066\u3042\u3052\u308c\u3070OK\u3067\u3059\u3002<br \/>\n\u3053\u3053\u3067\u3082\u3000WP\u5074\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308b function add_acction\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>CSS\u3092\u8aad\u307f\u8fbc\u3080\u305f\u3081\u306efunction\u3068JS\u3092\u8aad\u307f\u8fbc\u3080\u305f\u3081\u306efunction\u3092\u7528\u610f\u3057\u3001add_acction\u306e\u5f15\u6570\u306b\u4e0e\u3048\u308c\u3070OK\u3002<\/p>\n<p>add_action(&#8216;admin_enqueue_scripts&#8217;, &#8216;\u9069\u5f53\u306afunction\u540d&#8217;);<\/p>\n<p>[php]<br \/>\nfunction tcc_styles() {<br \/>\n    wp_register_style( &#8216;custom_wp_admin_css&#8217;, plugins_url(&#8216;text-cache-controller\/text-cache-controller.css&#8217;));<br \/>\n    wp_enqueue_style( &#8216;custom_wp_admin_css&#8217; );<br \/>\n}<br \/>\nadd_action(&#8216;admin_enqueue_scripts&#8217;, &#8216;tcc_styles&#8217;);<\/p>\n<p>function tcc_scripts() {<br \/>\n\twp_enqueue_script( &#8216;jquery&#8217; );<br \/>\n}<\/p>\n<p>add_action(&#8216;wp_enqueue_scripts&#8217;,&#8217;tcc_scripts&#8217;);<\/p>\n<p>[\/php]<\/p>\n<li>\u30d7\u30e9\u30b0\u30a4\u30f3\u8a2d\u5b9a\u753b\u9762 \u51fa\u529b\u7528function\u3092\u3072\u305f\u3059\u3089\u5b9f\u88c5<\/li>\n<p>\u81ea\u5206\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u753b\u9762\u306b\u5fc5\u8981\u306aHTML\u3092\u3072\u305f\u3059\u3089\u5b9f\u88c5\u3057\u307e\u3059\u3002<br \/>\n\u3053\u306efunction\u5185\u3067\u3001\u8a2d\u5b9a\u5024\u3092\u8868\u793a\u3059\u308b\u51e6\u7406\u3001\u8a2d\u5b9a\u5024\u3092\u4fdd\u5b58\u3059\u308b\u51e6\u7406\u3001\u305d\u306e\u4ed6\u3082\u308d\u3082\u308d\u306e\u51e6\u7406\u3092\u3054\u3061\u3083\u3054\u3061\u3083\u66f8\u3044\u3066\u3044\u3051\u3070OK\u3067\u3059\u3002<br \/>\n\u4f55\u70b9\u304b\u30dd\u30a4\u30f3\u30c8<br \/>\n\u30fb\u81ea\u5206\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u753b\u9762\u304c\u547c\u3070\u308c\u3066\u3044\u308b\u306e\u304b\u3069\u3046\u304b\u5224\u5b9a<\/p>\n<p>[php]<br \/>\nwp_nonce_field(&#8220;tcc_options&#8221;);\u3000<\/p>\n<p>\u3068<\/p>\n<p>if ( isset($_POST[&#8220;tcc_options&#8221;])) {<br \/>\n\tcheck_admin_referer(&#8220;tcc_options&#8221;);<br \/>\n[\/php]<\/p>\n<p>\u3092\u57cb\u3081\u3066\u304a\u3051\u3070\u3000OK\u3067\u3059\u3002<br \/>\n\u300ctcc_options\u300d\u3068\u3044\u3046\u90e8\u5206\u306f\u3054\u81ea\u8eab\u3067\u597d\u304d\u306a\u3088\u3046\u306b\u6c7a\u3081\u308c\u3070OK\u3067\u3059\u3002<\/p>\n<p>[php]<br \/>\n&lt;?php<br \/>\n\tfunction showOptions() {<br \/>\n\t\tif ( isset($_POST[&#8220;tcc_options&#8221;])) {<br \/>\n\t\t\tcheck_admin_referer(&#8220;tcc_options&#8221;);<\/p>\n<p>?><\/p>\n<form action=\"\" method=\"post\">\n<p>\t\t\t&lt;?php<br \/>\n\t\t\t\twp_nonce_field(&#8220;tcc_options&#8221;);<\/p>\n<p>\t\t\t\t\/\/Wordpress\u306eDB\u304b\u3089\u8a2d\u5b9a\u5024\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408<br \/>\n\t\t\t\t$opt_isdebug = get_option(&#8220;tcc_isdebug&#8221;);<\/p>\n<p>\t\t\t\t\/\/Wordpress\u306eDB\u3078\u8a2d\u5b9a\u5024\u3092\u4fdd\u5b58\u3057\u305f\u3044\u5834\u5408<br \/>\n\t\t\t\tupdate_option(&#8220;tcc_isdebug&#8221;, $isdebug);<br \/>\n\t\t\t?><\/p>\n<div class=\"xxxx\">\n\t\t\txxxxx<br \/>\n\t\t\tyyyyy<br \/>\n\t\t\tzzzz\n\t\t<\/div>\n<p>&lt;?php<br \/>\n\t}<\/p>\n<p>?><\/p>\n<p>[\/php]<\/p>\n<li>WordPress\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f<\/li>\n<p>Mysql\u306eWordpress\u306eDB\u5185\u306e\u300cwp_options\u300d\u30c6\u30fc\u30d6\u30eb\u306bWordpress\u306e\u8a2d\u5b9a\u5024\u306f\u5165\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u306e\u4e2d\u306e\u5024\u3092\u898b\u3066\u3001\u81ea\u5206\u304c\u6b32\u3057\u3044\u60c5\u5831\u306f\u3069\u308c\u304b\u306a\u3068\u9069\u5f53\u306b\u8003\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h4>\u4f8b\uff09\u30b5\u30a4\u30c8\u306eURL\u53d6\u5f97<\/h4>\n<p>[php]<br \/>\n$url = get_option(&#8220;siteurl&#8221;);<br \/>\n[\/php]<\/p>\n<h4>\u6295\u7a3f(Post)\u4e00\u89a7\u3092\u53d6\u5f97<\/h4>\n<p>[php]<br \/>\n$args = array(<br \/>\n\t&#8216;numberposts&#8217; => 20,<br \/>\n\t&#8216;offset&#8217; => 0);<\/p>\n<p>$recent_posts = wp_get_recent_posts($args);<\/p>\n<p>foreach($recent_posts as $post){<br \/>\n\techo $post[&#8220;ID&#8221;];<br \/>\n\techo get_permalink($post[&#8220;ID&#8221;]) ;<br \/>\n\techo $post[&#8220;post_title&#8221;] ;<br \/>\n} <\/p>\n<p>[\/php]<\/p>\n<h4>\u30ab\u30c6\u30b4\u30ea\u30fc\u4e00\u89a7\u3092\u53d6\u5f97<\/h4>\n<p>[php]<br \/>\n$categories = get_categories( &#8216;get=all&#8217; ); <\/p>\n<p>foreach($categories as $cat){<br \/>\n\techo $cat->term_id ;<br \/>\n\techo $cat->name ;<br \/>\n\techo get_category_link( $cat->term_id );<br \/>\n}<\/p>\n<p>[\/php]<\/p>\n<h4>Tag\u4e00\u89a7\u3092\u53d6\u5f97<\/h4>\n<p>[php]<\/p>\n<p>$tags = get_tags( &#8216;get=all&#8217; ); <\/p>\n<p>foreach($tags as $tag){<br \/>\n\techo $tag->term_id ;<br \/>\n\techo $tag->name ;<br \/>\n\techo get_tag_link( $tag->term_id );<br \/>\n}<\/p>\n<p>[\/php]<\/p>\n<h3>\u30bd\u30fc\u30b9\u306e\u5b9f\u88c5\u81ea\u4f53\u306f\u3001\u305f\u3060\u306ePHP\u306a\u306e\u3067\u305d\u308c\u307b\u3069\u96e3\u3057\u304f\u306f\u306a\u3044<\/h3>\n<p>\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u304a\u4f5c\u6cd5\u3055\u3048\u307c\u3093\u3084\u308a\u308f\u304b\u308c\u3070\u3001\u3042\u3068\u306f\u305f\u3060\u306ePHP\u3067\u3059\u306e\u3067\u3001\u7279\u306b\u6df1\u304f\u8003\u3048\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u81ea\u5206\u306e\u597d\u304d\u306a\u3088\u3046\u306b\u66f8\u304d\u3083\u3044\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h3>\u591a\u8a00\u8a9e\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306e\u60c5\u5831\u53ce\u96c6\uff06\u5b9f\u88c5 \u306b\u306f\u3061\u3087\u3063\u3068\u6642\u9593\u304c\u5fc5\u8981<\/h3>\n<p>\u57fa\u672c\u306f\u82f1\u8a9e\u7248\u3067\u4f5c\u6210\u3057\u3001php\u30bd\u30fc\u30b9\u5185\u306b\u57cb\u3081\u8fbc\u3093\u3060 \u82f1\u8a9e\u306e\u30ea\u30c6\u30e9\u30eb\u90e8\u5206\u3092\u5b9f\u884c\u6642\u306b\u4ed6\u306e\u8a00\u8a9e\u30d5\u30a1\u30a4\u30eb\u306b\u5b9a\u7fa9\u3055\u308c\u305f\u5185\u5bb9\u306b\u7f6e\u304d\u63db\u3048\u308b\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>\u591a\u8a00\u8a9e\u5bfe\u5fdc\u306e\u305f\u3081\u306e\u30bd\u30fc\u30b9\u8abf\u6574<\/h4>\n<p>\u4f8b\u3048\u3070 php\u30bd\u30fc\u30b9\u5185\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30bd\u30fc\u30b9\u304c\u3042\u308a\u3001\u3053\u308c\u3092\u591a\u8a00\u8a9e\u5316\u3059\u308b\u5834\u5408\u306f<\/p>\n<p>[php]<\/p>\n<h3>&lt;?php echo &#8220;This is a pen&#8221;; ?><\/h3>\n<p>[\/php]<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u308b\u3002<br \/>\n[php]<\/p>\n<h3>&lt;?php _e(&#8220;This is a pen&#8221;, self::DOMAIN); ?><\/h3>\n<p>[\/php]<\/p>\n<p>\u3067\u3001self::DOMAIN \u3068\u3044\u3046\u5b9a\u6570\u306f\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30af\u30e9\u30b9\u306b\u5b9a\u7fa9\u3057\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3092\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u8abf\u6574\u3057\u3066\u3084\u308b\u3002<\/p>\n<p>[php]<br \/>\nclass TextCacheControllerAdmin {<br \/>\n\tconst DOMAIN = &#8220;text-cache-controller&#8221;;<\/p>\n<p>\tfunction __construct() {<br \/>\n\t\tload_plugin_textdomain(self::DOMAIN, false, basename( dirname( __FILE__ ) ).&#8217;\/languages&#8217; );<br \/>\n\t\tadd_action(&#8220;admin_menu&#8221;, array($this, &#8220;add_pages&#8221;));<br \/>\n\t}<\/p>\n<p>[\/php]<\/p>\n<h4>\u8a00\u8a9e\u30d5\u30a1\u30a4\u30eb\u4f5c\u6210<\/h4>\n<p>\u30d7\u30e9\u30b0\u30a4\u30f3\u30d5\u30a9\u30eb\u30c0\u5185\u306b languages \u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u308a\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u540d-ja.po\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3002<\/p>\n<p>\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u3001\u305d\u306e\u4e2d\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5b9a\u578b\u6587\u3092\u57cb\u3081\u8fbc\u3080\u3002<\/p>\n<p>[diff]<\/p>\n<p># Copyright (C) 2014 WordPress<br \/>\n# This file is distributed under the same license as the WordPress package.<br \/>\nmsgid &#8220;&#8221;<br \/>\nmsgstr &#8220;&#8221;<br \/>\n&#8220;Project-Id-Version: Text Cache Controller\\n&#8221;<br \/>\n&#8220;Report-Msgid-Bugs-To: \\n&#8221;<br \/>\n&#8220;POT-Creation-Date: 2014-03-30 15:15+0900\\n&#8221;<br \/>\n&#8220;PO-Revision-Date: 2014-03-30 15:16+0900\\n&#8221;<br \/>\n&#8220;Last-Translator: Tanaka Hikozaemon <Hikozaemon@gmail.com>\\n&#8221;<br \/>\n&#8220;Language-Team: Tanaka Hikozaemon <Hikozaemon@gmail.com>\\n&#8221;<br \/>\n&#8220;Language: ja_JP\\n&#8221;<br \/>\n&#8220;MIME-Version: 1.0\\n&#8221;<br \/>\n&#8220;Content-Type: text\/plain; charset=UTF-8\\n&#8221;<br \/>\n&#8220;Content-Transfer-Encoding: 8bit\\n&#8221;<br \/>\n&#8220;X-Poedit-KeywordsList: __;_e\\n&#8221;<br \/>\n&#8220;X-Poedit-Basepath: .\\n&#8221;<br \/>\n&#8220;X-Generator: Poedit 1.5.4\\n&#8221;<br \/>\n&#8220;X-Poedit-SearchPath-0: .\\n&#8221;<br \/>\n&#8220;X-Poedit-SearchPath-1: ..\\n&#8221;<\/p>\n<p>[\/diff]<\/p>\n<h4>poEdit\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<p>\u591a\u8a00\u8a9e\u5bfe\u5fdc\u306e\u305f\u3081\u306e\u4fbf\u5229\u30c4\u30fc\u30eb poEdit\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u306f\u3054\u81ea\u8eab\u3067\u8abf\u3079\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u3067\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u8d77\u52d5\u3057\u3001\u5148\u307b\u3069\u4f5c\u3063\u305f po\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\u3002<\/p>\n<p><a href=\"http:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/03\/poedit-1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/03\/poedit-1.png\" alt=\"poedit-1\" width=\"786\" height=\"700\" class=\"alignnone size-full wp-image-794\" srcset=\"https:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/03\/poedit-1.png 786w, https:\/\/lovelinux.mydns.jp\/wp-content\/uploads\/2014\/03\/poedit-1-300x267.png 300w\" sizes=\"auto, (max-width: 786px) 100vw, 786px\" \/><\/a><\/p>\n<p>\u300c\u66f4\u65b0\u3059\u308b\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001php\u30bd\u30fc\u30b9\u304b\u3089 _e() \u3068 __() \u306e\u90e8\u5206\u3092\u30b5\u30fc\u30c1\u3057\u3001\u30d4\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3066\u304f\u308c\u308b\u3002<br \/>\n\u3067\u3001\u30d4\u30c3\u30af\u30a2\u30c3\u30d7\u3055\u308c\u305f\u82f1\u8a9e\u306b\u5bfe\u3059\u308b\u65e5\u672c\u8a9e\u8a33\u3092\u30b3\u30c4\u30b3\u30c4\u5b9a\u7fa9\u3057\u3066\u3044\u304f\u3002<br \/>\npoEdit\u3067\u4fdd\u5b58\u3059\u308b\u3068\u3001\u81ea\u52d5\u7684\u306b mo\u30d5\u30a1\u30a4\u30eb\u304c\u51fa\u6765\u4e0a\u304c\u308b\u3002<br \/>\n\u3042\u3068\u306f\u3001\u3054\u81ea\u8eab\u306e\u74b0\u5883\u304c\u65e5\u672c\u8a9e\u74b0\u5883\u3067\u3042\u308c\u3070\u3001\u5148\u307b\u3069\u4f5c\u3063\u305f \u30d7\u30e9\u30b0\u30a4\u30f3\u540d-ja.mo \u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3093\u3067\u304f\u308c\u3066\u3001\u82f1\u8a9e\u90e8\u5206\u3092\u65e5\u672c\u8a9e\u5316\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<\/ol>\n<h3>\u7533\u8acb\u306e\u305f\u3081\u306b\u5fc5\u8981\u306aWordpress \u30d7\u30e9\u30b0\u30a4\u30f3\u66f8\u5f0f\u306b\u5247\u3063\u305fReadme.txt\u3092\u4f5c\u308b\u306e\u304c\u3060\u308b\u3044<\/h3>\n<p>\u3053\u306e\u4f5c\u696d\u304c\u4e00\u756a\u3060\u308b\u3044\u3067\u3059\u3002\u82f1\u8a9e\u3067\u81ea\u5206\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u3053\u3068\u3092\u8aac\u660e\u3057\u306a\u304d\u3083\u306a\u308a\u307e\u305b\u3093\u30fb\u30fb\u30fb\u3002<\/p>\n<p>\u307e\u305a\u3001\u3053\u3053\u304b\u3089\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u843d\u3068\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/wordpress.org\/plugins\/about\/readme.txt\">https:\/\/wordpress.org\/plugins\/about\/readme.txt<\/a><\/p>\n<p>\u3067\u3001\u3054\u306b\u3087\u3054\u306b\u3087\u7de8\u96c6\u3057\u3001\u7de8\u96c6\u7d50\u679c\u304cOK\u304b\u3069\u3046\u304b\u3092\u3053\u3053\u3067\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/wordpress.org\/plugins\/about\/validator\/\">https:\/\/wordpress.org\/plugins\/about\/validator\/<\/a><\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u9811\u5f35\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>WordPress.org\u306e\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u3059\u308b<\/h3>\n<p><a href=\"https:\/\/wordpress.org\/support\/register.php\">\u3053\u3053\u304b\u3089<\/a>\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u7533\u8acb\u3092\u51fa\u3059\u3002<\/h3>\n<p><a href=\"http:\/\/wordpress.org\/plugins\/add\/\">\u3053\u3053\u304b\u3089<\/a>\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u7533\u8acb\u3092\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"http:\/\/celtislab.net\/archives\/20130410\/wordpress%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%E3%81%AE%E7%99%BB%E9%8C%B2%E7%94%B3%E8%AB%8B%E7%B7%A8\/\">\u3053\u3053\u306e\u30b5\u30a4\u30c8<\/a>\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u5ba3\u4f1d<\/h3>\n<p>\u3053\u308c\u304c\u7533\u8acb\u4e2d\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u3059\u3002\u305c\u3072\u4e00\u5ea6\u304a\u8a66\u3057\u304f\u3060\u3055\u3044\uff01<br \/>\n<a href=\"http:\/\/lovelinux.mydns.jp\/?p=743\">WordPress\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u309210\u500d\u304b\u30891,000\u500d \u901f\u304f\u3067\u304d\u308b\u304b\u3082\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u3063\u305f \u301c Text Cache Controller plugin<\/a><\/p>\n<h4>\u7d9a\u304f<\/h4>\n<p><a href=\"http:\/\/lovelinux.mydns.jp\/?p=803\">WordPress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u4f5c\u6210\u3001\u7533\u8acb\u904e\u7a0b\u3067\u611f\u3058\u305f\u3053\u3068\uff08\u96d1\u611f\u7de8\uff09<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uff11\u9031\u9593\u307b\u3069\u524d\u306b\u3001\u6025\u306bWordpress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u4f5c\u308a\u305f\u304f\u306a\u3063\u3066\u3001\uff12\u65e5\u9593\u307b\u3069\u6c17\u5408\u3092\u5165\u308c\u3066\u5b9f\u88c5\u3057\u305f\u3002\u4f5c\u6210\u624b\u9806\u7de8\u3067\u306f\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u4f5c\u6210\u306e\u521d\u6b69\u304b\u3089\u3001Wordpress.org\u3078\u306e\u7533\u8acb\u307e\u3067\u306e\u624b\u9806\u3092\u8aac\u660e\u3059\u308b\u3002 \u30d7\u30e9\u30b0\u30a4\u30f3\u4f5c\u6210\u306e\u304a\u4f5c\u6cd5\u3092\u8abf\u3079\u308b\u306e\u306b\u5c11\u3005\u6642\u9593\u304c\u304b\u304b\u308b \u30bd\u30fc\u30b9\u306e\u5b9f\u88c5\u81ea\u4f53\u306f\u3001\u305f\u3060\u306ePHP\u306a\u306e\u3067\u305d\u308c\u307b\u3069\u96e3\u3057\u304f\u306f\u306a\u3044 \u591a\u8a00\u8a9e\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306e\u60c5\u5831\u53ce\u96c6\uff06\u5b9f\u88c5 \u306b\u306f\u3061\u3087\u3063\u3068\u6642\u9593\u304c\u5fc5\u8981 \u7533\u8acb\u306e\u305f\u3081\u306b\u5fc5\u8981\u306aWordpress \u30d7\u30e9\u30b0\u30a4\u30f3\u66f8\u5f0f\u306b\u5247\u3063\u305fReadme.txt\u3092\u4f5c\u308b\u306e\u304c\u3060\u308b\u3044 WordPress.org\u306e\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u3059\u308b \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u7533\u8acb\u3092\u51fa\u3059\u3002 \u7533\u8acb\u5f8c\u3001\u62c5\u5f53\u8005\uff08Wordpress.org\u306e\u4e2d\u306e\u4eba\uff08\u5916\u4eba\uff09\uff09\u3068\u82f1\u8a9e\u3067\u3084\u308a\u3068\u308a\u3059\u308b\u306e\u306f\u3001\u610f\u5916\u306b\u305f\u3081\u306a\u308b \u7533\u8acb\u901a\u904e \u73fe\u6642\u70b9\u3067\u306e\u96d1\u611f \u3053\u308c\u3089\u3092\u9806\u3092\u8ffd\u3063\u3066\u5927\u96d1\u628a\u306b\u307e\u3068\u3081\u3066\u304a\u304f\u3002 \u30d7\u30e9\u30b0\u30a4\u30f3\u4f5c\u6210\u306e\u304a\u4f5c\u6cd5\u3092\u8abf\u3079\u308b\u306e\u306b\u5c11\u3005\u6642\u9593\u304c\u304b\u304b\u308b \u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u3069\u3046\u3044\u3046\u4ed5\u7d44\u307f\u3067\u52d5\u3044\u3066\u3044\u308b\u304b\u3001\u666e\u901a\u306e\u4eba\u306f\u77e5\u308b\u306f\u305a\u3082\u306a\u3044\u306e\u3067\u3001\u3053\u308c\u3092\u8abf\u3079\u306a\u304d\u3083\u306a\u308a\u307e\u305b\u3093\u3002\u3050\u3050\u3063\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u7d20\u6674\u3089\u3057\u304f\u30d4\u30f3\u30dd\u30a4\u30f3\u30c8\u3067\u60c5\u5831\u3092\u63d0\u4f9b\u3057\u3066\u304f\u308c\u3066\u3044\u308b\u3088\u3046\u306a\u30b5\u30a4\u30c8\u306f\u306a\u304f\u3001\u3044\u304f\u3064\u304b\u306e\u30b5\u30a4\u30c8\u306e\u60c5\u5831\u3092\u95b2\u89a7\u3059\u308b\u3002\u52a0\u3048\u3066\u3001\u65e2\u306b\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u7c21\u5358\u305d\u3046\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30bd\u30fc\u30b9\u3092\u8ffd\u3063\u304b\u3051\u3066\u307f\u308b\u3002\u3067\u3001\u306a\u3093\u3068\u304b\u7406\u89e3\u3067\u304d\u305f\u3068\u3044\u3046\u611f\u3058\u3067\u3059\u3002 \u8a73\u7d30\u306b\u66f8\u304f\u306e\u306f\u3061\u3087\u3063\u3068\u9762\u5012\u306a\u306e\u3067\u3001\u3056\u3063\u304f\u308a\u3068\u3060\u3051\u624b\u9806\u3092\u8a18\u8f09\u3057\u3066\u304a\u304d\u307e\u3059\u3002 \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u540d\u524d\u3092\u6c7a\u3081\u308b \u79c1\u304c\u516c\u958b\u4e88\u5b9a\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u540d\u304c text-cache-controller \u306a\u306e\u3067\u3001\u305d\u306e\u904e\u7a0b\u3067\u8a71\u3092\u9032\u3081\u307e\u3059\u3002 \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u753b\u9762\u3092\u4f5c\u308b WordPress\u306e\u30eb\u30fc\u30c8\u30d5\u30a9\u30eb\u30c0\/wp-content\/plugins\/\u3000\u30d5\u30a9\u30eb\u30c0\u5185\u306b \u30d7\u30e9\u30b0\u30a4\u30f3\u540d\u3067\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u308a\u3001\u305d\u306e\u4e2d\u306b \u30d7\u30e9\u30b0\u30a4\u30f3\u540d.php (text-cache-controller.php)\u3000\u3092\u4f5c\u308b\u3002 \u30d7\u30e9\u30b0\u30a4\u30f3\u8a2d\u5b9a\u753b\u9762\u306eCSS\u3092\u4f5c\u308b \u30d7\u30e9\u30b0\u30a4\u30f3\u540d.css (text-cache-controller.css)\u3000\u3092\u4f5c\u308b\u3002 \u30d7\u30e9\u30b0\u30a4\u30f3\u540d.php\u5185\u306b\u30af\u30e9\u30b9\u3092\u5b9a\u7fa9\u3057\u3001\u5fc5\u9808\u3068\u306a\u308bfunction\u3092\u5b9a\u7fa9 \u25c7\u30af\u30e9\u30b9\u540d\u306b\u306f\u7279\u306b\u6c7a\u307e\u308a\u306f\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u25c7\u30af\u30e9\u30b9\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067\u3001Wordpress\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306e\u5de6\u5074\u306b\u8868\u793a\u3055\u308c\u308b\u30e1\u30cb\u30e5\u30fc\u306b\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306efunction\u3092\u5b9a\u7fa9\u3059\u308b\u3002 \u25c7add_action\u3068\u3044\u3046\u306e\u306fWP\u5074\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u95a2\u6570\u307f\u305f\u3044\u306a\u306e\u3067\u3001\u3053\u3044\u3064\u3092\u7b2c\u4e00\u5f15\u6570 &#8220;admin_menu&#8221; \u3067\u547c\u3073\u51fa\u3057\u3066\u3001\u7b2c\u4e8c\u5f15\u6570\u306b\u914d\u5217\u3067\u3001$this\u3068\u30e1\u30cb\u30e5\u30fc\u5b9a\u7fa9\u306e\u8a73\u7d30\u3092\u6c7a\u5b9a\u3059\u308bfunction\u3092\u6e21\u3057\u3066\u3084\u308b\u3002 \u25c7\u6307\u5b9a\u3057\u305ffunction\u5185\u306b \u3053\u308c\u307e\u305fWP\u5074\u3067\u5b9a\u7fa9\u3055\u308c\u305f add_submenu_page\u3092\u547c\u3073\u51fa\u3057\u3066\u3084\u308b\u3002 \u7b2c\u4e00\u5f15\u6570\u306e &#8220;options-general.php&#8221;\u3000\u306f \u30e1\u30cb\u30e5\u30fc\u306e\u3069\u306e\u4f4d\u7f6e\u306b\u81ea\u5206\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u30ea\u30f3\u30af\u3092\u8ffd\u52a0\u3059\u308b\u304b\u3068\u3044\u3046\u5b9a\u7fa9\u3067\u3001\u5f8c\u308d\u304b\u3089\uff12\u3064\u76ee\u306e\u914d\u5217\u5f15\u6570\u3067\u3001$this\u3068\u81ea\u5206\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u753b\u9762\u306eHTML\u3092\u63cf\u753b\u3059\u308b\u305f\u3081\u306efunction\u3092\u8a2d\u5b9a\u3057\u3066\u3084\u308b\u3002 [php] class TextCacheControllerAdmin { function __construct() { add_action(&#8220;admin_menu&#8221;, array($this, &#8220;add_pages&#8221;)); } function add_pages() { add_submenu_page(&#8220;options-general.php&#8221;,&#8221;Text Cache Controller Settings&#8221; ,&#8221;Text Cache Controller&#8221;, &#8220;level_8&#8243;, __FILE__, array($this,&#8221;showOptions&#8221;), &#8220;&#8221;, 26); } function showOptions() { \u3053\u3053\u306b\u3001\u30ac\u30ea\u30ac\u30ea\u3068\u81ea\u5206\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u753b\u9762\u306eHTML\u51fa\u529b\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002 } } $tccadmin = new TextCacheControllerAdmin(); [\/php] \u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u5229\u7528\u3059\u308bCSS\u3068JS\u3092\u8aad\u307f\u8fbc\u3080\u305f\u3081\u306e\u5b9a\u7fa9\u3092\u8ffd\u52a0 \u3053\u308c\u306f\u3001\u4e0a\u8a18\u306e\u30af\u30e9\u30b9\u5916\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u3001\u8ffd\u52a0\u3057\u3066\u3042\u3052\u308c\u3070OK\u3067\u3059\u3002 \u3053\u3053\u3067\u3082\u3000WP\u5074\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308b function add_acction\u3092\u5229\u7528\u3057\u307e\u3059\u3002 CSS\u3092\u8aad\u307f\u8fbc\u3080\u305f\u3081\u306efunction\u3068JS\u3092\u8aad\u307f\u8fbc\u3080\u305f\u3081\u306efunction\u3092\u7528\u610f\u3057\u3001add_acction\u306e\u5f15\u6570\u306b\u4e0e\u3048\u308c\u3070OK\u3002 add_action(&#8216;admin_enqueue_scripts&#8217;, &#8216;\u9069\u5f53\u306afunction\u540d&#8217;); [php] function tcc_styles() { wp_register_style( &#8216;custom_wp_admin_css&#8217;, plugins_url(&#8216;text-cache-controller\/text-cache-controller.css&#8217;)); wp_enqueue_style( &#8216;custom_wp_admin_css&#8217; ); } add_action(&#8216;admin_enqueue_scripts&#8217;, &#8216;tcc_styles&#8217;); function tcc_scripts() { wp_enqueue_script( &#8216;jquery&#8217; ); } add_action(&#8216;wp_enqueue_scripts&#8217;,&#8217;tcc_scripts&#8217;); [\/php] \u30d7\u30e9\u30b0\u30a4\u30f3\u8a2d\u5b9a\u753b\u9762 \u51fa\u529b\u7528function\u3092\u3072\u305f\u3059\u3089\u5b9f\u88c5 \u81ea\u5206\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u753b\u9762\u306b\u5fc5\u8981\u306aHTML\u3092\u3072\u305f\u3059\u3089\u5b9f\u88c5\u3057\u307e\u3059\u3002 \u3053\u306efunction\u5185\u3067\u3001\u8a2d\u5b9a\u5024\u3092\u8868\u793a\u3059\u308b\u51e6\u7406\u3001\u8a2d\u5b9a\u5024\u3092\u4fdd\u5b58\u3059\u308b\u51e6\u7406\u3001\u305d\u306e\u4ed6\u3082\u308d\u3082\u308d\u306e\u51e6\u7406\u3092\u3054\u3061\u3083\u3054\u3061\u3083\u66f8\u3044\u3066\u3044\u3051\u3070OK\u3067\u3059\u3002 \u4f55\u70b9\u304b\u30dd\u30a4\u30f3\u30c8 \u30fb\u81ea\u5206\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u753b\u9762\u304c\u547c\u3070\u308c\u3066\u3044\u308b\u306e\u304b\u3069\u3046\u304b\u5224\u5b9a [php] wp_nonce_field(&#8220;tcc_options&#8221;);\u3000 \u3068 if ( isset($_POST[&#8220;tcc_options&#8221;])) { check_admin_referer(&#8220;tcc_options&#8221;); [\/php] \u3092\u57cb\u3081\u3066\u304a\u3051\u3070\u3000OK\u3067\u3059\u3002 \u300ctcc_options\u300d\u3068\u3044\u3046\u90e8\u5206\u306f\u3054\u81ea\u8eab\u3067\u597d\u304d\u306a\u3088\u3046\u306b\u6c7a\u3081\u308c\u3070OK\u3067\u3059\u3002 [php] &lt;?php function showOptions() { if ( isset($_POST[&#8220;tcc_options&#8221;])) { check_admin_referer(&#8220;tcc_options&#8221;); ?> &lt;?php wp_nonce_field(&#8220;tcc_options&#8221;); \/\/Wordpress\u306eDB\u304b\u3089\u8a2d\u5b9a\u5024\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408 $opt_isdebug = get_option(&#8220;tcc_isdebug&#8221;); \/\/Wordpress\u306eDB\u3078\u8a2d\u5b9a\u5024\u3092\u4fdd\u5b58\u3057\u305f\u3044\u5834\u5408 update_option(&#8220;tcc_isdebug&#8221;, $isdebug); ?> xxxxx yyyyy zzzz &lt;?php } ?> [\/php] WordPress\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f Mysql\u306eWordpress\u306eDB\u5185\u306e\u300cwp_options\u300d\u30c6\u30fc\u30d6\u30eb\u306bWordpress\u306e\u8a2d\u5b9a\u5024\u306f\u5165\u3063\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u4e2d\u306e\u5024\u3092\u898b\u3066\u3001\u81ea\u5206\u304c\u6b32\u3057\u3044\u60c5\u5831\u306f\u3069\u308c\u304b\u306a\u3068\u9069\u5f53\u306b\u8003\u3048\u3066\u304f\u3060\u3055\u3044\u3002 \u4f8b\uff09\u30b5\u30a4\u30c8\u306eURL\u53d6\u5f97 [php] $url = get_option(&#8220;siteurl&#8221;); [\/php] \u6295\u7a3f(Post)\u4e00\u89a7\u3092\u53d6\u5f97 [php] $args = array( &#8216;numberposts&#8217; => 20, &#8216;offset&#8217; => 0); $recent_posts = wp_get_recent_posts($args); foreach($recent_posts as $post){ echo $post[&#8220;ID&#8221;]; echo get_permalink($post[&#8220;ID&#8221;]) ; echo $post[&#8220;post_title&#8221;] ; } [\/php] \u30ab\u30c6\u30b4\u30ea\u30fc\u4e00\u89a7\u3092\u53d6\u5f97 [php] $categories = get_categories( &#8216;get=all&#8217; ); foreach($categories as $cat){ echo $cat->term_id ; echo $cat->name ; echo get_category_link( $cat->term_id ); } [\/php] Tag\u4e00\u89a7\u3092\u53d6\u5f97 [php] $tags = get_tags( &#8216;get=all&#8217; ); foreach($tags as $tag){ echo $tag->term_id ; echo $tag->name ; echo get_tag_link( $tag->term_id ); } [\/php] \u30bd\u30fc\u30b9\u306e\u5b9f\u88c5\u81ea\u4f53\u306f\u3001\u305f\u3060\u306ePHP\u306a\u306e\u3067\u305d\u308c\u307b\u3069\u96e3\u3057\u304f\u306f\u306a\u3044 \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u304a\u4f5c\u6cd5\u3055\u3048\u307c\u3093\u3084\u308a\u308f\u304b\u308c\u3070\u3001\u3042\u3068\u306f\u305f\u3060\u306ePHP\u3067\u3059\u306e\u3067\u3001\u7279\u306b\u6df1\u304f\u8003\u3048\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u81ea\u5206\u306e\u597d\u304d\u306a\u3088\u3046\u306b\u66f8\u304d\u3083\u3044\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u591a\u8a00\u8a9e\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306e\u60c5\u5831\u53ce\u96c6\uff06\u5b9f\u88c5 \u306b\u306f\u3061\u3087\u3063\u3068\u6642\u9593\u304c\u5fc5\u8981 \u57fa\u672c\u306f\u82f1\u8a9e\u7248\u3067\u4f5c\u6210\u3057\u3001php\u30bd\u30fc\u30b9\u5185\u306b\u57cb\u3081\u8fbc\u3093\u3060 \u82f1\u8a9e\u306e\u30ea\u30c6\u30e9\u30eb\u90e8\u5206\u3092\u5b9f\u884c\u6642\u306b\u4ed6\u306e\u8a00\u8a9e\u30d5\u30a1\u30a4\u30eb\u306b\u5b9a\u7fa9\u3055\u308c\u305f\u5185\u5bb9\u306b\u7f6e\u304d\u63db\u3048\u308b\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002 \u591a\u8a00\u8a9e\u5bfe\u5fdc\u306e\u305f\u3081\u306e\u30bd\u30fc\u30b9\u8abf\u6574 \u4f8b\u3048\u3070 php\u30bd\u30fc\u30b9\u5185\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30bd\u30fc\u30b9\u304c\u3042\u308a\u3001\u3053\u308c\u3092\u591a\u8a00\u8a9e\u5316\u3059\u308b\u5834\u5408\u306f [php] &lt;?php echo &#8220;This is a pen&#8221;; ?> [\/php] \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u308b\u3002 [php] &lt;?php _e(&#8220;This is a pen&#8221;, self::DOMAIN); ?> [\/php] \u3067\u3001self::DOMAIN \u3068\u3044\u3046\u5b9a\u6570\u306f\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30af\u30e9\u30b9\u306b\u5b9a\u7fa9\u3057\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3092\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u8abf\u6574\u3057\u3066\u3084\u308b\u3002 [php] class TextCacheControllerAdmin { const DOMAIN = &#8220;text-cache-controller&#8221;; function __construct() { load_plugin_textdomain(self::DOMAIN, false, basename( dirname( __FILE__ ) ).&#8217;\/languages&#8217; ); add_action(&#8220;admin_menu&#8221;, array($this, &#8220;add_pages&#8221;)); } [\/php] \u8a00\u8a9e\u30d5\u30a1\u30a4\u30eb\u4f5c\u6210 \u30d7\u30e9\u30b0\u30a4\u30f3\u30d5\u30a9\u30eb\u30c0\u5185\u306b languages \u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u308a\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u540d-ja.po\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3002 \u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u3001\u305d\u306e\u4e2d\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5b9a\u578b\u6587\u3092\u57cb\u3081\u8fbc\u3080\u3002 [diff] # Copyright (C) 2014 WordPress # This&#8230;<\/p>\n","protected":false},"author":1,"featured_media":798,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[11],"tags":[42,18,43],"class_list":{"0":"post-785","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-wordpress","8":"tag-textcachecontroller","9":"tag-wordpress-2","10":"tag-43"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts\/785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=785"}],"version-history":[{"count":19,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts\/785\/revisions"}],"predecessor-version":[{"id":811,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/posts\/785\/revisions\/811"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=\/wp\/v2\/media\/798"}],"wp:attachment":[{"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lovelinux.mydns.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}