{"id":2427,"date":"2015-05-27T07:50:38","date_gmt":"2015-05-27T07:50:38","guid":{"rendered":"http:\/\/musilda.cz\/?p=2427"},"modified":"2015-05-27T07:50:38","modified_gmt":"2015-05-27T07:50:38","slug":"hookr-io-nejvetsi-databaze-funkci-a-hooku-pro-wordpress","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/hookr-io-nejvetsi-databaze-funkci-a-hooku-pro-wordpress\/","title":{"rendered":"Hookr.io nejv\u011bt\u0161\u00ed datab\u00e1ze funkc\u00ed a hook\u016f pro WordPress"},"content":{"rendered":"

Programujete pluginy, upravujete \u0161ablony t\u0159et\u00edch stran, nebo se jen hrabete v k\u00f3du? Pak se v\u00e1m bude ur\u010dit\u011b zamlouvat web, kter\u00fd funguje jako codex pro pluginy.<\/p>\n

Ur\u010dit\u011b se v\u00e1m ji\u017e stalo, \u017ee jste v n\u011bjak\u00e9m pluginu, pro mne typicky ve WooCommerce, narazili na n\u011bjak\u00fd filter, nebo akci a pot\u0159ebovali jste zjitit, k \u010demu p\u0159esn\u011b slou\u017e\u00ed, jak\u00e1 data jsou do n\u00ed pos\u00edl\u00e1na, zkr\u00e1tka jak s n\u00ed pracovat.<\/p>\n

U WordPressu je to jednoduch\u00e9, tan m\u00e1 codex. I WooCommerce m\u00e1 sv\u016fj codex, ale co dal\u0161\u00ed pluginy? Nap\u0159\u00edklad bbPress? Kdo by cht\u011bl proch\u00e1zet tis\u00edce \u0159\u00e1dk\u016f k\u00f3du, kdy\u017e pot\u0159ebuje upravit jednu v\u011bc.<\/p>\n

Na\u0161t\u011bst\u00ed je zde Hookr.io<\/h2>\n

\"hookr\"<\/a><\/p>\n

 <\/p>\n

Tam najdete skoro v\u0161e, co pot\u0159ebujete, sta\u010d\u00ed pou\u017e\u00edt vyhled\u00e1v\u00e1n\u00ed.<\/p>\n

Jak to funguje uk\u00e1\u017ei na funkci wc_price, kter\u00e1 slou\u017e\u00ed k form\u00e1tov\u00e1n\u00ed ceny ve WooCommerce, po\u0161lete do n\u00ed \u010d\u00edslo, ona v\u00e1m vr\u00e1t\u00ed cenu i s m\u011bnou, vlevo, nebo vpravo, dle nastaven\u00e9 eshopu.<\/p>\n

Po zad\u00e1n\u00ed do vyhled\u00e1vac\u00edho formul\u00e1\u0159e dostanete nab\u00eddku nalezen\u00fdch mo\u017enost\u00ed a po kliknut\u00ed se v\u00e1m zobraz\u00ed str\u00e1nka s detaily.<\/p>\n

\"popis\"<\/a><\/p>\n

Vid\u00edte n\u00e1zev funkce, k \u010demu slou\u017e\u00ed, jak\u00e9 m\u00e1 parametry a co v\u00e1m vr\u00e1t\u00ed.<\/p>\n

A hned pod t\u00edm je uk\u00e1zka pou\u017eit\u00ed<\/p>\n

\"usage\"<\/a><\/p>\n

 <\/p>\n

Co je ale d\u016fle\u017eit\u011bj\u0161\u00ed, na z\u00e1v\u011br v\u00e1m str\u00e1nka zobraz\u00ed um\u00edst\u011bn\u00ed funkce – tedy v jak\u00e9m souboru se nach\u00e1z\u00ed a jej\u00ed celou definici.<\/p>\n

\"defined\"<\/a><\/p>\n

 <\/p>\n

 <\/p>\n

Jak vid\u00edte, pom\u011brn\u011b jednodu\u0161e si m\u016f\u017eete zjistit, co jak\u00e1 funkce, t\u0159\u00edda, akce, nebo filtr d\u011blaj\u00ed a jak funguj\u00ed. S\u00e1m Hookr vyu\u017e\u00edv\u00e1m pom\u011brn\u011b \u010dasto, v p\u0159\u00edpadech, kdy nev\u00edm, kde hledat to co pot\u0159ebuji. Tento web by m\u011bl m\u00edt v z\u00e1lo\u017ek\u00e1ch ka\u017ed\u00fd WordPress program\u00e1tor.<\/p>\n","protected":false},"excerpt":{"rendered":"

Programujete pluginy, upravujete \u0161ablony t\u0159et\u00edch stran, nebo se jen hrabete v k\u00f3du? Pak se v\u00e1m bude ur\u010dit\u011b zamlouvat web, kter\u00fd funguje jako codex pro pluginy. Ur\u010dit\u011b se v\u00e1m ji\u017e stalo, \u017ee jste v n\u011bjak\u00e9m pluginu, pro mne typicky ve WooCommerce, narazili na n\u011bjak\u00fd filter, nebo akci a pot\u0159ebovali jste zjitit, k \u010demu p\u0159esn\u011b slou\u017e\u00ed, jak\u00e1<\/p>\n","protected":false},"author":1,"featured_media":2428,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[189,460],"class_list":["post-2427","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-hookr","tag-wordpress-2"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2427"}],"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=2427"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/2427\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/2428"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=2427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=2427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=2427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}