{"id":714,"date":"2013-07-01T14:52:26","date_gmt":"2013-07-01T14:52:26","guid":{"rendered":"http:\/\/musilda.cz\/?p=714"},"modified":"2013-07-01T14:52:26","modified_gmt":"2013-07-01T14:52:26","slug":"funkce-wp_login_form","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/funkce-wp_login_form\/","title":{"rendered":"Funkce wp_login_form"},"content":{"rendered":"
Funkce wp_login_form() umo\u017e\u0148uje vypsat p\u0159ihla\u0161ovac\u00ed formul\u00e1\u0159 kdekoliv v \u0161ablon\u011b WordPressu. P\u0159i pou\u017eit\u00ed rovnou vypisuje html formul\u00e1\u0159, ale pokud pot\u0159ebujete pou\u017e\u00edt m\u00edsto v\u00fdpisu \u0159et\u011bzec, sta\u010d\u00ed nastavit parametr echo na false.\u00a0<\/p>\n
Pou\u017eit\u00ed:<\/p>\n
wp_login_form( $args );<\/pre>\nPro jednoduch\u00e9 vyps\u00e1n\u00ed, nemus\u00edte $args definovat, ale pokud budete cht\u00edt m\u00edt absolutn\u00ed kontrolu, nad t\u00edm, co se zobraz\u00ed, nebo pot\u0159ebujete formul\u00e1\u0159 upravit, zde je p\u0159ehled v\u0161ech argument\u016f funkce:<\/p>\n
\n$args = array(\n 'echo' => true,\n 'redirect' => site_url( $_SERVER['REQUEST_URI'] ),\n 'form_id' => 'loginform',\n 'label_username' => __( 'Username' ),\n 'label_password' => __( 'Password' ),\n 'label_remember' => __( 'Remember Me' ),\n 'label_log_in' => __( 'Log In' ),\n 'id_username' => 'user_login',\n 'id_password' => 'user_pass',\n 'id_remember' => 'rememberme',\n 'id_submit' => 'wp-submit',\n 'remember' => true,\n 'value_username' => NULL,\n 'value_remember' => false );\n<\/pre>\nEcho<\/strong> – parametr ur\u010duje, zda funkce vr\u00e1t\u00ed html, nebo \u0159et\u011bzec, defaultn\u011b html.
\nRedirect<\/strong> – url pro p\u0159esm\u011brov\u00e1n\u00ed, mus\u00ed b\u00fdt zad\u00e1na absolutn\u011b
\nForm id<\/strong> – id html tagu FORM, defaultn\u011b „loginform“
\nLabel – username, password, remember a log in<\/strong> – parametry ur\u010duj\u00edc\u00ed, co se bude v labelech vypisovat, pokud je dopln\u00edte o textovou dom\u00e9nu, p\u0159idaj\u00ed se jako \u0159et\u011bzce pro p\u0159eklad do pot souboru.
\nID – username, password, remember, submit<\/strong> – obdobn\u00e9, jako u label\u016f, jen zde jsou definov\u00e1na id jednotliv\u00fdch prvk\u016f koment\u00e1\u0159e.
\nRemember<\/strong> – nastavuje, zda si formul\u00e1\u0159 bude pamatovat hodnoty.
\nValue username<\/strong> – pokud chcete z n\u011bjak\u00e9ho d\u016fvodu p\u0159edvyplnit pol\u00ed\u010dko jm\u00e9no, pou\u017eijte tento parametr.
\nValue remember<\/strong> – tato hodnota ur\u010duje, zda bude checkbox pro zapamatov\u00e1n\u00ed za\u0161krtnut, nebo ne.<\/p>\nPou\u017eit\u00ed funkce wp_login_form() je jednoduch\u00e9 a hod\u00ed se v\u0161ude tam, kde chcete m\u00edt zobrazen\u00fd p\u0159ihla\u0161ovac\u00ed formul\u00e1\u0159 a ve spojen\u00ed s dal\u0161\u00edmi funkcemi lze jednodu\u0161e umo\u017enit p\u0159ihl\u00e1\u0161en\u00ed a odhl\u00e1\u0161en\u00ed u\u017eivatel\u016f nap\u0159\u00edklad ze sidebaru.<\/p>\n","protected":false},"excerpt":{"rendered":"
Funkce wp_login_form() umo\u017e\u0148uje vypsat p\u0159ihla\u0161ovac\u00ed formul\u00e1\u0159 kdekoliv v \u0161ablon\u011b WordPressu. P\u0159i pou\u017eit\u00ed rovnou vypisuje html formul\u00e1\u0159, ale pokud pot\u0159ebujete pou\u017e\u00edt m\u00edsto v\u00fdpisu \u0159et\u011bzec, sta\u010d\u00ed nastavit parametr echo na false.\u00a0<\/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":[228],"class_list":["post-714","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-codex","category-template-tags","tag-login-form-wordpress"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/714"}],"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=714"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/714\/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=714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}