{"id":1696,"date":"2014-04-02T20:25:52","date_gmt":"2014-04-02T20:25:52","guid":{"rendered":"http:\/\/musilda.cz\/?p=1696"},"modified":"2014-04-02T20:25:52","modified_gmt":"2014-04-02T20:25:52","slug":"funkce-has_post_format","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/funkce-has_post_format\/","title":{"rendered":"Funkce has_post_format"},"content":{"rendered":"

Funkce has_post_format() zji\u0161\u0165uje, zda m\u00e1 post, uveden\u00fd post format. Pou\u017e\u00edv\u00e1 se p\u0159edev\u0161\u00edm uvnit\u0159 loopu, ale lze, p\u0159i uveden\u00ed post id, pou\u017e\u00edt kdekoliv. Vhodn\u00e1, pokud pot\u0159ebujete v \u0161ablon\u011b zjistit existenci post form\u00e1tu \u010dl\u00e1nku.<\/p>\n

Pou\u017eit\u00ed:<\/p>\n

$format = has_post_format($format,$post_id);<\/pre>\n

$format – n\u00e1zev post form\u00e1tu, povinn\u00fd parametr.
\n$post_id – id \u010dl\u00e1nku, nutn\u00fd, pokud vol\u00e1te funkci mimo loop.<\/p>\n","protected":false},"excerpt":{"rendered":"

Funkce has_post_format() zji\u0161\u0165uje, zda m\u00e1 post, uveden\u00fd post format. Pou\u017e\u00edv\u00e1 se p\u0159edev\u0161\u00edm uvnit\u0159 loopu, ale lze, p\u0159i uveden\u00ed post id, pou\u017e\u00edt kdekoliv. Vhodn\u00e1, pokud pot\u0159ebujete v \u0161ablon\u011b zjistit existenci post form\u00e1tu \u010dl\u00e1nku.<\/p>\n","protected":false},"author":1,"featured_media":8523,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,15],"tags":[],"class_list":["post-1696","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-codex","category-post-funkce"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/1696"}],"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=1696"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/1696\/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=1696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=1696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=1696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}