{"id":231825,"date":"2023-01-07T09:14:00","date_gmt":"2023-01-07T06:14:00","guid":{"rendered":"https:\/\/wordpress.mediadoma.com\/?p=231825"},"modified":"2023-01-07T11:20:51","modified_gmt":"2023-01-07T08:20:51","slug":"nalagodzhennja-wordpress-za-dopomogoju-ray-chastina-2","status":"publish","type":"post","link":"https:\/\/wordpress.mediadoma.com\/uk\/nalagodzhennja-wordpress-za-dopomogoju-ray-chastina-2\/","title":{"rendered":"\u041d\u0430\u043b\u0430\u0433\u043e\u0434\u0436\u0435\u043d\u043d\u044f WordPress \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e Ray, \u0447\u0430\u0441\u0442\u0438\u043d\u0430 2"},"content":{"rendered":"\n<p><strong>TL; DR:<\/strong> \u041e\u0441\u044c \u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u0456\u0431 \u0440\u043e\u0437\u043f\u043e\u0447\u0430\u0442\u0438 \u043d\u0430\u043b\u0430\u0433\u043e\u0434\u0436\u0435\u043d\u043d\u044f WordPress \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e Ray \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e Composer \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0456 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0443.<\/p>\n<hr \/>\n<p>\u041c\u0438\u043d\u0443\u043b\u043e\u0433\u043e \u0442\u0438\u0436\u043d\u044f <a href=\"https:\/\/wordpress.mediadoma.com\/uk\/nalagodzhennja-wordpress-za-dopomogoju-ray-chastina-1\/\" title=\"\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0432 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0432\u0441\u0442\u0443\u043f \u0434\u043e Ray\">\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0432 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0432\u0441\u0442\u0443\u043f \u0434\u043e Ray<\/a>, \u0449\u043e \u043c\u0435\u043d\u0456 \u043f\u043e\u0434\u043e\u0431\u0430\u0454\u0442\u044c\u0441\u044f \u0432 \u043d\u044c\u043e\u043c\u0443 \u0442\u0430 \u0447\u043e\u043c\u0443 \u043c\u0435\u043d\u0456 \u043f\u043e\u0434\u043e\u0431\u0430\u0454\u0442\u044c\u0441\u044f \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0439\u043e\u0433\u043e \u0437 WordPress. \u042f \u0442\u0430\u043a\u043e\u0436 \u0434\u0430\u0432 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043f\u043e\u0441\u0456\u0431\u043d\u0438\u043a \u043f\u0440\u043e \u0442\u0435, \u044f\u043a \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0439\u043e\u0433\u043e \u0443 \u0432\u0430\u0448\u043e\u043c\u0443 \u043f\u043e\u0432\u0441\u044f\u043a\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u0436\u0438\u0442\u0442\u0456, \u0430\u043b\u0435 \u0446\u0435 \u0432\u0441\u0435.<\/p>\n<p><a href=\"https:\/\/wordpress.mediadoma.com\/wp-content\/uploads\/2022\/01\/post-158283-61e6db6291814.png\" data-rel=\"lightbox\"><img decoding=\"async\" class=\"SDStudio-light-box-enable SDStudio-editor-tools-md-imp\" src=\"https:\/\/wordpress.mediadoma.com\/wp-content\/uploads\/2022\/01\/post-158283-61e6db6291814.png\" alt=\"\u041d\u0430\u043b\u0430\u0433\u043e\u0434\u0436\u0435\u043d\u043d\u044f WordPress \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e Ray, \u0447\u0430\u0441\u0442\u0438\u043d\u0430 2\"><\/a><\/p>\n<p>\u0410 \u0441\u0430\u043c\u0435, \u044f\u043a \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 Ray \u0437 WordPress \u0443 \u0440\u043e\u0431\u043e\u0447\u043e\u043c\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0456 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0456 Composer.<\/p>\n<h2>\u041d\u0430\u043b\u0430\u0433\u043e\u0434\u0436\u0435\u043d\u043d\u044f WordPress \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e Ray, \u0447\u0430\u0441\u0442\u0438\u043d\u0430 2<\/h2>\n<p>\u0412\u0441\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430, \u0447\u043e\u043c\u0443 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0432 \u0446\u0435, \u043f\u043e\u043b\u044f\u0433\u0430\u0454 \u0432 \u0434\u0432\u043e\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u0445:<\/p>\n<ol>\n<li>\u041c\u0435\u043d\u0456 \u043f\u043e\u0434\u043e\u0431\u0430\u0454\u0442\u044c\u0441\u044f \u0441\u0442\u0432\u043e\u0440\u044e\u0432\u0430\u0442\u0438 \u043f\u043b\u0430\u0433\u0456\u043d\u0438 WordPress \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e Composer, \u043a\u043e\u043b\u0438 \u0454 \u0442\u0430\u043a\u0430 \u043c\u043e\u0436\u043b\u0438\u0432\u0456\u0441\u0442\u044c,<\/li>\n<li>\u042f \u0437\u043d\u0430\u044e, \u0449\u043e \u0454 \u0439 \u0456\u043d\u0448\u0456, \u043a\u043e\u043c\u0443 \u043f\u043e\u0434\u043e\u0431\u0430\u0454\u0442\u044c\u0441\u044f \u0440\u043e\u0431\u0438\u0442\u0438 \u0442\u0435 \u0441\u0430\u043c\u0435, \u0456 \u0446\u0435 \u0434\u0430\u0441\u0442\u044c \u0432\u0430\u043c \u043c\u043e\u0436\u043b\u0438\u0432\u0456\u0441\u0442\u044c \u043f\u043e\u0447\u0430\u0442\u0438 \u0446\u0435 \u0440\u043e\u0431\u0438\u0442\u0438.<\/li>\n<\/ol>\n<h3>\u041d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f \u043a\u043e\u043d\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u0457 Composer<\/h3>\n<p>\u042f\u043a\u0449\u043e \u0432\u0438 <code>composer.json<\/code>\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u0438 \u0444\u0430\u0439\u043b\u0443, \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u0446\u0435\u0439 \u0440\u044f\u0434\u043e\u043a \u0434\u043e <code>require-dev<\/code>\u043e\u0431\u043b\u0430\u0441\u0442\u0456 \u0444\u0430\u0439\u043b\u0443:<\/p>\n<pre><code>{\n    ...\n    \"require-dev\": {\n        \"spatie\/ray\": \"^1.29.0\"\n    },\n    \"autoload\": {\n        \"psr-4\": {\n            ...\n        }\n    }\n}<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0456 \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u0430\u0431\u043e <code>$ composer install<\/code>\u0430\u0431\u043e <code>$ composer update<\/code>\u0437\u0430\u043b\u0435\u0436\u043d\u043e \u0432\u0456\u0434 \u0441\u0442\u0430\u043d\u0443 \u0432\u0430\u0448\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0443.<\/p>\n<p>\u0426\u0435 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Ray \u0443 <code>vendor<\/code>\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0456\u0457 \u0432\u0430\u0448\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0456\u043d\u0430, \u0456 \u0432\u0438 \u0437\u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043c\u043a\u043d\u0443\u0442\u0438 \u043f\u043b\u0430\u0433\u0456\u043d WordPress, \u043f\u0440\u043e \u044f\u043a\u0438\u0439 \u0439\u0448\u043b\u043e\u0441\u044f \u0432 \u043f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u0456\u0439 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457.<\/p>\n<h3>\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f Ray<\/h3>\n<p>\u041e\u0434\u043d\u0430\u043a, \u0449\u043e\u0431 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 Ray, \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u043d\u0430\u0442\u0438\u0441\u044f, \u0449\u043e \u0432\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0438 \u0456\u043c\u0435\u043d \u0456 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0454\u0442\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0456\u0440 \u0456\u043c\u0435\u043d Ray \u0434\u043b\u044f \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0438.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434:<\/p>\n<pre><code>namespace Acme;\n\nuse SpatieRay;\n\ndefine('WPINC') || die;\nrequire_once __DIR__. '\/vendor\/autoload.php';\n\nray('Loaded...');<\/code><\/pre>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0449\u043e \u0446\u0435 \u043d\u0435 \u0434\u0443\u0436\u0435 \u0444\u0430\u0439\u043b \u043f\u043b\u0430\u0433\u0456\u043d\u0430, \u0430\u043b\u0435 \u0439\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043d\u044c\u043e, \u0449\u043e\u0431 \u0432\u0438 \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0447\u0430\u0442\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u0438 \u0439\u043e\u0433\u043e \u0447\u0435\u0440\u0435\u0437 Composer \u0456 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u0456\u0440 \u0456\u043c\u0435\u043d, \u043d\u0430\u0434\u0430\u043d\u0438\u0439 \u043f\u0430\u043a\u0435\u0442\u043e\u043c.<\/p>\n<h2>\u0414\u043b\u044f \u0447\u0430\u0441\u0442\u0438\u043d\u0438 3, \u043c\u043e\u0436\u043b\u0438\u0432\u043e<\/h2>\n<p>\u042f \u043c\u0456\u0433 \u0431\u0438 \u0441\u043a\u0430\u0437\u0430\u0442\u0438, \u0449\u043e \u0434\u0430\u043b\u0456 \u044f \u0437\u0431\u0438\u0440\u0430\u044e\u0441\u044f \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0438 \u043f\u0440\u043e \u0432\u0441\u0456 \u0440\u0435\u0447\u0456, \u0434\u043b\u044f \u044f\u043a\u0438\u0445 \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 Ray \u0437 \u0442\u043e\u0447\u043a\u0438 \u0437\u043e\u0440\u0443 \u043d\u0430\u043b\u0430\u0433\u043e\u0434\u0436\u0435\u043d\u043d\u044f (\u0430\u0431\u043e, \u0442\u043e\u0447\u043d\u0456\u0448\u0435, \u043f\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043e\u0457 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438 \u0437\u043c\u0456\u043d\u043d\u0438\u0445 \u0456 \u0437\u0430\u043f\u0438\u0442\u0456\u0432) \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0447\u0438 \u0432\u0456\u0434\u0434\u0430\u043b\u0435\u043d\u043e, \u0430\u043b\u0435 \u0432\u0456\u0434\u0433\u0443\u043a \u043c\u043e\u0436\u0435 \u0432\u0438\u043c\u0430\u0433\u0430\u0442\u0438 \u0447\u043e\u0433\u043e\u0441\u044c \u0456\u043d\u0448\u043e\u0433\u043e, \u043d\u0456\u0436 \u0446\u0435.<\/p>\n<p>\u0422\u0430\u043a\u0438\u0439 \u043f\u043b\u0430\u043d, \u0430\u043b\u0435 \u043c\u0438 \u043f\u043e\u0431\u0430\u0447\u0438\u043c\u043e, \u0449\u043e \u0441\u0442\u0430\u043d\u0435\u0442\u044c\u0441\u044f \u043c\u0456\u0436 \u0446\u0456\u0454\u044e \u0441\u0442\u0430\u0442\u0442\u0435\u044e \u0442\u0430 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u044e.<\/p>\n<p><div id=\"PostUnique_PostSource\" style=\"padding-top: 50px\">\u0414\u0436\u0435\u0440\u0435\u043b\u043e \u0437\u0430\u043f\u0438\u0441\u0443:  <a target=\"_blank\" rel=\"noopener nofollow\" href=\"\/\/tommcfarlin.com\" class=\"external external_icon\">tommcfarlin.com<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041e\u0441\u044c \u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u0456\u0431 \u0440\u043e\u0437\u043f\u043e\u0447\u0430\u0442\u0438 \u043d\u0430\u043b\u0430\u0433\u043e\u0434\u0436\u0435\u043d\u043d\u044f WordPress \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e Ray \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e Composer \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0456 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0443.<\/p>\n","protected":false},"author":1,"featured_media":158284,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_wp_rev_ctl_limit":""},"categories":[869,756,839,902,849,788,923,725],"tags":[1174],"class_list":["post-231825","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-10","category-vidkryte-dzherelo","category-kerivnytstvo-dlia-pochatkivtsiv","category-kod-3","category-pidruchnyky","category-prohramne-zabezpechennia-z-vidkrytym-kodom","category-inshyj","category-rozrobnyk","tag-affiai-uk"],"_links":{"self":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/231825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/comments?post=231825"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/231825\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media\/158284"}],"wp:attachment":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media?parent=231825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/categories?post=231825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/tags?post=231825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}