{"id":1939,"date":"2014-08-19T18:47:42","date_gmt":"2014-08-19T18:47:42","guid":{"rendered":"http:\/\/musilda.cz\/?p=1939"},"modified":"2014-08-19T18:47:42","modified_gmt":"2014-08-19T18:47:42","slug":"funkce-has_excerpt","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/funkce-has_excerpt\/","title":{"rendered":"Funkce has_excerpt"},"content":{"rendered":"

Funkce has_excerpt zji\u0161\u0165uje, zda m\u00e1 \u010dl\u00e1nek zkr\u00e1cen\u00fd v\u00fdpis \u010dl\u00e1nku. D\u00e1 se vyu\u017e\u00edt p\u0159edev\u0161\u00edm v \u0161ablon\u011b, pokud chcete umo\u017enit odli\u0161n\u00e9 zobrazen\u00ed, pokud \u010dl\u00e1nek excerpt m\u00e1, nebo ne.<\/p>\n

Pou\u017eit\u00ed:<\/h2>\n
has_excerpt( $id );<\/pre>\n

Parametry:<\/h2>\n

$id – id \u010dl\u00e1nku,pokud je funkce pou\u017eita v loopu, nemus\u00ed b\u00fdt uveden, automaticky je p\u0159i\u0159azeno aktu\u00e1ln\u00ed id.<\/p>\n

Vrac\u00ed true, nebo false, podle toho, zda zkr\u00e1cen\u00fd p\u0159\u00edsp\u011bvek existuje, nebo ne.<\/p>\n

P\u0159\u00edklady:<\/h2>\n
\nglobal $post;\n\nif ( !has_excerpt() ) {\n    \/\/ \u010cl\u00e1nek nem\u00e1 zkr\u00e1cen\u00fd v\u00fdpis\n} else {\n    \/\/ \u010cl\u00e1nek m\u00e1 zkr\u00e1cen\u00fd v\u00fdpis\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

Funkce has_excerpt zji\u0161\u0165uje, zda m\u00e1 \u010dl\u00e1nek zkr\u00e1cen\u00fd v\u00fdpis \u010dl\u00e1nku. D\u00e1 se vyu\u017e\u00edt p\u0159edev\u0161\u00edm v \u0161ablon\u011b, pokud chcete umo\u017enit odli\u0161n\u00e9 zobrazen\u00ed, pokud \u010dl\u00e1nek excerpt m\u00e1, nebo ne.<\/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,15],"tags":[],"class_list":["post-1939","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\/1939"}],"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=1939"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/1939\/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=1939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=1939"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=1939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}