Astra_Ext_Nav_Menu_Markup::get_mega_menu_option( array $data )
Mega menu configs
Description
Parameters
- $data
-
(array) (Required) Megamenu id.
Return
(array)
Source
File: addons/nav-menu/classes/class-astra-ext-nav-menu-markup.php
public function get_mega_menu_option( $data ) { $menu_item_id = $data['id']; $_config = array( // Option: As Heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_enable_heading', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_enable_heading', true ), 'control' => 'ast-toggle', 'title' => __( 'As Heading', 'astra-addon' ), 'custom_value' => 'enable-heading', 'divider' => 'top-spacing', 'tab_type' => 'general', 'depth' => 1, 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_heading_separator_color', 'value' => array( 'enable-heading' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_mega_menu_label_title', 'value' => array( 'enable-heading' ), ), ), ), // Option: Heading Mega Menu for sub menu. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_mega_menu_label_title', 'control' => 'ast-title', 'title' => __( 'Mega Menu', 'astra-addon' ), 'divider' => 'top-spacing', 'tab_type' => 'design', 'depth' => 1, 'context' => array( array( 'value' => array( 'enable-heading' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_enable_heading', true ), ), ), ), // Option: Separator Color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_heading_separator_color', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_heading_separator_color', true ), 'control' => 'ast-color', 'title' => __( 'Separator Color', 'astra-addon' ), 'tab_type' => 'design', 'depth' => 1, 'context' => array( array( 'value' => array( 'enable-heading' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_enable_heading', true ), ), ), ), // Option: Hide Label. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_disable_title', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'disable_title', $menu_item_id ), 'control' => 'ast-toggle', 'title' => __( 'Hide Menu Label', 'astra-addon' ), 'custom_value' => 'disable-title', 'divider' => '', 'tab_type' => 'general', 'depth' => 1, 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_disable_link', 'value' => array( '' ), ), ), ), // Option: Disable Link. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_disable_link', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_disable_link', true ), 'control' => 'ast-toggle', 'title' => __( 'Disable Link', 'astra-addon' ), 'custom_value' => 'disable-link', 'divider' => '', 'tab_type' => 'general', 'depth' => 1, 'context' => array( array( 'value' => array( '' ), 'target_value' => strval( Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'disable_title', $menu_item_id ) ), ), ), ), // Option: Enable Mega Menu toggle. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'control' => 'ast-toggle', 'divider' => 'top-spacing', 'custom_value' => 'megamenu', 'title' => __( 'Mega Menu', 'astra-addon' ), 'tab_type' => 'general', 'as_heading' => true, 'depth' => 0, 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_width', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_background_type_title', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_image', 'value' => array( 'megamenu' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_color', 'value' => array( 'megamenu' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_repeat', 'value' => array( 'megamenu' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_size', 'value' => array( 'megamenu' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_position', 'value' => array( 'megamenu' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_gradient', 'value' => array( 'megamenu' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'gradient' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_margin', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_padding', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_spacing_title', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_top_border_width', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_column_divider_width', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_row_divider_width', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_top_border_color', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_column_divider_color', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_divider_style', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_divider_title', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_color_label_title', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_text_color_group', 'value' => array( 'megamenu' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_heading_color_group', 'value' => array( 'megamenu' ), ), ), ), // Option: Mega Menu Width. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_width', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'width', $menu_item_id ), 'control' => 'ast-select', 'title' => __( 'Mega Menu Width', 'astra-addon' ), 'divider' => '', 'choices' => array( 'content' => __( 'Content', 'astra-addon' ), 'menu-container' => __( 'Menu Container Width', 'astra-addon' ), 'full' => __( 'Full Width', 'astra-addon' ), 'full-stretched' => __( 'Full Width Stretched', 'astra-addon' ), 'custom' => __( 'Custom Width', 'astra-addon' ), ), 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_custom_width', 'value' => array( 'custom' ), ), ), 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), 'tab_type' => 'general', 'depth' => 0, ), // Option: Icon spacing. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_custom_width', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_custom_width', true ), 'control' => 'ast-slider', 'title' => __( 'Custom Width', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 1, 'step' => 1, 'max' => 1920, ), 'tab_type' => 'general', 'depth' => '0', 'context' => array( array( 'value' => array( 'custom' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_width', true ), ), ), ), // Option: Icon Heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_icon_label_title', 'control' => 'ast-title', 'title' => __( 'Icon', 'astra-addon' ), 'divider' => 'ast-top-section-divider', 'tab_type' => 'general', 'depth' => 'all', ), // Option: Icon source. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_source', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), 'title' => __( 'Icon', 'astra-addon' ), 'control' => 'ast-icon', 'tab_type' => 'general', 'depth' => 'all', 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_position', 'value' => array( 'image', 'icon' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_size', 'value' => array( 'image', 'icon' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_spacing', 'value' => array( 'image', 'icon' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_icon_label_title_design', 'value' => array( 'image', 'icon' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'value' => array( 'image', 'icon' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_primary_color', 'value' => array( 'image', 'icon' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_secondary_color', 'value' => array( 'image', 'icon' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'stacked', 'framed' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_padding', 'value' => array( 'image', 'icon' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'stacked', 'framed' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_border_width', 'value' => array( 'image', 'icon' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'framed' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_corner_radius', 'value' => array( 'image', 'icon' ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'stacked', 'framed' ), ), ), ), // Option: Icon position. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_position', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_position', $menu_item_id ), 'control' => 'ast-select', 'title' => __( 'Icon Position', 'astra-addon' ), 'choices' => array( 'before-label' => __( 'Before Menu Label', 'astra-addon' ), 'after-label' => __( 'After Menu Label', 'astra-addon' ), ), 'tab_type' => 'general', 'depth' => 'all', 'context' => array( array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), ), ), ), // Option: Icon size. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_size', 'control' => 'ast-slider', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_size', $menu_item_id ), 'title' => __( 'Size', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 1, 'step' => 1, 'max' => 100, ), 'tab_type' => 'general', 'depth' => 'all', 'context' => array( array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), ), ), ), // Option: Icon spacing. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_spacing', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_spacing', $menu_item_id ), 'control' => 'ast-slider', 'title' => __( 'Icon Spacing', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 1, 'step' => 1, 'max' => 100, ), 'tab_type' => 'general', 'depth' => 'all', 'context' => array( array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), ), ), ), // Option: Content source heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_content_source_title', 'control' => 'ast-title', 'title' => __( 'Content Source', 'astra-addon' ), 'divider' => '', 'tab_type' => 'general', 'divider' => 'ast-top-section-divider', 'depth' => 1, ), // Option: Content source. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_content_src', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_content_src', true ), 'control' => 'ast-select', 'title' => __( 'Content Source', 'astra-addon' ), 'divider' => '', 'choices' => array( 'default' => __( 'Default', 'astra-addon' ), 'custom_text' => __( 'Custom Text', 'astra-addon' ), 'template' => __( 'Template', 'astra-addon' ), 'widget' => __( 'Widget', 'astra-addon' ), ), 'tab_type' => 'general', 'depth' => 1, 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_widget_list', 'value' => array( 'widget' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_template', 'value' => array( 'template' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_custom_text', 'value' => array( 'custom_text' ), ), ), ), // Option: Widget list. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_widget_list', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_widget_list', true ), 'control' => 'ast-widget', 'title' => __( 'Widget List', 'astra-addon' ), 'tab_type' => 'general', 'depth' => 1, 'context' => array( array( 'value' => array( 'widget' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_content_src', true ), ), ), ), // Option: Select template. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_template', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_template', true ), 'control' => 'ast-template', 'defaults_title' => get_the_title( (int) get_post_meta( $menu_item_id, '_menu_item_megamenu_template', true ) ), 'title' => __( 'Template', 'astra-addon' ), 'tab_type' => 'general', 'depth' => 1, 'context' => array( array( 'value' => array( 'template' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_content_src', true ), ), ), ), // Option: Custom text field. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_custom_text', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_custom_text', true ), 'control' => 'ast-textarea', 'title' => __( 'Custom Text', 'astra-addon' ), 'tab_type' => 'general', 'depth' => 1, 'context' => array( array( 'value' => array( 'custom_text' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_content_src', true ), ), ), ), // Option: Highlight heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_highlight_label_title', 'control' => 'ast-title', 'title' => __( 'Highlight Labels', 'astra-addon' ), 'divider' => 'ast-top-section-divider', 'tab_type' => 'general', 'depth' => 'all', ), // Option: Menu highlight label input. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_highlight_label', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_highlight_label', true ), 'control' => 'ast-text', 'title' => __( 'Menu Highlight Label', 'astra-addon' ), 'description' => __( 'Change menu highlight label text', 'astra-addon' ), 'divider' => '', 'tab_type' => 'general', 'depth' => 'all', ), // Option: Background type heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_background_type_title', 'control' => 'ast-title', 'title' => __( 'Background Type', 'astra-addon' ), 'divider' => 'top-spacing', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Background type. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'bg_type', $menu_item_id ), 'control' => 'ast-background-type', 'title' => __( 'Background Type', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_gradient', 'value' => array( 'gradient' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_image', 'value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_color', 'value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_repeat', 'value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_size', 'value' => array( 'image' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_position', 'value' => array( 'image' ), ), ), ), // Option: Background color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_color', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_bg_color', true ), 'control' => 'ast-color', 'title' => __( 'Color', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'image' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_type', true ), ), array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), ), ), // Option: Background gradient. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_gradient', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_gradient', true ), 'control' => 'ast-gradient', 'title' => __( 'Image', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'gradient' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_type', true ), ), array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'gradient' ), ), ), ), // Option: Background image. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_image', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_image', true ), 'control' => 'ast-image', 'title' => __( 'Image', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'image' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_type', true ), ), array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), ), ), // Option: Background repeat. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_repeat', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_bg_repeat', true ), 'control' => 'ast-select', 'choices' => array( 'no-repeat' => __( 'No Repeat', 'astra-addon' ), 'repeat' => __( 'Repeat All', 'astra-addon' ), 'repeat-x' => __( 'Repeat Horizontally ', 'astra-addon' ), 'repeat-y' => __( 'Repeat Vertically', 'astra-addon' ), ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'image' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_type', true ), ), array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), ), ), // Option: Background size. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_size', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_bg_size', true ), 'control' => 'ast-select', 'choices' => array( 'auto' => __( 'Auto', 'astra-addon' ), 'cover' => __( 'Cover', 'astra-addon' ), 'contain' => __( 'Contain', 'astra-addon' ), ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'image' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_type', true ), ), array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), ), ), // Option: Background position. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_bg_position', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_bg_position', true ), 'control' => 'ast-select', 'choices' => array( 'left top' => __( 'Left Top', 'astra-addon' ), 'left center' => __( 'Left Center', 'astra-addon' ), 'left bottom' => __( 'Left Bottom ', 'astra-addon' ), 'right top' => __( 'Right Top', 'astra-addon' ), 'right center' => __( 'Right Center', 'astra-addon' ), 'right bottom' => __( 'Right Bottom', 'astra-addon' ), 'center top' => __( 'Center Top', 'astra-addon' ), 'center center' => __( 'Center Center', 'astra-addon' ), 'center bottom' => __( 'Center Bottom', 'astra-addon' ), ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'image' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_background_type', true ), ), array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_background_type', 'dependency_value' => array( 'image' ), ), ), ), // Option: Color heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_color_label_title', 'control' => 'ast-title', 'title' => __( 'Colors', 'astra-addon' ), 'tab_type' => 'design', 'divider' => 'ast-top-section-divider', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Heading color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_heading_color_group', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_heading_color_group', true ), 'control' => 'ast-color', 'title' => __( 'Heading', 'astra-addon' ), 'link_to' => 'panel-header-builder-group', 'divider' => '', 'depth' => 0, 'tab_type' => 'design', 'has_hover' => true, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Text/Link text color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_text_color_group', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'text_color', $menu_item_id ), 'control' => 'ast-color', 'title' => __( 'Text/Link', 'astra-addon' ), 'tab_type' => 'design', 'depth' => 0, 'has_hover' => true, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Icon heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_icon_label_title_design', 'control' => 'ast-title', 'title' => __( 'Icon', 'astra-addon' ), 'tab_type' => 'design', 'divider' => 'ast-top-section-divider', 'depth' => 'all', 'context' => array( array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), ), ), ), // Option: Icon view type. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_view', $menu_item_id ), 'control' => 'ast-select', 'title' => __( 'View', 'astra-addon' ), 'choices' => array( 'default' => __( 'Default', 'astra-addon' ), 'stacked' => __( 'Stacked', 'astra-addon' ), 'framed' => __( 'Framed', 'astra-addon' ), ), 'tab_type' => 'design', 'depth' => 'all', 'trigger_context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_secondary_color', 'value' => array( 'stacked', 'framed' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_padding', 'value' => array( 'stacked', 'framed' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_corner_radius', 'value' => array( 'stacked', 'framed' ), ), array( 'setting' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_border_width', 'value' => array( 'framed' ), ), ), 'context' => array( array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), ), ), ), // Option: Icon primary color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_primary_color', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_primary_color', $menu_item_id ), 'control' => 'ast-color', 'title' => __( 'Primary Color', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 'all', 'context' => array( array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), ), ), ), // Option: Icon secondary color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_secondary_color', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_secondary_color', $menu_item_id ), 'control' => 'ast-color', 'title' => __( 'Secondary Color', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 'all', 'context' => array( array( 'value' => array( 'stacked' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'framed' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'stacked', 'framed' ), ), ), ), // Option: Icon padding. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_padding', 'control' => 'ast-slider', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_padding', $menu_item_id ), 'title' => __( 'Padding', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 1, 'step' => 1, 'max' => 100, ), 'tab_type' => 'design', 'depth' => 'all', 'context' => array( array( 'value' => array( 'stacked' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'framed' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'stacked', 'framed' ), ), ), ), // Option: Icon border width. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_border_width', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_border_width', $menu_item_id ), 'type' => 'control', 'control' => 'ast-spacing', 'title' => __( 'Border Width', 'astra-addon' ), 'linked_choices' => true, 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'suffix' => 'px', 'connected' => false, 'tab_type' => 'design', 'responsive' => false, 'depth' => 'all', 'context' => array( array( 'value' => array( 'framed' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'framed' ), ), ), ), // Option: Icon border radius. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_corner_radius', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_corner_radius', $menu_item_id ), 'type' => 'control', 'control' => 'ast-spacing', 'suffix' => 'px', 'title' => __( 'Corner Radius', 'astra-addon' ), 'linked_choices' => true, 'choices' => array( 'top-left' => __( 'Top left', 'astra-addon' ), 'top-right' => __( 'Top Right', 'astra-addon' ), 'bottom-left' => __( 'Bottom Left', 'astra-addon' ), 'bottom-right' => __( 'Bottom Right', 'astra-addon' ), ), 'connected' => false, 'tab_type' => 'design', 'responsive' => false, 'depth' => 'all', 'context' => array( array( 'value' => array( 'stacked' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'framed' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu_icon_view', true ), ), array( 'value' => array( 'image', 'icon' ), 'target_value' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'icon_source', $menu_item_id ), 'dependency' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_icon_view', 'dependency_value' => array( 'stacked', 'framed' ), ), ), ), // Option: Divider Heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_divider_title', 'control' => 'ast-title', 'title' => __( 'Divider', 'astra-addon' ), 'divider' => 'ast-top-section-divider', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Divider style. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_divider_style', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_divider_style', true ), 'control' => 'ast-select', 'title' => __( 'Style', 'astra-addon' ), 'choices' => array( 'solid' => __( 'Solid', 'astra-addon' ), 'dotted' => __( 'Dotted', 'astra-addon' ), 'dashed' => __( 'Dashed', 'astra-addon' ), 'double' => __( 'Double', 'astra-addon' ), 'none' => __( 'None', 'astra-addon' ), ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Top Border width. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_top_border_width', 'control' => 'ast-slider', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_top_border_width', true ), 'title' => __( 'Top Border Width', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 50, ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Column Divider width. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_column_divider_width', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_column_divider_width', true ), 'control' => 'ast-slider', 'title' => __( 'Column Width', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 50, ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Row Divider width. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_row_divider_width', 'control' => 'ast-slider', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_row_divider_width', true ), 'title' => __( 'Row Width', 'astra-addon' ), 'suffix' => 'px', 'input_attrs' => array( 'min' => 0, 'step' => 1, 'max' => 50, ), 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Top Border. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_top_border_color', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_top_border_color', true ), 'control' => 'ast-color', 'title' => __( 'Top Border', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Divider column color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_column_divider_color', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_column_divider_color', true ), 'control' => 'ast-color', 'title' => __( 'Column Divider', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Highlight Labels heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_highlight_labels_title', 'control' => 'ast-title', 'title' => __( 'Highlight Labels', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'divider' => 'ast-top-section-divider', 'depth' => 'all', ), // Option: Highlight Label color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_label_color', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_label_color', true ), 'control' => 'ast-color', 'title' => __( 'Highlight Label Color', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 'all', ), // Option: Highlight Label background color. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_label_bg_color', 'defaults' => get_post_meta( $menu_item_id, '_menu_item_megamenu_label_bg_color', true ), 'control' => 'ast-color', 'title' => __( 'Background Color', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'depth' => 'all', ), // Option: Highlight Label spacing heading. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_spacing_title', 'control' => 'ast-title', 'title' => __( 'Spacing', 'astra-addon' ), 'divider' => '', 'tab_type' => 'design', 'divider' => 'ast-top-section-divider', 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Margin. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_margin', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'margin', $menu_item_id ), 'type' => 'control', 'control' => 'ast-spacing', 'title' => __( 'Margin', 'astra-addon' ), 'suffix' => 'px', 'linked_choices' => true, 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'connected' => false, 'tab_type' => 'design', 'responsive' => false, 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), // Option: Padding. array( 'name' => ASTRA_THEME_SETTINGS . '_menu_item_megamenu_padding', 'defaults' => Astra_Ext_Nav_Menu_Loader::get_megamenu_default( 'padding', $menu_item_id ), 'type' => 'control', 'control' => 'ast-spacing', 'title' => __( 'Padding', 'astra-addon' ), 'suffix' => 'px', 'linked_choices' => true, 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), 'connected' => false, 'tab_type' => 'design', 'responsive' => false, 'depth' => 0, 'context' => array( array( 'value' => array( 'megamenu' ), 'target_value' => get_post_meta( $menu_item_id, '_menu_item_megamenu', true ), ), ), ), ); return rest_ensure_response( $_config ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
4.0.0 | Introduced. |