Astra_Builder_Base_Configuration::prepare_visibility_tab( string $_section, string $builder_type = 'header' )
Prepare Visibility options.
Description
Parameters
- $_section
-
(string) (Required) section id.
- $builder_type
-
(string) (Optional) Builder Type.
Default value: 'header'
Return
(array)
Source
File: inc/customizer/configurations/builder/class-astra-builder-base-configuration.php
public static function prepare_visibility_tab( $_section, $builder_type = 'header' ) { $configs = array( /** * Option: Hide on tablet */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-hide-tablet]', 'type' => 'control', 'control' => 'ast-toggle-control', 'default' => astra_get_option( $_section . '-hide-tablet' ), 'section' => $_section, 'priority' => 320, 'title' => __( 'Hide on Tablet', 'astra' ), 'transport' => 'postMessage', 'context' => Astra_Builder_Helper::$tablet_general_tab, ), /** * Option: Hide on mobile */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-hide-mobile]', 'type' => 'control', 'control' => 'ast-toggle-control', 'default' => astra_get_option( $_section . '-hide-mobile' ), 'section' => $_section, 'priority' => 330, 'title' => __( 'Hide on Mobile', 'astra' ), 'transport' => 'postMessage', 'context' => Astra_Builder_Helper::$mobile_general_tab, ), ); if ( 'footer' === $builder_type ) { /** * Option: Hide on desktop */ $configs[] = array( 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-hide-desktop]', 'type' => 'control', 'control' => 'ast-toggle-control', 'default' => astra_get_option( $_section . '-hide-desktop' ), 'section' => $_section, 'priority' => 320, 'title' => __( 'Hide on Desktop', 'astra' ), 'transport' => 'postMessage', 'context' => Astra_Builder_Helper::$desktop_general_tab, 'divider' => array( 'ast_class' => 'ast-top-divider' ), ); } return $configs; }
Expand full source code Collapse full source code View on Trac