{"id":2126,"date":"2014-11-15T18:30:30","date_gmt":"2014-11-15T18:30:30","guid":{"rendered":"http:\/\/musilda.cz\/?p=2126"},"modified":"2014-11-15T18:30:30","modified_gmt":"2014-11-15T18:30:30","slug":"jak-pridat-placeholder-do-prihlasovaciho-formulare","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-pridat-placeholder-do-prihlasovaciho-formulare\/","title":{"rendered":"Jak p\u0159idat placeholder do p\u0159ihla\u0161ovac\u00edho formul\u00e1\u0159e"},"content":{"rendered":"
D\u00edky tomu, \u017ee WordPress nab\u00edz\u00ed \u0159adu akc\u00ed a filtr\u016f, je mo\u017en\u00e9 upravit t\u00e9m\u011b\u0159 cokoliv. Pomoc\u00ed akce\u00a0login_enqueue_scripts vlo\u017e\u00edme js soubor, kter\u00fd do p\u0159ihla\u0161ovac\u00edho formul\u00e1\u0159e p\u0159id\u00e1 placeholder.<\/p>\n
Vytvo\u0159\u00edme si tedy jednoduch\u00fd js soubor, kter\u00fd bude obsahovat<\/p>\n
\njQuery(document).ready(function(){\n jQuery('#user_login').attr('placeholder', 'Jm\u00e9no');\n jQuery('#user_email').attr('placeholder', 'Email');\n jQuery('#user_pass').attr('placeholder', 'Heslo');\n});\n<\/pre>\nDo functions.php pak p\u0159id\u00e1me:<\/p>\n
\nadd_action( 'login_enqueue_scripts', 'musilda_login_enqueue_scripts', 10 );\nfunction musilda_login_enqueue_scripts() {\n wp_enqueue_script( 'custom.js', get_template_directory_uri() . '\/js\/custom.js', array( 'jquery' ), 1.0 );\n}\n<\/pre>\nA takto jednodu\u0161e p\u0159id\u00e1te placeholder do p\u0159ihla\u0161ovac\u00edho formul\u00e1\u0159e.<\/p>\n","protected":false},"excerpt":{"rendered":"
D\u00edky tomu, \u017ee WordPress nab\u00edz\u00ed \u0159adu akc\u00ed a filtr\u016f, je mo\u017en\u00e9 upravit t\u00e9m\u011b\u0159 cokoliv. Pomoc\u00ed akce\u00a0login_enqueue_scripts vlo\u017e\u00edme js soubor, kter\u00fd do p\u0159ihla\u0161ovac\u00edho formul\u00e1\u0159e p\u0159id\u00e1 placeholder.<\/p>\n","protected":false},"author":1,"featured_media":1978,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[19],"tags":[],"class_list":["post-2126","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippety"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2126"}],"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=2126"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2126\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/1978"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=2126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=2126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=2126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}