Astra_Get_Sidebar_Layout::execute( array $args )

Execute the ability.


Description


Parameters

$args

(array) (Required) Input arguments.


Return

(array) Result array.


Source

File: inc/abilities/customizer/general/sidebar/class-astra-get-sidebar-layout.php

	public function execute( $args ) {
		$layout = astra_get_option( 'site-sidebar-layout', 'no-sidebar' );

		$layout_labels = array(
			'no-sidebar'    => 'No Sidebar',
			'left-sidebar'  => 'Left Sidebar',
			'right-sidebar' => 'Right Sidebar',
		);

		return Astra_Abilities_Response::success(
			__( 'Retrieved sidebar layout successfully.', 'astra' ),
			array(
				'layout'            => $layout,
				'layout_label'      => isset( $layout_labels[ $layout ] ) ? $layout_labels[ $layout ] : $layout,
				'available_layouts' => $layout_labels,
			)
		);
	}


User Contributed Notes

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