Astra_Addon_Builder_Helper::elements_count( array $elements = array() )

Update the count of elements in HF Builder.


Description


Parameters

$elements

(array) (Optional) array of elements having key as slug and value as count.

Default value: array()


Return

(array) $elements


Source

File: classes/builder/class-astra-addon-builder-helper.php

	public static function elements_count( $elements = array() ) {

		$db_elements = get_option( 'astra-settings' );
		$db_elements = isset( $db_elements['cloned-component-track'] ) ? $db_elements['cloned-component-track'] : array();

		if ( ! empty( $db_elements ) ) {
			return $db_elements;
		}

		$elements['header-button']       = 2;
		$elements['footer-button']       = 2;
		$elements['header-html']         = 3;
		$elements['footer-html']         = 2;
		$elements['header-menu']         = 3;
		$elements['header-widget']       = 4;
		$elements['footer-widget']       = 6;
		$elements['header-social-icons'] = 1;
		$elements['footer-social-icons'] = 1;
		$elements['header-divider']      = 3;
		$elements['footer-divider']      = 3;
		$elements['removed-items']       = array();

		return $elements;
	}


User Contributed Notes

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