Astra_Builder::update_header_builder_mobile_items( array $mobile_items )
Update default header builder’s mobile components.
Description
Parameters
- $mobile_items
-
(array) (Required) array of mobile elements which will load in customizer builder layout.
Return
(array) Array of mobile components.
Source
File: classes/class-astra-builder.php
public function update_header_builder_mobile_items( $mobile_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_mobile_divider_section = 'section-hb-divider-' . $index; if ( isset( $cloned_component_track['removed-items'] ) && in_array( $header_mobile_divider_section, $cloned_component_track['removed-items'], true ) ) { continue; } $mobile_items[ 'divider-' . $index ] = array( 'name' => ( 1 === $num_of_header_divider ) ? 'Divider' : 'Divider ' . $index, 'icon' => 'minus', 'section' => $header_mobile_divider_section, 'clone' => true, 'type' => 'divider', 'builder' => 'header', ); } $mobile_items['language-switcher'] = array( 'name' => __( 'Language Switcher', 'astra-addon' ), 'icon' => 'translation', 'section' => 'section-hb-language-switcher', ); return $mobile_items; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |