{"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
<\/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 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<\/a><\/p>\n
<\/a><\/p>\n