Skip to content

Instantly share code, notes, and snippets.

@craigsimps
Created June 12, 2018 13:06
Show Gist options
  • Save craigsimps/afbfb4357539096dd110e33d448c784f to your computer and use it in GitHub Desktop.
Save craigsimps/afbfb4357539096dd110e33d448c784f to your computer and use it in GitHub Desktop.
<?php
/**
* Register widget areas.
*
* @uses genesis_register_widget_area()
*
* @since 1.0.0
*/
add_action( 'widgets_init', function () {
$widget_areas = [
[
'id' => 'example-widget-area',
'name' => __( 'Example Widget Area', 'generico' ),
'description' => __( 'This is an example widget area, it\'s not used for anything in particular.', 'generico' ),
],
[
'id' => 'another-widget-area',
'name' => __( 'Another Widget Area', 'generico' ),
'description' => __( 'This is another example widget area, it\'s not used for anything in particular.', 'generico' ),
]
];
array_map( 'genesis_register_widget_area', $widget_areas );
}, 5 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment