{"id":233103,"date":"2023-02-05T10:21:00","date_gmt":"2023-02-05T07:21:00","guid":{"rendered":"https:\/\/wordpress.mediadoma.com\/?p=233103"},"modified":"2023-02-05T10:21:02","modified_gmt":"2023-02-05T07:21:02","slug":"jak-dozvoliti-zobrazhennja-zamist-url-adresi-v-komentarjah-wordpress","status":"publish","type":"post","link":"https:\/\/wordpress.mediadoma.com\/uk\/jak-dozvoliti-zobrazhennja-zamist-url-adresi-v-komentarjah-wordpress\/","title":{"rendered":"\u042f\u043a \u0434\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u0430\u043c\u0456\u0441\u0442\u044c URL-\u0430\u0434\u0440\u0435\u0441\u0438 \u0432 \u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u044f\u0445 WordPress?"},"content":{"rendered":"<p>\u0417\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c URL-\u0430\u0434\u0440\u0435\u0441\u0438 \u0432 \u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u044f\u0445 \u0437\u0430\u043b\u0438\u0448\u0430\u044e\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u0437\u043c\u0456\u043d. \u042f\u043a\u0449\u043e \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447 \u0431\u0435\u0437\u043f\u043e\u0441\u0435\u0440\u0435\u0434\u043d\u044c\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u044c URL-\u0430\u0434\u0440\u0435\u0441\u0443 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f, \u0431\u0443\u043b\u043e \u0431 \u043d\u0435\u043f\u043e\u0433\u0430\u043d\u043e \u0437\u0430\u043c\u0456\u043d\u0438\u0442\u0438 URL-\u0430\u0434\u0440\u0435\u0441\u0443 \u0441\u043f\u0440\u0430\u0432\u0436\u043d\u0456\u043c HTML-\u0442\u0435\u0433\u043e\u043c img. \u0414\u043e\u0434\u0430\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0438\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 <a href=\"https:\/\/wordpress.mediadoma.com\/uk\/jak-keshuvati-marker-wechat-cherez-php\/\" title=\"\u043a\u043e\u0434\u0443 PHP\">\u043a\u043e\u0434\u0443 PHP<\/a> \u0443 \u0441\u0432\u043e\u044e \u0442\u0435\u043c\u0443 <a href=\"https:\/\/helloacm.com\/how-to-remove-product-review-in-woocommercewordpress\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">wordpress<\/a> <a href=\"https:\/\/helloacm.com\/how-to-remove-admin-topbar-in-wordpress\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">functions.php<\/a> :<\/p>\n<pre><code>\/\/ empty - allow all posts, otherwise, put post IDs joined by comma\ndefine('ALLOW_POSTS', '');\nfunction helloacm_allow_comment_image( $comment) {\n\u00a0 \u00a0 $post_ID = $comment[\"comment_post_ID\"];\n\u00a0 \u00a0 $allow_posts = ALLOW_POSTS? explode(',', ALLOW_POSTS): array();\n\u00a0 \u00a0 if(empty($allow_posts) || in_array($post_ID, $allow_posts)){\n\u00a0 \u00a0 \u00a0 \u00a0 global $allowedtags;\n\u00a0 \u00a0 \u00a0 \u00a0 $content = $comment[\"comment_content\"];\n\u00a0 \u00a0 \u00a0 \u00a0 $content = preg_replace('\/(https?:\/\/S+.(?:jpg|png|jpeg|gif|bmp))+\/','&lt;img \u00a0title=\"$0 How to Allow Images Instead of URL in WordPress Comments? wordpress \" src=\"$0\" \u00a0alt=\"$0 How to Allow Images Instead of URL in WordPress Comments? wordpress \" \u00a0\/&gt;',$content);\n\u00a0 \u00a0 \u00a0 \u00a0 $allowedtags['img'] = array('src' =&gt; array(), 'alt' =&gt; array());\n\u00a0 \u00a0 \u00a0 \u00a0 $comment[\"comment_content\"] = $content;\n\u00a0 \u00a0 }\n\u00a0 \u00a0 return $comment;\n}\nadd_filter('preprocess_comment', 'helloacm_allow_comment_image');<\/code><\/pre>\n<p>\u041c\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u043c\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u0438\u0439 \u0432\u0438\u0440\u0430\u0437 \u0434\u043b\u044f \u043f\u043e\u0448\u0443\u043a\u0443 URL-\u0430\u0434\u0440\u0435\u0441 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c (\u0437\u0430\u043a\u0456\u043d\u0447\u0443\u044e\u0442\u044c\u0441\u044f \u0440\u043e\u0437\u0448\u0438\u0440\u0435\u043d\u043d\u044f\u043c\u0438 jpg\/png\/jpeg\/gif\/bmp) \u0456 \u0437\u0430\u043c\u0456\u043d\u044e\u0454\u043c\u043e \u0442\u0435\u0433\u043e\u043c HTML img. \u041c\u0438 \u0442\u0430\u043a\u043e\u0436 \u043c\u0430\u0454\u043c\u043e \u0434\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u0438 \u0442\u0435\u0433 IMG \u0443 \u0440\u043e\u0437\u0434\u0456\u043b\u0456 \u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u0456\u0432, \u0449\u043e\u0431 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0438 \u0439\u043e\u0433\u043e. \u041d\u0430\u0432\u0435\u0434\u0435\u043d\u0443 \u0432\u0438\u0449\u0435 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0434\u043e\u0434\u0430\u0442\u0438 \u0434\u043e \u0444\u0456\u043b\u044c\u0442\u0440\u0430 preprocess_comment, \u044f\u043a\u0438\u0439 \u0432\u0438\u043a\u043b\u0438\u043a\u0430\u0454\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044f\u043c \u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u044f \u0432 <a href=\"https:\/\/helloacm.com\/easy-round-robin-scheduled-database-backup-on-linux\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u0438\u0445<\/a>.<\/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=\"\/\/helloacm.com\" class=\"external external_icon\">helloacm.com<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u042f\u043a \u0434\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u0430\u043c\u0456\u0441\u0442\u044c URL-\u0430\u0434\u0440\u0435\u0441\u0438 \u0432 \u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u044f\u0445 WordPress?<\/p>\n","protected":false},"author":1,"featured_media":224757,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_wp_rev_ctl_limit":""},"categories":[808,869,839,902,849],"tags":[1174],"class_list":["post-233103","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-10","category-wordpress-10","category-kerivnytstvo-dlia-pochatkivtsiv","category-kod-3","category-pidruchnyky","tag-affiai-uk"],"_links":{"self":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/233103","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=233103"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/233103\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media\/224757"}],"wp:attachment":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media?parent=233103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/categories?post=233103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/tags?post=233103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}