Astra_LifterLMS::register_builder_fields( string $default_fields )
Register theme postmeta fields with the LifterLMS Builder
Description
Parameters
- $default_fields
-
(string) (Required) Default custom field definitions.
Return
(string) $default_fields Updated custom field definitions.
Source
File: inc/compatibility/lifterlms/class-astra-lifterlms.php
public function register_builder_fields( $default_fields ) { $disable_fields = array(); $show_meta_field = ! Astra_Meta_Boxes::is_bb_themer_layout(); /** * Main Header. */ $disable_fields[] = array( 'attribute' => 'ast-main-header-display', 'id' => 'ast-main-header-display', 'label' => esc_html__( 'Disable Primary Header', 'astra' ), 'switch_on' => 'disabled', 'type' => 'switch', ); /** * Above Header */ $disable_fields[] = array( 'attribute' => 'ast-hfb-above-header-display', 'id' => 'ast-hfb-above-header-display', 'label' => esc_html__( 'Disable Above Header', 'astra' ), 'switch_on' => 'disabled', 'type' => 'switch', ); /** * Below Header */ $disable_fields[] = array( 'attribute' => 'ast-hfb-below-header-display', 'id' => 'ast-hfb-below-header-display', 'label' => esc_html__( 'Disable Below Header', 'astra' ), 'switch_on' => 'disabled', 'type' => 'switch', ); /** * Mobile Header */ $disable_fields[] = array( 'attribute' => 'ast-hfb-mobile-header-display', 'id' => 'ast-hfb-mobile-header-display', 'label' => esc_html__( 'Disable Mobile Header', 'astra' ), 'switch_on' => 'disabled', 'type' => 'switch', ); if ( $show_meta_field ) { $disable_fields[] = array( 'attribute' => 'site-post-title', 'id' => 'site-post-title', 'label' => esc_html__( 'Disable Title', 'astra' ), 'switch_on' => 'disabled', 'type' => 'switch', ); } if ( $show_meta_field && 'disabled' != astra_get_option( 'footer-adv' ) ) { $disable_fields[] = array( 'attribute' => 'footer-adv-display', 'id' => 'footer-adv-display', 'label' => esc_html__( 'Disable Footer Widgets', 'astra' ), 'switch_on' => 'disabled', 'type' => 'switch', ); } if ( 'disabled' != astra_get_option( 'footer-sml-layout' ) ) { $disable_fields[] = array( 'attribute' => 'footer-sml-layout', 'id' => 'footer-sml-layout', 'label' => esc_html__( 'Disable Footer', 'astra' ), 'switch_on' => 'disabled', 'type' => 'switch', ); } $fields['astra_theme_settings'] = array( 'title' => __( 'Astra Settings', 'astra' ), 'toggleable' => true, 'fields' => apply_filters( 'astra_theme_lifterlms_settings', array( array( array( 'attribute' => 'site-sidebar-layout', 'id' => 'site-sidebar-layout', 'label' => esc_html__( 'Sidebar', 'astra' ), 'type' => 'ast-select', 'options' => array( 'default' => esc_html__( 'Customizer Setting', 'astra' ), 'left-sidebar' => esc_html__( 'Left Sidebar', 'astra' ), 'right-sidebar' => esc_html__( 'Right Sidebar', 'astra' ), 'no-sidebar' => esc_html__( 'No Sidebar', 'astra' ), ), ), array( 'attribute' => 'site-content-layout', 'id' => 'site-content-layout', 'label' => esc_html__( 'Content Layout', 'astra' ), 'type' => 'ast-select', 'options' => array( 'default' => esc_html__( 'Customizer Setting', 'astra' ), 'boxed-container' => esc_html__( 'Boxed', 'astra' ), 'content-boxed-container' => esc_html__( 'Content Boxed', 'astra' ), 'plain-container' => esc_html__( 'Full Width / Contained', 'astra' ), 'page-builder' => esc_html__( 'Full Width / Stretched', 'astra' ), ), ), ), $disable_fields, ) ), ); $default_fields['assignment'] = $fields; $default_fields['lesson'] = $fields; $default_fields['quiz'] = $fields; return $default_fields; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.3.3 | Introduced. |