2014-10-20 14:00:05 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
2015-04-30 12:24:30 -07:00
|
|
|
* Trestle widget area registration and functionality.
|
|
|
|
|
*
|
2014-10-20 14:00:05 -07:00
|
|
|
* @since 1.0.0
|
2015-04-30 12:24:30 -07:00
|
|
|
*
|
2014-10-20 14:00:05 -07:00
|
|
|
* @package Trestle
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
//add_action( 'widgets_init', 'trestle_register_widget_areas' );
|
|
|
|
|
/**
|
2015-04-30 12:24:30 -07:00
|
|
|
* Register custom widget areas.
|
2014-10-20 14:00:05 -07:00
|
|
|
*
|
|
|
|
|
* @since 1.0.0
|
|
|
|
|
*/
|
|
|
|
|
function trestle_register_widget_areas() {
|
|
|
|
|
genesis_register_widget_area( array(
|
|
|
|
|
'id' => 'sample-widget-area',
|
|
|
|
|
'name' => __( 'Sample Widget Area', 'trestle' ),
|
|
|
|
|
'description' => __( 'This is the sample widget area', 'trestle' ),
|
|
|
|
|
) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//add_action( 'genesis_header', 'trestle_output_sample_widget_area' );
|
|
|
|
|
/**
|
|
|
|
|
* Output sample widget area.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.2.0
|
|
|
|
|
*/
|
|
|
|
|
function trestle_output_sample_widget_area() {
|
|
|
|
|
genesis_widget_area( 'sample-widget-area', array(
|
|
|
|
|
'before' => '<aside class="sample-widget-area widget-area">',
|
|
|
|
|
'after' => '</aside>',
|
|
|
|
|
) );
|
|
|
|
|
}
|