HEX
Server: Apache/2.4.34 (Red Hat) OpenSSL/1.0.2k-fips
System: Linux WORDPRESS 3.10.0-1160.118.1.el7.x86_64 #1 SMP Thu Apr 4 03:33:23 EDT 2024 x86_64
User: digital (1020)
PHP: 7.2.24
Disabled: NONE
Upload Files
File: /datos/www/expodubai/wp-content/themes/osapaOld/inc/register_sidebar.php
<?php 
global $osapa_default_sidebars, $osapa_default_widgetareas;

$osapa_default_sidebars = array(
	array(
		'name' => esc_html__( 'Home Sidebar', 'osapa' ),
		'id' => 'home-sidebar',
		'description' => '',
		'before_widget' => '<section id="%1$s" class="widget-container %2$s">',
		'after_widget' => '</section>',
		'before_title' => '<div class="widget-title-wrapper"><a class="block-control" href="javascript:void(0)"></a><h3 class="widget-title product_title">',
		'after_title' => '</h3></div>',
		)
	,array(
		'name' => esc_html__( 'Blog Sidebar', 'osapa' ),
		'id' => 'blog-sidebar',
		'description' => '',
		'before_widget' => '<section id="%1$s" class="widget-container %2$s">',
		'after_widget' => '</section>',
		'before_title' => '<div class="widget-title-wrapper"><a class="block-control" href="javascript:void(0)"></a><h3 class="widget-title product_title">',
		'after_title' => '</h3></div>',
		)
	,array(
		'name' => esc_html__( 'Blog Detail Sidebar', 'osapa' ),
		'id' => 'blog-detail-sidebar',
		'description' => '',
		'before_widget' => '<section id="%1$s" class="widget-container %2$s">',
		'after_widget' => '</section>',
		'before_title' => '<div class="widget-title-wrapper"><a class="block-control" href="javascript:void(0)"></a><h3 class="widget-title product_title">',
		'after_title' => '</h3></div>',
		)
	,array(
		'name' => esc_html__( 'Product Category Sidebar', 'osapa' ),
		'id' => 'product-category-sidebar',
		'description' => '',
		'before_widget' => '<section id="%1$s" class="widget-container %2$s">',
		'after_widget' => '</section>',
		'before_title' => '<div class="widget-title-wrapper"><a class="block-control" href="javascript:void(0)"></a><h3 class="widget-title product_title">',
		'after_title' => '</h3></div>',
		)
	,array(
		'name' => esc_html__( 'Product Category Top Content', 'osapa' ),
		'id' => 'product-category-top-content',
		'description' => '',
		'before_widget' => '<section id="%1$s" class="widget-container %2$s">',
		'after_widget' => '</section>',
		'before_title' => '<div class="widget-title-wrapper"><a class="block-control" href="javascript:void(0)"></a><h3 class="widget-title product_title">',
		'after_title' => '</h3></div>',
		)
	,array(
		'name' => esc_html__( 'Product Detail Sidebar', 'osapa' ),
		'id' => 'product-detail-sidebar',
		'description' => '',
		'before_widget' => '<section id="%1$s" class="widget-container %2$s">',
		'after_widget' => '</section>',
		'before_title' => '<div class="widget-title-wrapper"><a class="block-control" href="javascript:void(0)"></a><h3 class="widget-title product_title">',
		'after_title' => '</h3></div>',
		)
	,array(
		'name'          => esc_html__( 'Product Detail Social Icon', 'osapa' ),
		'id'            => 'product-detail-social-icon',
		'before_widget' => '<div id="%1$s" class="widget %2$s">',
		'after_widget' => '</div>',
		'description'   => esc_html__( 'Add social icon in your product detail page.', 'osapa' ),
		)
	,
		array(
		'name'          => esc_html__( 'Popup Newletter', 'osapa' ),
		'id'            => 'popup-newletter',
		'before_widget' => '<div id="%1$s" class="widget %2$s">',
		'after_widget' => '</div>',
		'description'   => '',
	)
	);

$osapa_default_widgetareas = array(
	array(
		'name'          => esc_html__( 'Footer Top', 'osapa' ),
		'id'            => 'footer-top',
		'before_widget' => '<div id="%1$s" class="widget %2$s">',
		'after_widget' => '</div>',
		'description'   => esc_html__( 'Add widgets here to appear in your footer.', 'osapa' ),
		)
	,array(
		'name'          => esc_html__( 'Footer Middle', 'osapa' ),
		'id'            => 'footer-middle',
		'before_widget' => '<div id="%1$s" class="widget %2$s">',
		'after_widget' => '</div>',
		'description'   => esc_html__( 'Add widgets here to appear in your footer.', 'osapa' ),
		)
	,array(
		'name'          => esc_html__( 'Footer Bottom', 'osapa' ),
		'id'            => 'footer-bottom',
		'before_widget' => '<div id="%1$s" class="widget %2$s">',
		'after_widget' => '</div>',
		'description'   => esc_html__( 'Add widgets here to appear in your footer.', 'osapa' ),
		)
	);

$custom_sidebars = osapa_get_custom_sidebars();
if( is_array($custom_sidebars) && !empty($custom_sidebars) ){
	foreach( $custom_sidebars as $name ){
		$osapa_default_sidebars[] = array(
			'name' => ''.$name.'',
			'id' => sanitize_title($name),
			'description' => '',
			'class'			=> 'ftc-custom-sidebar',
			'before_widget' => '<section id="%1$s" class="widget-container %2$s">',
			'after_widget' => '</section>',
			'before_title' => '<div class="widget-title-wrapper"><a class="block-control" href="javascript:void(0)"></a><h3 class="widget-title product_title">',
			'after_title' => '</h3></div>',
			);
	}
}

function osapa_register_widget_area(){
	global $osapa_default_sidebars, $osapa_default_widgetareas;
	$default_sidebar = array_merge($osapa_default_sidebars, $osapa_default_widgetareas);
	foreach( $default_sidebar as $sidebar ){
		register_sidebar($sidebar);
	}
}
add_action( 'widgets_init', 'osapa_register_widget_area' );
?>