Since: 1.0 Last Updated:
Back to Main Index

header() is one of 5 default helper functions defined in the Layers_Form_Elements class used specifically for defining the title and excerpt or header section of a form or widget.

Location: /core/helpers/forms.php


The header function accepts one parameter as an array, the function then decodes the array as needed.

Default arguments are:

  • title – Title to be displayed in this header
  • icon_class – Icon class to use, which will be prefixed with ‘icon-‘


This function is used to output a uniform widget header.

Or see how it is used within the form() function of a builder widget

The above will output the following HTML:

See Developer Tutorials: Layers Builder Widgets for a detailed overview of using these class helpers in widget building.

Similar to: