{"id":100,"date":"2013-04-06T15:35:38","date_gmt":"2013-04-06T15:35:38","guid":{"rendered":"http:\/\/musilda.cz\/?p=100"},"modified":"2013-04-06T15:35:38","modified_gmt":"2013-04-06T15:35:38","slug":"jak-pridat-dalsi-profily-socialnich-siti-do-user-info-ve-wordpressu","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-pridat-dalsi-profily-socialnich-siti-do-user-info-ve-wordpressu\/","title":{"rendered":"Jak p\u0159idat dal\u0161\u00ed profily soci\u00e1ln\u00edch s\u00edt\u00ed do user info ve WordPressu"},"content":{"rendered":"
V informac\u00edch o u\u017eivateli m\u016f\u017eete vyplnit informace, jejich rozsah je v\u0161ak siln\u011b omezen a n\u011bkter\u00e9, jako nap\u0159\u00edklad Yahoo IM jsou ji\u017e t\u00e9m\u011b\u0159 nevyu\u017eiteln\u00e9. Uk\u00e1\u017eeme si, jak p\u0159idat nov\u00e9 dv\u011b pole pro url Facebook profilu a Twitter \u00fa\u010dtu.<\/p>\n
Do function.php p\u0159id\u00e1me n\u00e1sleduj\u00edc\u00ed k\u00f3d pro vytvo\u0159en\u00ed nov\u00fdch dvou pol\u00ed\u010dek:<\/p>\n
<\/p>\n
function my_new_contactmethods( $contactmethods ) {\n \/\/ Add Twitter\n $contactmethods['twitter'] = 'Twitter';\n \/\/add Facebook\n $contactmethods['facebook'] = 'Facebook';\n\n return $contactmethods;\n}\nadd_filter('user_contactmethods','my_new_contactmethods',10,1);<\/pre>\nT\u00edm jsme p\u0159idali dv\u011b pole do informac\u00ed o u\u017eivateli a ulo\u017een\u00e9 informace pak v \u0161ablon\u011b vyp\u00ed\u0161eme takto:<\/p>\n
the_author_meta('facebook', $current_author->ID)<\/pre>\nPokud se rozhodneme odebrat pole s Yahoo IM, dopln\u00edme do na\u0161\u00ed funkce, p\u0159ed return tento k\u00f3d:<\/p>\n
unset($contactmethods['yim']);<\/pre>\nJak vid\u00edte, je to velmi snadn\u00e9.<\/p>\n","protected":false},"excerpt":{"rendered":"
V informac\u00edch o u\u017eivateli m\u016f\u017eete vyplnit informace, jejich rozsah je v\u0161ak siln\u011b omezen a n\u011bkter\u00e9, jako nap\u0159\u00edklad Yahoo IM jsou ji\u017e t\u00e9m\u011b\u0159 nevyu\u017eiteln\u00e9. Uk\u00e1\u017eeme si, jak p\u0159idat nov\u00e9 dv\u011b pole pro url Facebook profilu a Twitter \u00fa\u010dtu. Do function.php p\u0159id\u00e1me n\u00e1sleduj\u00edc\u00ed k\u00f3d pro vytvo\u0159en\u00ed nov\u00fdch dvou pol\u00ed\u010dek: function my_new_contactmethods( $contactmethods ) { \/\/ Add<\/p>\n","protected":false},"author":1,"featured_media":8624,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,19],"tags":[502,516],"class_list":["post-100","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-navody","category-snippety","tag-wordpress-navod","tag-wordpress-snipets"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/100"}],"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=100"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/100\/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=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}