{"id":54,"date":"2023-09-07T07:05:42","date_gmt":"2023-09-06T22:05:42","guid":{"rendered":"https:\/\/memo-log.net\/?p=54"},"modified":"2023-09-07T07:13:13","modified_gmt":"2023-09-06T22:13:13","slug":"comment-rating-field-pro%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e6%9c%89%e5%8a%b9%e5%8c%96%e6%99%82%e3%81%ab%e5%87%ba%e3%82%8b%e3%82%a8%e3%83%a9%e3%83%bc%e8%a7%a3%e6%b6%88%e6%b3%95","status":"publish","type":"post","link":"https:\/\/memo-log.net\/?p=54","title":{"rendered":"Comment Rating Field Pro\u30d7\u30e9\u30b0\u30a4\u30f3\u6709\u52b9\u5316\u6642\u306b\u51fa\u308b\u30a8\u30e9\u30fc\u89e3\u6d88\u6cd5"},"content":{"rendered":"\n<p>\u6b21\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u3053\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u6709\u52b9\u5316\u3059\u308b\u969b\u306b\u3001xxx\u6587\u5b57\u5206\u306e\u4e88\u671f\u3057\u306a\u3044\u51fa\u529b\u304c\u751f\u6210\u3055\u308c\u307e\u3057\u305f\u3002\u201cheaders already sent\u201d \u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3001RSS\u30d5\u30a3\u30fc\u30c9\u306e\u554f\u984c\u306a\u3069\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u306f\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u7121\u52b9\u5316\u307e\u305f\u306f\u524a\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p><\/blockquote>\n\n\n\n<p>\u6709\u52b9\u5316\u6642\u306b\u5b9f\u884c\u3055\u308c\u308bactivate\u30e1\u30bd\u30c3\u30c9\u3067\u30a8\u30e9\u30fc\u3092\u51fa\u529b\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u539f\u56e0\u306e\u3088\u3046\u3060\u3002<br>foreach\u306e\u914d\u5217\u5909\u6570\u540d\u306e\u30bf\u30a4\u30d7\u30df\u30b9\u304c\u539f\u56e0\u3002<br>$site\u3092\u3001\u76f4\u524d\u3067\u53d6\u5f97\u3057\u3066\u3044\u308b$sites\u306b\u4fee\u6b63\u3059\u308c\u3070\u30a8\u30e9\u30fc\u3092\u51fa\u3055\u305a\u306b\u6709\u52b9\u5316\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-file=\"comment-rating-field-pro-plugin\/includes\/admin\/install.php\" data-lang=\"PHP\"><code>$sites = wp_get_sites( array( \n\t&#39;limit&#39; =&gt; 0 \n) );\nforeach ( $site as $site ) { \/\/ $site\u3092$sites\u306b\u4fee\u6b63\u3059\u308c\u3070OK\n\tswitch_to_blog( $site-&gt;blog_id );\n\tComment_Rating_Field_Pro_Fields::get_instance()-&gt;activate();\n\tComment_Rating_Field_Pro_Groups::get_instance()-&gt;activate();\n\n\t\/\/ If no Group exists, create a Group and Field now\n\t$total = Comment_Rating_Field_Pro_Groups::get_instance()-&gt;total();\n\tif ( ! $total ) {\n\t\t\/\/ Create Group and Field\n\t\t$result = Comment_Rating_Field_Pro_Install::get_instance()-&gt;create_group_and_field( array(\n\t\t\t&#39;type&#39; =&gt; array(\n\t\t\t\t&#39;post&#39; =&gt; 1,\n\t\t\t),\n\t\t) );\n\n\t\t\/\/ Bail if an error occured\n\t\tif ( is_wp_error( $result ) ) {\n\t\t\twp_die( $result-&gt;get_error_message() );\n\t\t\treturn;\n\t\t}\n\t}\n\n\trestore_current_blog();\n}<\/code><\/pre><\/div>\n\n\n\n<p>\u53c2\u8003\uff1a <br><a href=\"https:\/\/wp-labo.com\/headers-already-sent\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u6709\u52b9\u5316\u5f8c\u306b\u4e88\u671f\u3057\u306a\u3044\u6587\u5b57\u51fa\u529b\u304c\u751f\u6210\u3055\u308c\u308b\u539f\u56e0\u3068\u306f\uff1f<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6b21\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u3002 \u3053\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u6709\u52b9\u5316\u3059\u308b\u969b\u306b\u3001xxx\u6587\u5b57\u5206\u306e\u4e88\u671f\u3057\u306a\u3044\u51fa\u529b\u304c\u751f\u6210\u3055\u308c\u307e\u3057\u305f\u3002\u201cheaders already sent\u201d \u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3001RSS\u30d5\u30a3\u30fc\u30c9\u306e\u554f\u984c\u306a\u3069\u304c\u767a\u751f\u3059\u308b\u5834 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/memo-log.net\/index.php?rest_route=\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/memo-log.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/memo-log.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/memo-log.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/memo-log.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":0,"href":"https:\/\/memo-log.net\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions"}],"wp:attachment":[{"href":"https:\/\/memo-log.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/memo-log.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/memo-log.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}