Astra_Posts_Archive_Structures_Configs::get_content_layout_choices( string $post_type )
Getting content layout dynamically.
Description
Compatibility case: Narrow width + dynamic customizer controls.
Parameters
- $post_type
-
(string) (Required) On basis of this will decide to show narrow-width layout or not.
Source
File: inc/modules/posts-structures/customizer/class-astra-posts-archive-structures-configs.php
public function get_content_layout_choices( $post_type ) { if ( ! in_array( $post_type, Astra_Posts_Structures_Configs::get_narrow_width_exculde_cpts() ) ) { return array( 'default' => array( 'label' => __( 'Default', 'astra' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'layout-default', false ) : '', ), 'boxed-container' => array( 'label' => __( 'Boxed', 'astra' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'container-boxed', false ) : '', ), 'content-boxed-container' => array( 'label' => __( 'Content Boxed', 'astra' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'container-content-boxed', false ) : '', ), 'plain-container' => array( 'label' => __( 'Full Width / Contained', 'astra' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'container-full-width-contained', false ) : '', ), 'page-builder' => array( 'label' => __( 'Full Width / Stretched', 'astra' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'container-full-width-stretched', false ) : '', ), 'narrow-container' => array( 'label' => __( 'Narrow Width', 'astra' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'narrow-container', false ) : '', ), ); } else { return array( 'default' => array( 'label' => __( 'Default', 'astra' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'layout-default', false ) : '', ), 'boxed-container' => array( 'label' => __( 'Boxed', 'astra' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'container-boxed', false ) : '', ), 'content-boxed-container' => array( 'label' => __( 'Content Boxed', 'astra' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'container-content-boxed', false ) : '', ), 'plain-container' => array( 'label' => __( 'Full Width / Contained', 'astra' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'container-full-width-contained', false ) : '', ), 'page-builder' => array( 'label' => __( 'Full Width / Stretched', 'astra' ), 'path' => ( class_exists( 'Astra_Builder_UI_Controller' ) ) ? Astra_Builder_UI_Controller::fetch_svg_icon( 'container-full-width-stretched', false ) : '', ), ); } }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
4.0.0 | Introduced. |