Edit: settings.php
<?php $settings_fields = array( 'position' => array( 'fields' => array( 'position' => array( 'label' => __( 'Button Position', 'dnxte-divi-essential' ), 'type' => 'select', 'options' => array( 'left' => __( 'Left Side', 'dnxte-divi-essential' ), 'right' => __( 'Right Side', 'dnxte-divi-essential' ), ), ), 'position_offset_right' => array( 'label' => __( 'Right Offset', 'dnxte-divi-essential' ), 'type' => 'number', 'placeholder' => '10', 'dependency' => array( 'position', 'right' ), ), 'position_offset_left' => array( 'label' => __( 'Left Offset', 'dnxte-divi-essential' ), 'type' => 'number', 'placeholder' => '10', 'dependency' => array( 'position', 'left' ), ), 'position_offset_bottom' => array( 'label' => __( 'Bottom Offset', 'dnxte-divi-essential' ), 'type' => 'number', 'placeholder' => '10', ), 'hide_on_mobile' => array( 'label' => __( 'Mobile Visibility', 'dnxte-divi-essential' ), 'type' => 'checkbox', ), 'hide_on_mobile_size' => array( 'label' => __( 'Show Button After Max Width', 'dnxte-divi-essential' ), 'type' => 'number', 'placeholder' => '767', 'dependency' => array( 'hide_on_mobile', 1 ), ), ), ), 'content' => array( 'fields' => array( 'button_content' => array( 'label' => __( 'Select Button Style', 'dnxte-divi-essential' ), 'type' => 'select', 'options' => array( 'text' => __( 'Text Only', 'dnxte-divi-essential' ), 'icon' => __( 'Icon Only', 'dnxte-divi-essential' ), 'both' => __( 'Display Text with Icon', 'dnxte-divi-essential' ), ), ), // 'custom_back_to_top' => array( // 'label' => __( 'Custom Back To Top', 'dnxte-divi-essential' ), // 'type' => 'checkbox', // ), // 'custom_back_to_top_link' => array( // 'label' => __( 'Custom Back To Top Link', 'dnxte-divi-essential' ), // 'type' => 'text', // 'placeholder' => '#', // 'dependency' => array( 'custom_back_to_top', 1 ), // ), 'icon_text' => array( 'label' => __( 'Button Text', 'dnxte-divi-essential' ), 'type' => 'text', 'placeholder' => 'Back To Top', 'dependency' => array( 'button_content', array( 'text', 'both' ) ), ), 'display_text_align' => array( 'label' => __( 'Display Text', 'dnxte-divi-essential' ), 'type' => 'radio', 'options' => array( 'horizontal' => __( 'Horizontal', 'dnxte-divi-essential' ), 'vertical' => __( 'Vertical', 'dnxte-divi-essential' ), ), ), 'icon_placement' => array( 'label' => __( 'Icon Placement', 'dnxte-divi-essential' ), 'type' => 'radio', 'options' => array( 'left' => __( 'Left Side', 'dnxte-divi-essential' ), 'right' => __( 'Right Side', 'dnxte-divi-essential' ), ), 'dependency' => array( 'button_content', array( 'both' ) ), ), 'button_icon_type' => array( 'label' => __( 'Icon Type', 'dnxte-divi-essential' ), 'type' => 'radio', 'options' => array( 'dashicon' => __( 'Dashicon', 'dnxte-divi-essential' ), 'custom_image' => __( 'Custom Image', 'dnxte-divi-essential' ), 'external_url' => __( 'External Image URL', 'dnxte-divi-essential' ), ), 'dependency' => array( 'button_content', array( 'icon', 'both' ) ), ), 'button_dashicon' => array( 'label' => __( 'Select Dashicon', 'dnxte-divi-essential' ), 'type' => 'dashicon', 'dependency' => array( 'button_icon_type', array( 'dashicon' ) ), ), 'button_custom_image' => array( 'label' => __( 'Custom Image', 'dnxte-divi-essential' ), 'type' => 'image', // 'dependency' => array( 'button_content', array( 'icon', 'both' ) ), 'dependency' => array( 'button_icon_type', array( 'custom_image' ) ), // 'dependency' => array( 'button_icon_type', array( 'icon', 'both', 'custom_image' ) ), ), 'button_external_url' => array( 'label' => __( 'External Image URL', 'dnxte-divi-essential' ), 'type' => 'text', 'dependency' => array( 'button_icon_type', 'external_url' ), ), ), ), 'customization' => array( 'fields' => array( 'button_font' => array( 'label' => __( 'Button Font', 'dnxte-divi-essential' ), 'type' => 'font', 'dependency' => array( 'button_content', array( 'text', 'both' ) ), ), 'button_font_weight' => array( 'label' => __( 'Button Font Weight', 'dnxte-divi-essential' ), 'type' => 'select', 'options' => array( '400' => __( 'Normal', 'dnxte-divi-essential' ), '500' => __( 'Medium', 'dnxte-divi-essential' ), '600' => __( 'Semi Bold', 'dnxte-divi-essential' ), '700' => __( 'Bold', 'dnxte-divi-essential' ), ), 'dependency' => array( 'button_content', array( 'text', 'both' ) ), ), 'button_font_size' => array( 'label' => __( 'Button Font Size', 'dnxte-divi-essential' ), 'type' => 'number', 'dependency' => array( 'button_content', array( 'text', 'both' ) ), ), 'button_letter_spacing' => array( 'label' => __( 'Button Letter Spacing', 'dnxte-divi-essential' ), 'type' => 'number', 'dependency' => array( 'button_content', array( 'text', 'both' ) ), ), 'button_line_height' => array( 'label' => __( 'Button Line Height', 'dnxte-divi-essential' ), 'type' => 'number', 'dependency' => array( 'button_content', array( 'text', 'both' ) ), ), 'icon_text_color' => array( 'label' => __( 'Icon/Text Color', 'dnxte-divi-essential' ), 'type' => 'color', 'dependency' => array( 'button_content', array( 'text', 'both' ) ), ), 'icon_text_hover_color' => array( 'label' => __( 'Icon/Text Hover Color', 'dnxte-divi-essential' ), 'type' => 'color', 'dependency' => array( 'button_content', array( 'text', 'both' ) ), ), 'icon_size' => array( 'label' => __( 'Icon/Image Size', 'dnxte-divi-essential' ), 'type' => 'number', 'dependency' => array( 'button_content', array( 'icon', 'both' ) ), ), 'border_radius' => array( 'label' => __( 'Border Radius', 'dnxte-divi-essential' ), 'placeholder' => '5', 'type' => 'number', ), 'bg_color' => array( 'label' => __( 'Button Background Color', 'dnxte-divi-essential' ), 'type' => 'color', ), 'bg_hover_color' => array( 'label' => __( 'Button Hover Background Color', 'dnxte-divi-essential' ), 'type' => 'color', ), // 'button_margin' => array( // 'label' => __( 'Button Margin', 'dnxte-divi-essential' ), // 'type' => 'dimension', // ), 'button_padding' => array( 'label' => __( 'Button Padding', 'dnxte-divi-essential' ), 'type' => 'dimension', ), ), ), ); $GLOBALS['dnxte_settings_fields'] = $settings_fields;
Save
Back