{"id":1381,"date":"2011-12-21T01:26:27","date_gmt":"2011-12-20T16:26:27","guid":{"rendered":"http:\/\/codaholic.org\/?p=1381"},"modified":"2011-12-21T01:40:04","modified_gmt":"2011-12-20T16:40:04","slug":"wordpress%e4%bb%bb%e6%84%8f%e3%81%aeget%e3%83%91%e3%83%a9%e3%83%a1%e3%83%bc%e3%82%bf%e3%83%bc%e3%81%ae%e5%80%a4%e3%81%ab%e5%bf%9c%e3%81%98%e3%81%a6%e8%aa%ad%e3%81%bf%e8%be%bc%e3%81%be%e3%81%9b","status":"publish","type":"post","link":"https:\/\/codaholic.org\/?p=1381","title":{"rendered":"[WordPress]\u4efb\u610f\u306eGET\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u5024\u306b\u5fdc\u3058\u3066\u8aad\u307f\u8fbc\u307e\u305b\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u5207\u308a\u66ff\u3048\u308b"},"content":{"rendered":"<p>\u6a19\u6e96\u306eWordPress\u306e\u6a5f\u80fd\u3068\u3057\u3066\u3001GET\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306b\u5fdc\u3058\u3066\u8868\u793a\u3055\u308c\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304c\u5207\u308a\u66ff\u308f\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001p=15\u3068\u3044\u3046\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304cindex.php\u306b\u6e21\u3055\u308c\u308b\u3068\u3001single.php\u304c\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3068\u3057\u3066\u8aad\u307f\u8fbc\u307e\u308c\u3001\u6295\u7a3fID\u304c15\u306e\u6295\u7a3f\u306e\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u307e\u305f\u3001s=hello\u3068\u3044\u3046\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304c\u6e21\u3055\u308c\u308b\u3068\u3001search.php\u304c\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3068\u3057\u3066\u8aad\u307f\u8fbc\u307e\u308c\u3001\u300chello\u300d\u3068\u3044\u3046\u30ad\u30fc\u30ef\u30fc\u30c9\u3067\u306e\u691c\u7d22\u7d50\u679c\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3082\u3057\u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306b\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u3082\u306e\u304c\u5229\u7528\u3067\u304d\u305f\u3089\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306e\u5e45\u304c\u5e83\u307e\u308a\u307e\u3059\u3088\u306d\u3002\u305d\u3053\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u5024\u306b\u5fdc\u3058\u3066\u3001\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u8aad\u307f\u3053\u307e\u305b\u308b\u65b9\u6cd5\u3092\u8abf\u3079\u307e\u3057\u305f\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u30aa\u30ea\u30b8\u30ca\u30eb\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u5024\u306b\u5fdc\u3058\u3066\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u3080\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30b3\u30fc\u30c9\u3092\u4e0b\u8a18\u306b\u793a\u3057\u307e\u3059\u3002\u52d5\u4f5c\u78ba\u8a8d\u306f\u30d0\u30fc\u30b8\u30e7\u30f33.1.3\u3067\u884c\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>[php]<br \/>\n<?php\n\t\/*\n\t\tPlugin Name: Templates Switcher\n\t\tPlugin URI: http:\/\/codaholic.org\/\n\t\tDescription: size\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u5024\u306b\u5fdc\u3058\u3066\u8868\u793a\u3059\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002\n\t\tAuthor: Suzuki Toshinari\n\t\tVersion: 1.0\n\t\tAuthor URI: http:\/\/codaholic.org\n\t*\/\n\n\tfunction load_original_template(){\n\t\t$flag = false;\n\t\t$param = htmlspecialchars($_GET['size'], ENT_QUOTES);\n\t\tswitch($param){\n\t\t\tcase 'small':\n\t\t\t\tinclude(TEMPLATEPATH . '\/small.php');\n\t\t\t\t$flag = true;\n\t\t\t\tbreak;\n\t\t\tcase 'medium':\n\t\t\t\tinclude(TEMPLATEPATH . '\/medium.php');\n\t\t\t\t$flag = true;\n\t\t\t\tbreak;\n\t\t\tcase 'large':\n\t\t\t\tinclude(TEMPLATEPATH . '\/large.php');\n\t\t\t\t$flag = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\tif($flag){\n\t\t\texit;\n\t\t}\n\t}\n\tadd_action('template_redirect', 'load_original_template');\n[\/php]\n<\/p>\n<p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u65e5\u672c\u8a9e\u5316\u3059\u308b\u3068\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3000\u30fb\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u300csize\u300d\u3092\u53d7\u3051\u53d6\u308b\u3088\u3046\u306b\u3059\u308b\u3002<br \/>\n\u3000\u30fbsize\u306e\u5024\u304csmall\u3060\u3063\u305f\u5834\u5408\u306fsmall.php\u3092\u8aad\u307f\u8fbc\u3080\u3002<br \/>\n\u3000\u30fbsize\u306e\u5024\u304cmedium\u3060\u3063\u305f\u5834\u5408\u306fmedium.php\u3092\u8aad\u307f\u8fbc\u3080\u3002<br \/>\n\u3000\u30fbsize\u306e\u5024\u304clarge\u3060\u3063\u305f\u5834\u5408\u306flarge.php\u3092\u8aad\u307f\u8fbc\u3080\u3002<br \/>\n\u3000\u30fbsize\u306e\u5024\u304csmall\u3001medium\u3001large\u306e\u3069\u308c\u3067\u3082\u306a\u3044\u5834\u5408\u306f\u4f55\u3082\u3057\u306a\u3044\u3002<\/p>\n<p><strong>13\u884c\u76ee<\/strong><br \/>\n$_GET\u914d\u5217\u304b\u3089\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u53d7\u3051\u53d6\u308a\u307e\u3059\u3002\u53d7\u3051\u53d6\u3063\u305f\u5024\u306b\u5fdc\u3058\u3066\u3001\u3069\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u3080\u306e\u304b\u6761\u4ef6\u5206\u5c90\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\uff08GET\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u7c21\u5358\u3067\u5b89\u5168\u306a\u53d7\u3051\u53d6\u308a\u65b9\u306fWordPress\u304c\u7528\u610f\u3057\u3066\u304f\u308c\u3066\u3044\u308b\u304b\u3082&#8230;\uff09<br \/>\n\u8aad\u307f\u8fbc\u307e\u305b\u305f\u3044\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306fTEMPLATEPATH (\u30c6\u30fc\u30de\u306e\u30d1\u30b9\u3001\u73fe\u5728\u4f7f\u7528\u4e2d\u306e\u30c6\u30fc\u30de\u306esingle.php\u3084search.php\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea)\u306b\u4e88\u3081\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p><strong>34\u884c\u76ee<\/strong><br \/>\n\u3053\u306e\u52d5\u4f5c\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u306e\u304c\u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af\u300ctemplage_redirect\u300d\u3067\u3059\u3002\u3053\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af\u306f\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u8aad\u307f\u8fbc\u307f\u524d\u306b\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u8aad\u307f\u8fbc\u307f\u304c\u6210\u529f\u3057\u305f\u3089exit\u69cb\u6587\u3067\u51e6\u7406\u3092\u7d42\u4e86\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6a19\u6e96\u306eWordPress\u306e\u6a5f\u80fd\u3068\u3057\u3066\u3001GET\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306b\u5fdc\u3058\u3066\u8868\u793a\u3055\u308c\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304c\u5207\u308a\u66ff\u308f\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001p=15\u3068\u3044\u3046\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304cindex.php\u306b\u6e21\u3055\u308c\u308b\u3068\u3001single.php\u304c\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[1],"tags":[242],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8gd1W-mh","_links":{"self":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/1381"}],"collection":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1381"}],"version-history":[{"count":13,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/1381\/revisions"}],"predecessor-version":[{"id":1394,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/1381\/revisions\/1394"}],"wp:attachment":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}