{"id":1608,"date":"2014-03-07T21:23:26","date_gmt":"2014-03-07T21:23:26","guid":{"rendered":"http:\/\/musilda.cz\/?p=1608"},"modified":"2014-03-07T21:23:26","modified_gmt":"2014-03-07T21:23:26","slug":"funkce-get_delete_post_link","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/funkce-get_delete_post_link\/","title":{"rendered":"Funkce get_delete_post_link"},"content":{"rendered":"

Dal\u0161\u00ed jednoduchou funkc\u00ed, kter\u00e1 je velmi podobn\u00e1 t\u00e9, o kter\u00e9 jsem psal v minul\u00e9m Codexu, je funkce get_delete_post_link(). Funkci m\u016f\u017eete vyu\u017e\u00edt v \u0161ablon\u011b WordPressu, pro vytvo\u0159en\u00ed odkazu na smaz\u00e1n\u00ed \u010dl\u00e1nku. Vyu\u017e\u00edv\u00e1 t\u0159i argumenty, kde re\u00e1ln\u011b pou\u017eijete pouze jeden. Funkci m\u016f\u017eete pou\u017e\u00edt i mimo loop<\/p>\n

Pou\u017eit\u00ed<\/h3>\n
\necho get_delete_post_link( $id, $deprecated, $force_delete );\n<\/pre>\n

$id – prvn\u00ed argument je id postu. K n\u011bmu nen\u00ed co dodat<\/p>\n

$deprecated – argument deprecated ur\u010duje, zda je funkce „zavr\u017een\u00e1“, co\u017e znamen\u00e1, \u017ee se ji\u017e nebude pou\u017e\u00edvat a v budoucnosti bude mo\u017en\u00e1 odstran\u011bna. U t\u00e9to funkce, nen\u00ed deprecate vyu\u017eito.<\/p>\n

$force_delete – argument, kter\u00fd ur\u010duje, zda bude post rovnou smaz\u00e1n (true), nebo nejprve p\u0159esunut do ko\u0161e (false). Defaultn\u011b je false. P\u0159i pou\u017eit\u00ed t\u0159et\u00edho argumentu, mus\u00edte pou\u017e\u00edt i $deprecated = “;<\/p>\n","protected":false},"excerpt":{"rendered":"

Dal\u0161\u00ed jednoduchou funkc\u00ed, kter\u00e1 je velmi podobn\u00e1 t\u00e9, o kter\u00e9 jsem psal v minul\u00e9m Codexu, je funkce get_delete_post_link(). Funkci m\u016f\u017eete vyu\u017e\u00edt v \u0161ablon\u011b WordPressu, pro vytvo\u0159en\u00ed odkazu na smaz\u00e1n\u00ed \u010dl\u00e1nku. Vyu\u017e\u00edv\u00e1 t\u0159i argumenty, kde re\u00e1ln\u011b pou\u017eijete pouze jeden. Funkci m\u016f\u017eete pou\u017e\u00edt i mimo loop<\/p>\n","protected":false},"author":1,"featured_media":8523,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,22],"tags":[],"class_list":["post-1608","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-codex","category-template-tags"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/1608"}],"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=1608"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/1608\/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=1608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=1608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=1608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}