Your IP : 216.73.216.1
<?php
/**
* Widget_Areas
*
* @package pally
*/
namespace Pally;
use WP_Customize_Manager;
/**
* Widget areas/ panels / sidebars.
*
* @since 1.0.0
*/
class Widget_Areas {
/**
* Constructor.
*
* @since 1.0.0
* @access public
*/
public function __construct() {
add_action( 'widgets_init', [ $this, 'action_register_sidebars' ] );
}
/**
* Registers the sidebars.
*
* @since 1.0.0
* @access public
*/
public function action_register_sidebars() {
register_sidebar(
[
'name' => esc_html__( 'Sidebar', 'pally' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here. The sidebar widget area is visible on all pages.', 'pally' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
]
);
register_sidebar(
[
'name' => esc_html__( 'Footer Navigation', 'pally' ),
'id' => 'sidebar-custom-footer',
'description' => esc_html__( 'Widget area for the footer navigation', 'pally' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<span class="screen-reader-text">',
'after_title' => '</span>',
]
);
}
}