ERROR<\/strong>:\n Passwords must be at least eight characters long\" );\n }\n}\n\nadd_action( 'register_post', 'vm_check_register_fields', 10, 3 );<\/pre>\nUr\u010dit\u011b jste si tak\u00e9 v\u0161imli, \u017ee se na formul\u00e1\u0159i ji\u017e nezobrazuje upozorn\u011bn\u00ed, \u017ee heslo bude zasl\u00e1no emailem. To nyn\u00ed postr\u00e1d\u00e1 smysl a proto jej odstran\u00edme. Bohu\u017eel se mi nepoda\u0159ilo p\u0159ij\u00edt na zp\u016fsob, kter\u00fd by fungoval univerz\u00e1ln\u011b pro jak\u00fdkoliv jazyk, proto jsem vytvo\u0159il filtr pro angli\u010dtinu a \u010de\u0161tinu. P\u0159i pou\u017eit\u00ed jin\u00e9ho jazyka je nutn\u00e9 zm\u011bnit podm\u00ednku:<\/p>\n
function vm_edit_password_email_text ( $text ) {\n\tif ( $text == 'A password will be e-mailed to you.' ) {\n\t\t$text = '';\n\t}\n\treturn $text;\n}\nadd_filter( 'gettext', 'vm_edit_password_email_text' );<\/pre>\nJako posledn\u00ed krok ulo\u017e\u00edme zadan\u00e9 heslo do datab\u00e1ze:<\/p>\n
function vm_register_extra_fields( $user_id ){\n\t$userdata = array();\n\n\t$userdata['ID'] = $user_id;\n\tif ( $_POST['password'] !== '' ) {\n\t\t$userdata['user_pass'] = $_POST['password'];\n\t}\n\t$new_user_id = wp_update_user( $userdata );\n}\nadd_action( 'user_register', 'vm_register_extra_fields', 100 );<\/pre>\nSamoz\u0159ejm\u011b, \u017ee by bylo fajn p\u0159idat je\u0161t\u011b kontrolu t\u0159eba pomoc\u00ed CAPTCHA, ale to nen\u00ed sou\u010d\u00e1st\u00ed tohoto \u010dl\u00e1nku.
\nV n\u011bkter\u00e9m z dal\u0161\u00edch \u010dl\u00e1nk\u016f pop\u00ed\u0161i zp\u016fsob, jak vytvo\u0159it widget s p\u0159ihla\u0161ovac\u00edm formul\u00e1\u0159em pro um\u00edst\u011bn\u00ed do sidebaru.<\/p>\n","protected":false},"excerpt":{"rendered":"
P\u0159i registraci do blogu be\u017e\u00edc\u00edm na redak\u010dn\u00edm syst\u00e9mu WordPress, je nutn\u00e9 nejprve zadat u\u017eivatelsk\u00e9 jm\u00e9no a email, n\u00e1hodn\u011b vygenerovan\u00e9 heslo n\u00e1m pak automaticky p\u0159ijde na zadan\u00fd email. Heslo si pak m\u016f\u017eeme zm\u011bnit v profilu u\u017eivatele. Jak postupovat, pokud chceme u\u017eivatel\u016fm umo\u017enit zadat sv\u00e9 heslo ji\u017e p\u0159i registraci a vynechat tak mezikrok s nutnost\u00ed kop\u00edrov\u00e1n\u00ed vygenerovan\u00e9ho<\/p>\n","protected":false},"author":1,"featured_media":8624,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,30],"tags":[257,319,320],"class_list":["post-9805","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-navody","category-wordpress","tag-navod-wordpress","tag-registrace-wordpress","tag-registracni-formular"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/9805"}],"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=9805"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/9805\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/8624"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=9805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=9805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=9805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}