This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Astra_Update_Header_Builder::get_zone_label( string $section, string $zone )

Get human-readable zone label.


Description


Parameters

$section

(string) (Required) Section name (popup, above, primary, below).

$zone

(string) (Required) Zone name (e.g., primary_left, above_center).


Return

(string) Formatted zone label.


Source

File: inc/abilities/customizer/header/class-astra-update-header-builder.php

	private function get_zone_label( $section, $zone ) {
		$section_labels = array(
			'popup'   => 'Popup',
			'above'   => 'Above Header',
			'primary' => 'Primary Header',
			'below'   => 'Below Header',
		);

		$position_labels = array(
			'left'          => 'Left',
			'left_center'   => 'Left Center',
			'center'        => 'Center',
			'right_center'  => 'Right Center',
			'right'         => 'Right',
			'popup_content' => 'Content',
		);

		$position = str_replace( $section . '_', '', $zone );

		$section_label  = isset( $section_labels[ $section ] ) ? $section_labels[ $section ] : $section;
		$position_label = isset( $position_labels[ $position ] ) ? $position_labels[ $position ] : $position;

		if ( 'popup' === $section ) {
			return $section_label;
		}

		return sprintf( '%s %s', $section_label, $position_label );
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.