Esempio n. 1
0
 function get_fields()
 {
     $fields = array('menu_id' => array('label' => esc_html__('Menu', 'et_builder'), 'type' => 'select', 'option_category' => 'basic_option', 'options' => et_builder_get_nav_menus_options(), 'description' => sprintf('<p class="description">%2$s. <a href="%1$s" target="_blank">%3$s</a>.</p>', esc_url(admin_url('nav-menus.php')), esc_html__('Select a menu that should be used in the module', 'et_builder'), esc_html__('Click here to create new menu', 'et_builder')), 'computed_affects' => array('__menu')), 'background_color' => array('label' => esc_html__('Background Color', 'et_builder'), 'type' => 'color-alpha', 'description' => esc_html__('Use the color picker to choose a background color for this module.', 'et_builder')), 'background_layout' => array('label' => esc_html__('Text Color', 'et_builder'), 'type' => 'select', 'option_category' => 'color_option', 'options' => array('light' => esc_html__('Dark', 'et_builder'), 'dark' => esc_html__('Light', 'et_builder')), 'description' => esc_html__('Here you can choose the value of your text. If you are working with a dark background, then your text should be set to light. If you are working with a light background, then your text should be dark.', 'et_builder')), 'text_orientation' => array('label' => esc_html__('Text Orientation', 'et_builder'), 'type' => 'select', 'option_category' => 'layout', 'options' => et_builder_get_text_orientation_options(), 'description' => esc_html__('This controls the how your text is aligned within the module.', 'et_builder')), 'submenu_direction' => array('label' => esc_html__('Sub-Menus Open', 'et_builder'), 'type' => 'select', 'option_category' => 'configuration', 'options' => array('downwards' => esc_html__('Downwards', 'et_builder'), 'upwards' => esc_html__('Upwards', 'et_builder')), 'description' => esc_html__('Here you can choose the direction that your sub-menus will open. You can choose to have them open downwards or upwards.', 'et_builder'), 'computed_affects' => array('__menu')), 'fullwidth_menu' => array('label' => esc_html__('Make Menu Links Fullwidth', 'et_builder'), 'type' => 'yes_no_button', 'option_category' => 'layout', 'options' => array('off' => esc_html__('No', 'et_builder'), 'on' => esc_html__('Yes', 'et_builder')), 'tab_slug' => 'advanced'), 'active_link_color' => array('label' => esc_html__('Active Link Color', 'et_builder'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced'), 'dropdown_menu_bg_color' => array('label' => esc_html__('Dropdown Menu Background Color', 'et_builder'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced'), 'dropdown_menu_line_color' => array('label' => esc_html__('Dropdown Menu Line Color', 'et_builder'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced'), 'dropdown_menu_text_color' => array('label' => esc_html__('Dropdown Menu Text Color', 'et_builder'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced'), 'dropdown_menu_animation' => array('label' => esc_html__('Dropdown Menu Animation', 'et_builder'), 'type' => 'select', 'option_category' => 'configuration', 'options' => array('fade' => esc_html__('Fade', 'et_builder'), 'expand' => esc_html__('Expand', 'et_builder'), 'slide' => esc_html__('Slide', 'et_builder'), 'flip' => esc_html__('Flip', 'et_builder')), 'tab_slug' => 'advanced'), 'mobile_menu_bg_color' => array('label' => esc_html__('Mobile Menu Background Color', 'et_builder'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced'), 'mobile_menu_text_color' => array('label' => esc_html__('Mobile Menu Text Color', 'et_builder'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced'), 'disabled_on' => array('label' => esc_html__('Disable on', 'et_builder'), 'type' => 'multiple_checkboxes', 'options' => array('phone' => esc_html__('Phone', 'et_builder'), 'tablet' => esc_html__('Tablet', 'et_builder'), 'desktop' => esc_html__('Desktop', 'et_builder')), 'additional_att' => 'disable_on', 'option_category' => 'configuration', 'description' => esc_html__('This will disable the module on selected devices', 'et_builder')), 'admin_label' => array('label' => esc_html__('Admin Label', 'et_builder'), 'type' => 'text', 'description' => esc_html__('This will change the label of the module in the builder for easy identification.', 'et_builder')), 'module_id' => array('label' => esc_html__('CSS ID', 'et_builder'), 'type' => 'text', 'option_category' => 'configuration', 'tab_slug' => 'custom_css', 'option_class' => 'et_pb_custom_css_regular'), 'module_class' => array('label' => esc_html__('CSS Class', 'et_builder'), 'type' => 'text', 'option_category' => 'configuration', 'tab_slug' => 'custom_css', 'option_class' => 'et_pb_custom_css_regular'), '__menu' => array('type' => 'computed', 'computed_callback' => array('ET_Builder_Module_Fullwidth_Menu', 'get_fullwidth_menu'), 'computed_depends_on' => array('menu_id', 'submenu_direction')));
     return $fields;
 }
Esempio n. 2
0
 function get_fields()
 {
     $fields = array('menu_id' => array('label' => __('Menu', 'et_builder'), 'type' => 'select', 'option_category' => 'basic_option', 'options' => et_builder_get_nav_menus_options(), 'description' => sprintf('<p class="description">%2$s. <a href="%1$s" target="_blank">%3$s</a>.</p>', esc_url(admin_url('nav-menus.php')), esc_html__('Select a menu that should be used in the module', 'et_builder'), esc_html__('Click here to create new menu', 'et_builder'))), 'background_color' => array('label' => __('Background Color', 'et_builder'), 'type' => 'color-alpha', 'description' => __('Use the color picker to choose a background color for this module.', 'et_builder')), 'background_layout' => array('label' => __('Text Color', 'et_builder'), 'type' => 'select', 'option_category' => 'color_option', 'options' => array('light' => __('Dark', 'et_builder'), 'dark' => __('Light', 'et_builder')), 'description' => __('Here you can choose the value of your text. If you are working with a dark background, then your text should be set to light. If you are working with a light background, then your text should be dark.', 'et_builder')), 'text_orientation' => array('label' => __('Text Orientation', 'et_builder'), 'type' => 'select', 'option_category' => 'layout', 'options' => et_builder_get_text_orientation_options(), 'description' => __('This controls the how your text is aligned within the module.', 'et_builder')), 'submenu_direction' => array('label' => __('Sub-Menus Open', 'et_builder'), 'type' => 'select', 'option_category' => 'configuration', 'options' => array('downwards' => __('Downwards', 'et_builder'), 'upwards' => __('Upwards', 'et_builder')), 'description' => __('Here you can choose the direction that your sub-menus will open. You can choose to have them open downwards or upwards.', 'et_builder')), 'admin_label' => array('label' => __('Admin Label', 'et_builder'), 'type' => 'text', 'description' => __('This will change the label of the module in the builder for easy identification.', 'et_builder')), 'module_id' => array('label' => __('CSS ID', 'et_builder'), 'type' => 'text', 'option_category' => 'configuration', 'description' => __('Enter an optional CSS ID to be used for this module. An ID can be used to create custom CSS styling, or to create links to particular sections of your page.', 'et_builder')), 'module_class' => array('label' => __('CSS Class', 'et_builder'), 'type' => 'text', 'option_category' => 'configuration', 'description' => __('Enter optional CSS classes to be used for this module. A CSS class can be used to create custom CSS styling. You can add multiple classes, separated with a space.', 'et_builder')), 'fullwidth_menu' => array('label' => __('Make Menu Links Fullwidth', 'et_builder'), 'type' => 'yes_no_button', 'option_category' => 'layout', 'options' => array('off' => __('No', 'et_builder'), 'on' => __('Yes', 'et_builder')), 'tab_slug' => 'advanced'), 'active_link_color' => array('label' => __('Active Link Color', 'et_builder'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced'), 'dropdown_menu_bg_color' => array('label' => __('Dropdown Menu Background Color', 'et_builder'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced'), 'dropdown_menu_line_color' => array('label' => __('Dropdown Menu Line Color', 'et_builder'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced'), 'dropdown_menu_text_color' => array('label' => __('Dropdown Menu Text Color', 'et_builder'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced'), 'dropdown_menu_animation' => array('label' => __('Dropdown Menu Animation', 'et_builder'), 'type' => 'select', 'option_category' => 'configuration', 'options' => array('fade' => __('Fade', 'et_builder'), 'expand' => __('Expand', 'et_builder'), 'slide' => __('Slide', 'et_builder'), 'flip' => __('Flip', 'et_builder')), 'tab_slug' => 'advanced'), 'mobile_menu_bg_color' => array('label' => __('Mobile Menu Background Color', 'et_builder'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced'), 'mobile_menu_text_color' => array('label' => __('Mobile Menu Text Color', 'et_builder'), 'type' => 'color-alpha', 'custom_color' => true, 'tab_slug' => 'advanced'));
     return $fields;
 }
 function get_fields()
 {
     $fields = array('menu_id' => array('label' => __('Menu', 'et_builder'), 'type' => 'select', 'options' => et_builder_get_nav_menus_options(), 'description' => sprintf('<p class="description">%2$s. <a href="%1$s" target="_blank">%3$s</a>.</p>', esc_url(admin_url('nav-menus.php')), esc_html__('Select a menu that should be used in the module', 'et_builder'), esc_html__('Click here to create new menu', 'et_builder'))), 'background_color' => array('label' => __('Background Color', 'et_builder'), 'type' => 'color-alpha', 'description' => __('Use the color picker to choose a background color for this module.', 'et_builder')), 'background_layout' => array('label' => __('Text Color', 'et_builder'), 'type' => 'select', 'options' => array('light' => __('Dark', 'et_builder'), 'dark' => __('Light', 'et_builder')), 'description' => __('Here you can choose the value of your text. If you are working with a dark background, then your text should be set to light. If you are working with a light background, then your text should be dark.', 'et_builder')), 'text_orientation' => array('label' => __('Text Orientation', 'et_builder'), 'type' => 'select', 'options' => et_builder_get_text_orientation_options(), 'description' => __('This controls the how your text is aligned within the module.', 'et_builder')), 'submenu_direction' => array('label' => __('Sub-Menus Open', 'et_builder'), 'type' => 'select', 'options' => array('downwards' => __('Downwards', 'et_builder'), 'upwards' => __('Upwards', 'et_builder')), 'description' => __('Here you can choose the direction that your sub-menus will open. You can choose to have them open downwards or upwards.', 'et_builder')), 'admin_label' => array('label' => __('Admin Label', 'et_builder'), 'type' => 'text', 'description' => __('This will change the label of the module in the builder for easy identification.', 'et_builder')), 'module_id' => array('label' => __('CSS ID', 'et_builder'), 'type' => 'text', 'description' => __('Enter an optional CSS ID to be used for this module. An ID can be used to create custom CSS styling, or to create links to particular sections of your page.', 'et_builder')), 'module_class' => array('label' => __('CSS Class', 'et_builder'), 'type' => 'text', 'description' => __('Enter optional CSS classes to be used for this module. A CSS class can be used to create custom CSS styling. You can add multiple classes, separated with a space.', 'et_builder')));
     return $fields;
 }