%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/eirtvhdf/makkitrust.org/wp-content/themes/alhambra/templates/
Upload File :
Create Path :
Current File : /home/eirtvhdf/makkitrust.org/wp-content/themes/alhambra/templates/header-widgets.php

<?php
/**
 * The template to display the widgets area in the header
 *
 * @package WordPress
 * @subpackage ALHAMBRA
 * @since ALHAMBRA 1.0
 */

// Header sidebar
$alhambra_header_name = alhambra_get_theme_option('header_widgets');
$alhambra_header_present = !alhambra_is_off($alhambra_header_name) && is_active_sidebar($alhambra_header_name);
if ($alhambra_header_present) { 
	alhambra_storage_set('current_sidebar', 'header');
	$alhambra_header_wide = alhambra_get_theme_option('header_wide');
	ob_start();
	if ( is_active_sidebar($alhambra_header_name) ) {
		dynamic_sidebar($alhambra_header_name);
	}
	$alhambra_widgets_output = ob_get_contents();
	ob_end_clean();
	if (!empty($alhambra_widgets_output)) {
		$alhambra_widgets_output = preg_replace("/<\/aside>[\r\n\s]*<aside/", "</aside><aside", $alhambra_widgets_output);
		$alhambra_need_columns = strpos($alhambra_widgets_output, 'columns_wrap')===false;
		if ($alhambra_need_columns) {
			$alhambra_columns = max(0, (int) alhambra_get_theme_option('header_columns'));
			if ($alhambra_columns == 0) $alhambra_columns = min(6, max(1, substr_count($alhambra_widgets_output, '<aside ')));
			if ($alhambra_columns > 1)
				$alhambra_widgets_output = preg_replace("/class=\"widget /", "class=\"column-1_".esc_attr($alhambra_columns).' widget ', $alhambra_widgets_output);
			else
				$alhambra_need_columns = false;
		}
		?>
		<div class="header_widgets_wrap widget_area<?php echo !empty($alhambra_header_wide) ? ' header_fullwidth' : ' header_boxed'; ?>">
			<div class="header_widgets_inner widget_area_inner">
				<?php 
				if (!$alhambra_header_wide) { 
					?><div class="content_wrap"><?php
				}
				if ($alhambra_need_columns) {
					?><div class="columns_wrap"><?php
				}
				do_action( 'alhambra_action_before_sidebar' );
				alhambra_show_layout($alhambra_widgets_output);
				do_action( 'alhambra_action_after_sidebar' );
				if ($alhambra_need_columns) {
					?></div>	<!-- /.columns_wrap --><?php
				}
				if (!$alhambra_header_wide) {
					?></div>	<!-- /.content_wrap --><?php
				}
				?>
			</div>	<!-- /.header_widgets_inner -->
		</div>	<!-- /.header_widgets_wrap -->
		<?php
	}
}
?>

Zerion Mini Shell 1.0