{"id":1106,"date":"2013-09-15T09:16:10","date_gmt":"2013-09-15T09:16:10","guid":{"rendered":"http:\/\/musilda.cz\/?p=1106"},"modified":"2013-09-15T09:16:10","modified_gmt":"2013-09-15T09:16:10","slug":"funkce-allowed_tags","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/funkce-allowed_tags\/","title":{"rendered":"Funkce allowed_tags"},"content":{"rendered":"
Funkce allowed_tags() je dal\u0161\u00ed z funkc\u00ed, jejich\u017e definici nenajdete v Codexu. P\u0159itom je pom\u011brn\u011b zn\u00e1m\u00e1 pro sv\u00e9 pou\u017eit\u00ed u koment\u00e1\u0159ov\u00fdch formul\u00e1\u0159\u016f. Funkce zobrazuje v\u00fdpis v\u0161ech povolen\u00fdch HTML tag\u016f i s jejich attributy. Co\u017e je velmi u\u017eite\u010dn\u00e9 pr\u00e1v\u011b u ji\u017e zm\u00edn\u011bn\u00fdch koment\u00e1\u0159\u016f, kde upozorn\u00edte u\u017eivatele na tagy, kter\u00e9 m\u016f\u017ee pou\u017e\u00edvat.<\/p>\n
Funkce nem\u00e1 \u017e\u00e1dn\u00e9 argumenty a pou\u017eit\u00ed je velmi jednoduch\u00e9:<\/p>\n
<pre lang=“php“><\/p>\n
echo allowed_tags();<\/p>\n
<\/pre><\/p>\n
Povolen\u00e9 tagy jsou v prom\u011bnn\u00e9 $allowedtags a pokud tou\u017e\u00edte po zm\u011bn\u011b povolen\u00fdch tag\u016f bez nutnosti \u00fapravy j\u00e1dra, najd\u011bte si funkci wp_kses().<\/p>\n
<\/p>\n","protected":false},"excerpt":{"rendered":"
Funkce allowed_tags() je dal\u0161\u00ed z funkc\u00ed, jejich\u017e definici nenajdete v Codexu. P\u0159itom je pom\u011brn\u011b zn\u00e1m\u00e1 pro sv\u00e9 pou\u017eit\u00ed u koment\u00e1\u0159ov\u00fdch formul\u00e1\u0159\u016f. Funkce zobrazuje v\u00fdpis v\u0161ech povolen\u00fdch HTML tag\u016f i s jejich attributy. Co\u017e je velmi u\u017eite\u010dn\u00e9 pr\u00e1v\u011b u ji\u017e zm\u00edn\u011bn\u00fdch koment\u00e1\u0159\u016f, kde upozorn\u00edte u\u017eivatele na tagy, kter\u00e9 m\u016f\u017ee pou\u017e\u00edvat. Funkce nem\u00e1 \u017e\u00e1dn\u00e9 argumenty a pou\u017eit\u00ed<\/p>\n","protected":false},"author":1,"featured_media":8523,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[7,22],"tags":[72],"class_list":["post-1106","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-codex","category-template-tags","tag-allowed_tags"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/1106"}],"collection":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/comments?post=1106"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/1106\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/8523"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=1106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=1106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=1106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}