Astra_Builder::update_header_builder_desktop_items( array $header_items )
Update default header builder’s desktop components.
Description
Parameters
- $header_items
-
(array) (Required) array of header elements which will load in customizer builder layout.
Return
(array) Array of desktop components.
Source
File: classes/class-astra-builder.php
public function update_header_builder_desktop_items( $header_items ) { $cloned_component_track = astra_addon_builder_helper()->component_count_array; $num_of_header_divider = astra_addon_builder_helper()->num_of_header_divider; for ( $index = 1; $index <= $num_of_header_divider; $index++ ) { $header_divider_section = 'section-hb-divider-' . $index; if ( isset( $cloned_component_track['removed-items'] ) && in_array( $header_divider_section, $cloned_component_track['removed-items'], true ) ) { continue; } $header_items[ 'divider-' . $index ] = array( 'name' => ( 1 === $num_of_header_divider ) ? 'Divider' : 'Divider ' . $index, 'icon' => 'minus', 'section' => $header_divider_section, 'clone' => true, 'type' => 'divider', 'builder' => 'header', ); } $header_items['language-switcher'] = array( 'name' => __( 'Language Switcher', 'astra-addon' ), 'icon' => 'translation', 'section' => 'section-hb-language-switcher', ); if ( version_compare( ASTRA_THEME_VERSION, '3.2.0', '>' ) ) { $header_items['mobile-trigger'] = array( 'name' => __( 'Toggle Button', 'astra-addon' ), 'icon' => 'menu-alt', 'section' => 'section-header-mobile-trigger', ); } $header_items['mobile-menu'] = array( 'name' => __( 'Off-Canvas Menu', 'astra-addon' ), 'icon' => 'menu-alt', 'section' => 'section-header-mobile-menu', ); return $header_items; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |