ThemeFuse / Unyson

A WordPress framework that facilitates the development of WP themes
http://unyson.io
921 stars 216 forks source link

Hooks for inserting custom HTML #1033

Closed ivandotv closed 6 years ago

ivandotv commented 9 years ago

Are there any hooks for inserting custom HTML before or after tabs, metaboxes, options etc..?

ghost commented 9 years ago

Can you explain what are you trying to do, why you need such hooks?

ivandotv commented 9 years ago

I'm trying to add some custom text above / below some of the metaboxes, or options. I want to add a video etc... Currently I'm trying to use custom HTML field for it , but that is creating a additional value in the database. screenshot_00120151120 t

danyj commented 9 years ago

You would need to make custom option type http://manual.unyson.io/en/latest/options/create-option-type.html#content with html param before/after

ivandotv commented 9 years ago

Well that kind of defeats the purpose. I see two scenarios how this could be resolved. 1.There could be hooks before printing every option. Or at the start and end of metabox. 2.Or there should be a flag on the custom html field to be skipped for database insertion.

danyj commented 9 years ago

@ikixxx I was after same thing when I first started using Unyson ( asked exact same question ) in Jan but soon figured out that base is base and anything beyond that should be made by us. And is not hard to do it.

your idea for the hook is not bad at all since if we only add a hook we dont have to refactor all options, @moldcraft might consider it.