Astra_Builder::update_footer_builder_desktop_items( array $footer_items )

Update default footer builder’s components.


Description


Parameters

$footer_items

(array) (Required) array of footer elements which will load in customizer builder layout.


Return

(array) Array of footer components.


Source

File: classes/class-astra-builder.php

		public function update_footer_builder_desktop_items( $footer_items ) {

			$cloned_component_track = astra_addon_builder_helper()->component_count_array;

			$num_of_footer_divider = astra_addon_builder_helper()->num_of_footer_divider;
			for ( $index = 1; $index <= $num_of_footer_divider; $index++ ) {

				$footer_divider_section = 'section-fb-divider-' . $index;

				if ( isset( $cloned_component_track['removed-items'] ) && in_array( $footer_divider_section, $cloned_component_track['removed-items'], true ) ) {
					continue;
				}

				$footer_items[ 'divider-' . $index ] = array(
					'name'    => ( 1 === $num_of_footer_divider ) ? 'Divider' : 'Divider ' . $index,
					'icon'    => 'minus',
					'section' => $footer_divider_section,
					'clone'   => true,
					'type'    => 'divider',
					'builder' => 'footer',
				);
			}

			$footer_items['language-switcher'] = array(
				'name'    => __( 'Language Switcher', 'astra-addon' ),
				'icon'    => 'translation',
				'section' => 'section-fb-language-switcher',
			);

			return $footer_items;
		}

Changelog

Changelog
Version Description
3.0.0 Introduced.


User Contributed Notes

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