Astra_Get_Footer_Builder::configure()

Configure the ability.


Description


Source

File: inc/abilities/customizer/footer/class-astra-get-footer-builder.php

	public function configure() {
		$this->id          = 'astra/get-footer-builder';
		$this->label       = __( 'Get Astra Footer Builder Settings', 'astra' );
		$this->description = __( 'Retrieves the current Astra theme footer builder configuration including desktop and mobile layouts with components like buttons, HTML blocks, widgets, social icons, footer menu, and copyright positioned in above footer, primary footer, and below footer sections.', 'astra' );
		$this->category    = 'astra';

		$this->meta = array(
			'tool_type'   => 'read',
			'constraints' => array(
				'usage_hints' => array(
					'return_structure'     => 'Returns desktop, mobile, column counts (above/primary/below_footer_columns), layout widths (above/primary/below_footer_layout), and available_components. Desktop/mobile contain nested objects: section → column → array of component IDs. Example: desktop.primary.primary_1 = ["copyright"], desktop.primary.primary_2 = ["menu"].',
					'available_components' => 'CRITICAL: This map contains exact component IDs you MUST use. Keys are component IDs (use these in updates), values are display names (for reference only). Example: "social-icons-1" is the ID (use this), "Social Icons 1" is the name (display only). NEVER use display names - always use exact ID keys. Common: copyright, menu, widget-1 through widget-4, social-icons-1, social-icons-2, html-1/2/3, button-1/2.',
					'desktop_layout'       => 'Desktop structure: { above: { above_1: [], above_2: [], above_3: [], above_4: [], above_5: [] }, primary: { primary_1: [], primary_2: [], primary_3: [], primary_4: [], primary_5: [] }, below: { below_1: [], below_2: [], below_3: [], below_4: [], below_5: [] } }. Each array contains component IDs currently in that column. Empty arrays mean column is empty.',
					'mobile_layout'        => 'Mobile structure: { above: { above_1: [], above_2: [] }, primary: { primary_1: [], primary_2: [] }, below: { below_1: [], below_2: [] } }. Mobile columns are independent of desktop - a component in desktop primary_1 does NOT automatically appear in mobile. Must explicitly configure both.',
					'column_counts'        => 'above_footer_columns, primary_footer_columns, below_footer_columns show how many columns are ACTIVE in each section. Example: If primary_footer_columns=3, only columns primary_1, primary_2, primary_3 display on desktop. Columns primary_4 and primary_5 exist in data but are hidden. Mobile always uses 2 columns regardless.',
					'layout_widths'        => 'above_footer_layout, primary_footer_layout, below_footer_layout indicate section width. "full" = edge-to-edge full width, "content" = boxed within content width. Use this to understand current visual layout.',
					'finding_components'   => 'To find where a component is currently located: Search through desktop and mobile column arrays. Example: If copyright is in desktop.below.below_1, that array will contain "copyright". To move it, you must remove it from below_1 (set to []) and add to new column.',
					'column_naming'        => 'Column names follow pattern: section_number. Sections: above, primary, below. Numbers: 1-5 for desktop, 1-2 for mobile. Examples: above_1, primary_3, below_5. Use underscore, not hyphen (above_1 not above-1).',
					'interpreting_results' => 'When you get results: 1) Check available_components for exact IDs, 2) Examine desktop layout to see current placement, 3) Check column counts to see how many columns are active, 4) Examine mobile layout (independent from desktop), 5) Note layout widths, 6) Use this info to plan updates.',
					'usage_workflow'       => 'Typical workflow: 1) Call this tool to get current state, 2) Note exact component IDs from available_components, 3) Find current placement of components you want to move, 4) Check column counts to ensure you have enough columns, 5) Plan changes (what columns to empty, what columns to populate), 6) Call update-footer-builder with changes. For moving: old column = [], new column = [component-id].',
				),
			),
		);
	}

User Contributed Notes

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