{"id":6492,"date":"2021-11-19T19:11:36","date_gmt":"2021-11-19T19:11:36","guid":{"rendered":"https:\/\/musilda.cz\/?p=6492"},"modified":"2021-11-19T19:11:36","modified_gmt":"2021-11-19T19:11:36","slug":"pridani-vlastniho-tabu-v-datech-produktu","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/pridani-vlastniho-tabu-v-datech-produktu\/","title":{"rendered":"P\u0159id\u00e1n\u00ed vlastn\u00edho tabu v datech produktu"},"content":{"rendered":"\n
V minul\u00e9m \u010dl\u00e1nku jsme si upravili zobrazen\u00ed metaboxu data produktu, tak aby nebyly vid\u011bt nepot\u0159ebn\u00e9 taby. Dnes si uk\u00e1\u017eeme, jak si p\u0159idat vlastn\u00ed tab, viditeln\u00fd jen pro n\u00e1\u0161 typ produktu.<\/p>\n\n\n\n
Vytvo\u0159ili jsme funkci musilda_event_product_data_tabs, do kter\u00e9 p\u0159id\u00e1me definici dal\u0161\u00edho tabu:<\/p>\n\n\n\n
Do pole option p\u0159id\u00e1me polo\u017eku s key event. D\u016fle\u017eit\u00e1 je hodnota target, kter\u00e1 ozna\u010duje id divu, kter\u00fd se bude zobrazovat po kliknut\u00ed na tab. <\/p>\n\n\n\n
Do akce woocommerce_product_data_panels, kter\u00e1 se vol\u00e1 po zobrazen\u00ed v\u0161ech tab\u016f, p\u0159id\u00e1me vlastn\u00ed funkci:<\/p>\n\n\n\n