This is an action event with the Genesis theming framework. Its intent is to setup the web page before the rest of the web page construction begins. In the logical sequence of the program execution, it occurs after the genesis_setup event fires. Therefore, first you initialize and then you setup your theme.
Genesis uses this event to setup the default widget (sidebar) areas:
- Header right
- Main sidebar
- Alternative sidebar
When the event
genesis_setup fires, each of the pre-registered callbacks (see the add_action Docx for more information) are invoked, i.e. meaning they run one-by-one in order.
In your theme or plugin, you register callbacks to this event setup the theme itself before the page begins to be built when
genesis() is called. Some tasks include, but are not limited to:
- Adding theme supports, e.g. HTML5, menus, viewport meta tag, widgets, structural wraps, etc.
- Adding custom image sizes
- Registering custom widget areas (sidebars)
- Unregistering any standard components that your project does not need, such as default sidebars and/or layouts.
You register your callback as follows:
bool add_action ( 'genesis_setup', callable $callback_name, integer $priority = 10 );
The event is then fired from the
genesis/lib/init.php file using
do_action( 'genesis_setup' );.
This function does not accept any parameters.
It does not return anything.
Break. Go rest your noodle for a couple of minutes.
Not to worry…more is coming very soon…keep checking back.