DekodeInteraktiv / hogan-banner

Banner Module for Hogan
GNU General Public License v3.0
1 stars 0 forks source link

Adds actions on either side of the banner div #40

Closed rwrobe closed 5 years ago

rwrobe commented 5 years ago

Added actions before and after the banner wrapper to enable custom inline styles to be added, among other uses.

pederan commented 5 years ago

@rwrobe There are built in actions in Hogan Core that you can use, see Before template: https://github.com/DekodeInteraktiv/hogan-core/blob/master/includes/class-module.php#L345 After template: https://github.com/DekodeInteraktiv/hogan-core/blob/master/includes/class-module.php#L351

Check for passed in arg $this (as $module) : ('banner' === $module->name) then do your thing.

If you want to add your own acf field(s) to Hogan Banner (or any other module) that is also easy and you can use the filter hogan/module/inner_wrapper_classesto check for the value and add a css class. If you need to insert something custom, then you need to use the actions mentioned above.