{"id":110909,"date":"2013-07-29T14:51:05","date_gmt":"2013-07-29T14:51:05","guid":{"rendered":"https:\/\/ru.wordpress.org\/support\/2013\/07\/29\/%d0%9d%d0%b5-%d0%ba%d0%be%d1%80%d1%80%d0%b5%d0%ba%d1%82%d0%bd%d0%be-%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b0%d0%b5%d1%82-%d1%82%d0%b0%d0%ba%d1%81%d0%be%d0%bd%d0%be%d0%bc%d0%b8%d1%8f\/"},"modified":"2013-07-29T14:51:05","modified_gmt":"2013-07-29T14:51:05","slug":"%d0%9d%d0%b5-%d0%ba%d0%be%d1%80%d1%80%d0%b5%d0%ba%d1%82%d0%bd%d0%be-%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b0%d0%b5%d1%82-%d1%82%d0%b0%d0%ba%d1%81%d0%be%d0%bd%d0%be%d0%bc%d0%b8%d1%8f","status":"closed","type":"topic","link":"https:\/\/ru.wordpress.org\/support\/topic\/%d0%9d%d0%b5-%d0%ba%d0%be%d1%80%d1%80%d0%b5%d0%ba%d1%82%d0%bd%d0%be-%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b0%d0%b5%d1%82-%d1%82%d0%b0%d0%ba%d1%81%d0%be%d0%bd%d0%be%d0%bc%d0%b8%d1%8f\/","title":{"rendered":"\u041d\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a\u0441\u043e\u043d\u043e\u043c\u0438\u044f"},"content":{"rendered":"<p>\u042f \u0441\u043e\u0437\u0434\u0430\u043b \u0442\u0438\u043f \u0437\u0430\u043f\u0438\u0441\u0435\u0439 &#171;\u041a\u0430\u0440\u0442\u0438\u043d\u044b&#187; \u0438 \u0442\u0430\u043a\u0441\u043e\u043d\u043e\u043c\u0438\u044e &#171;\u0410\u0432\u0442\u043e\u0440&#187; \u043a \u043d\u0438\u043c.<br \/>\n\u0422\u0435\u043f\u0435\u0440\u044c \u0421\u043e\u0437\u0434\u0430\u043b \u043c\u043d\u043e\u0433\u043e &#171;\u043a\u0430\u0440\u0442\u0438\u043d&#187; \u0440\u0430\u0437\u043d\u044b\u0445 &#171;\u0430\u0432\u0442\u043e\u0440\u043e\u0432&#187;.<br \/>\n\u041d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c \u0447\u0442\u043e &#171;\u043a\u0430\u0440\u0442\u0438\u043d\u044b&#187; \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u043e\u0434\u043d\u043e\u0433\u043e &#171;\u0430\u0432\u0442\u043e\u0440\u0430&#187;, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u043c.<\/p>\n<pre><code>add_action(&#039;init&#039;, &#039;it_add_images&#039;);\nfunction it_add_images()\n{\n  $labels = array(\n    &#039;name&#039; =&gt; &#039;\u041a\u0430\u0440\u0442\u0438\u043d\u044b&#039;,\n    &#039;singular_name&#039; =&gt; &#039;\u041a\u0430\u0440\u0442\u0438\u043d\u044b&#039;,\n    &#039;add_new&#039; =&gt; &#039;\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u0443&#039;,\n    &#039;add_new_item&#039; =&gt; &#039;\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u0443&#039;,\n    &#039;edit_item&#039; =&gt; &#039;\u0420\u0435\u0434\u0430\u043a\u0442.&#039;,\n    &#039;new_item&#039; =&gt; &#039;\u041d\u043e\u0432\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0430&#039;,\n    &#039;all_items&#039; =&gt; &#039;\u0412\u0441\u0451&#039;,\n    &#039;view_item&#039; =&gt; &#039;\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440&#039;,\n    &#039;search_items&#039; =&gt; &#039;\u041f\u043e\u0438\u0441\u043a&#039;,\n    &#039;not_found&#039; =&gt;  &#039;\u041f\u0443\u0441\u0442\u043e&#039;,\n    &#039;not_found_in_trash&#039; =&gt; &#039;\u041f\u0443\u0441\u0442\u0430 \u0432 \u043c\u0443\u0441\u0430\u0440\u043a\u0438)))0&#039;,\n    &#039;parent_item_colon&#039; =&gt; &#039;&#039;,\n    &#039;menu_name&#039; =&gt; &#039;\u041a\u0430\u0440\u0442\u0438\u043d\u044b&#039;\n  );\n\n  $args = array(\n    &#039;labels&#039; =&gt; $labels,\n    &#039;public&#039; =&gt; true,\n    &#039;publicly_queryable&#039; =&gt; true,\n    &#039;show_ui&#039; =&gt; true,\n    &#039;query_var&#039; =&gt; true,\n    &#039;rewrite&#039; =&gt; array( &#039;slug&#039; =&gt; &#039;images&#039; ),\n    &#039;capability_type&#039; =&gt; &#039;post&#039;,\n    &#039;hierarchical&#039; =&gt; false,\n    &#039;menu_icon&#039; =&gt; &#039;https:\/\/cdn3.iconfinder.com\/data\/icons\/fatcow\/16\/picture.png&#039;,\n    &#039;menu_position&#039; =&gt; null,\n    &#039;has_archive&#039; =&gt; true,\n    &#039;supports&#039; =&gt; array(&#039;title&#039;,&#039;thumbnail&#039;,\/*&#039;author&#039;,&#039;thumbnail&#039;,&#039;excerpt&#039;,&#039;comments&#039;*\/)\n  );\n  register_post_type(&#039;images&#039;,$args);\n}\nadd_action( &#039;init&#039;, &#039;build_taxonomies&#039;);\nfunction build_taxonomies() {\n\tregister_taxonomy(\n\t\t&#039;author&#039;,\n\t\t&#039;images&#039;,\n\t\tarray(\n\t\t\t&#039;hierarchical&#039; =&gt; true,\n\t\t\t&#039;label&#039; =&gt; &#039;\u0410\u0432\u0442\u043e\u0440&#039;,\n\t\t\t&#039;query_var&#039; =&gt; true,\n\t\t\t&#039;rewrite&#039; =&gt; true\n\t\t)\n\t);\n}<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-110909","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/110909","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/110909\/revisions"}],"wp:attachment":[{"href":"https:\/\/ru.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=110909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}