{"id":4377,"date":"2024-11-14T10:49:28","date_gmt":"2024-11-14T10:49:28","guid":{"rendered":"https:\/\/forestgreen-jay-845795.hostingersite.com\/?p=4377"},"modified":"2024-12-12T18:22:20","modified_gmt":"2024-12-12T18:22:20","slug":"%d0%be%d1%82%d1%80%d1%8b%d0%b2%d0%ba%d0%b8-%d0%b1%d0%b5%d0%b7-%d0%bf%d1%80%d0%be%d0%b1%d0%bb%d0%b5%d0%bc","status":"publish","type":"post","link":"https:\/\/newsbee.blog\/wp-tips\/2024\/11\/14\/4377\/","title":{"rendered":"\u041e\u0442\u0440\u044b\u0432\u043a\u0438 \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c"},"content":{"rendered":"<p>\u041d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043c\u043d\u0435 \u0441\u043b\u043e\u0432\u043e &#171;\u043e\u0442\u0440\u044b\u0432\u043e\u043a&#187;, &#171;\u0446\u0438\u0442\u0430\u0442\u0430&#187; \u043a\u0440\u0430\u0441\u0438\u0432\u0435\u0439, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u043e \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 WordPress \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u044e\u0442 \u043e\u0442\u0440\u044b\u0432\u043a\u0438&#8230;<\/p>\n<p>\u041a\u043e\u0440\u043e\u0447\u0435, \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0442\u0440\u044b\u0432\u043a\u043e\u0432 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0442\u0430\u043a \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f &#171;\u041e\u0442\u0440\u044b\u0432\u043e\u043a&#187;. \u041c\u043e\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0430\u0448 \u043e\u0442\u0440\u044b\u0432\u043e\u043a \u0442\u0435\u043a\u0441\u0442\u0430 \u0438\u0437 \u0437\u0430\u043c\u0435\u0442\u043a\u0438. \u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0442\u0435\u043c\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c &#8212; 20 \u0441\u043b\u043e\u0432 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u044d\u0442\u043e \u043f\u043e\u043b\u0435, WP \u0441\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043e\u0442\u0440\u044b\u0432\u043e\u043a, \u0432\u0437\u044f\u0432 \u043f\u0435\u0440\u0432\u044b\u0435 20 \u0441\u043b\u043e\u0432 \u0438\u0437 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u0423\u0434\u043e\u0431\u043d\u043e, \u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0440\u044b\u0432\u043e\u043a \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0442\u0440\u044b\u0432&#8230;<\/p>\n<p>\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043a\u0430\u043a \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0442\u0440\u044b\u0432\u043a\u043e\u0432, \u0442\u0430\u043a \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043d\u0438\u043f\u043f\u0435\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0440\u0451\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444 (\u0434\u043e \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438) \u0438\u0437 \u043f\u043e\u0441\u0442\u0430. \u041f\u043e\u0434 \u043f\u043e\u0441\u0442\u043e\u043c \u044f \u0438\u043c\u0435\u044e \u0432 \u0432\u0438\u0434\u0443, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043b\u044e\u0431\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e, \u0437\u0430\u043c\u0435\u0442\u043a\u0443, \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u0437\u0434\u0435\u0441\u044c \u0441\u043b\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444 \u043d\u0435 \u0431\u044b\u043b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043b\u0438\u043d\u043d\u044b\u043c \u0438\u043b\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u043c &#8212; \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u043b\u043e\u0433\u0430 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u043c\u0430\u043d\u043d\u044b\u043c.<\/p>\n<div class=\"code-block-wrapper\" style=\"position: relative;\">\n        <button class=\"copy-button\" id=\"copy_code_block_69f97dc1e846e\" data-target=\"code_block_69f97dc1e846e\" style=\"\n            position: absolute; \n            top: 10px; \n            right: 10px; \n            background: #0073aa; \n            color: #fff; \n            border: none; \n            padding: 5px 10px; \n            cursor: pointer; \n            font-size: 12px;\n            border-radius: 5px;\">Copy<\/button><\/p>\n<pre><code id=\"code_block_69f97dc1e846e\">\r\nfunction custom_wp_newline_excerpt($excerpt) {\r\n    global $post;\r\n    \r\n    \/\/ If there&#039;s a manual excerpt, return it\r\n    if (!empty($post-&gt;post_excerpt)) {\r\n        return $excerpt;\r\n    }\r\n    \r\n    \/\/ Get the post content\r\n    $content = $post-&gt;post_content;\r\n    \r\n    \/\/ Remove shortcodes and blocks\r\n    $content = strip_shortcodes($content);\r\n    $content = preg_replace(&#039;\/&lt;!-- wp:.*?--&gt;\/s&#039;, &#039;&#039;, $content);\r\n    \r\n    \/\/ Split at first newline and take first part\r\n    $parts = explode(&quot;\\n&quot;, $content);\r\n    $first_part = $parts[0];\r\n    \r\n    \/\/ Clean up the excerpt\r\n    $first_part = strip_tags($first_part);\r\n    $first_part = trim($first_part);\r\n    \r\n    return wp_kses_post($first_part);\r\n}\r\nadd_filter(&#039;get_the_excerpt&#039;, &#039;custom_wp_newline_excerpt&#039;);\r\n<\/code><\/pre>\n<\/p><\/div>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u0432 \u043d\u043e\u0432\u044b\u0439 \u0441\u043d\u0438\u043f\u043f\u0435\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Code Snippets (\u0438\u043b\u0438 \u043a\u0430\u043a \u0432\u0430\u043c \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043a\u0430\u043a \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0442\u0440\u044b\u0432\u043a\u0430, \u0442\u0430\u043a \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043d\u0438\u043f\u043f\u0435\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0440\u0451\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444 (\u0434\u043e \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438) \u0438\u0437 \u043f\u043e\u0441\u0442\u0430. \u042d\u0442\u043e\u0442 \u043e\u0442\u0440\u044b\u0432\u043e\u043a \u0438\u0437 \u043f\u043e\u043b\u044f.<\/p>\n <a class=\"read-more-button\" href=\"https:\/\/newsbee.blog\/wp-tips\/2024\/11\/14\/4377\/\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435<\/a>","protected":false},"author":1,"featured_media":4378,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[39,49],"class_list":["post-4377","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippets","tag-snippets","tag-49"],"_links":{"self":[{"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/posts\/4377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/comments?post=4377"}],"version-history":[{"count":8,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/posts\/4377\/revisions"}],"predecessor-version":[{"id":5417,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/posts\/4377\/revisions\/5417"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/media\/4378"}],"wp:attachment":[{"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/media?parent=4377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/categories?post=4377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/newsbee.blog\/wp-tips\/wp-json\/wp\/v2\/tags?post=4377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}