Astra_Get_Container_Layout::execute( array $args )

Execute the ability.


Description


Parameters

$args

(array) (Required) Input arguments.


Return

(array) Result array.


Source

File: inc/abilities/customizer/globals/container/class-astra-get-container-layout.php

	public function execute( $args ) {
		$container_layout = astra_get_option( 'ast-site-content-layout', 'normal-width-container' );
		$container_style  = astra_get_option( 'site-content-style', 'boxed' );

		$layout_labels = array(
			'normal-width-container' => __( 'Normal', 'astra' ),
			'narrow-width-container' => __( 'Narrow', 'astra' ),
			'full-width-container'   => __( 'Full Width', 'astra' ),
		);

		$style_labels = array(
			'boxed'   => __( 'Boxed', 'astra' ),
			'unboxed' => __( 'Unboxed', 'astra' ),
		);

		return Astra_Abilities_Response::success(
			__( 'Retrieved container layout settings successfully.', 'astra' ),
			array(
				'container_layout'       => $container_layout,
				'container_layout_label' => isset( $layout_labels[ $container_layout ] ) ? $layout_labels[ $container_layout ] : $container_layout,
				'container_style'        => $container_style,
				'container_style_label'  => isset( $style_labels[ $container_style ] ) ? $style_labels[ $container_style ] : $container_style,
				'available_layouts'      => array(
					'normal-width-container' => __( 'Normal', 'astra' ),
					'narrow-width-container' => __( 'Narrow', 'astra' ),
					'full-width-container'   => __( 'Full Width', 'astra' ),
				),
				'available_styles'       => array(
					'boxed'   => __( 'Boxed', 'astra' ),
					'unboxed' => __( 'Unboxed', 'astra' ),
				),
				'note'                   => __( 'Container style applies only when layout is set to Normal or Narrow.', 'astra' ),
			)
		);
	}


User Contributed Notes

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