*/ namespace ThemeAtelier\Darkify\Admin\Views; use ThemeAtelier\Darkify\Admin\Framework\Classes\Darkify; class SwitcherStyle { /** * Create Option fields for the setting options. * * @param string $prefix Option setting key prefix. * @return void */ public static function options($prefix) { Darkify::createSection( $prefix, array( 'title' => esc_html__('SWITCHER STYLE', 'darkify'), 'icon' => 'icofont-toggle-on', 'fields' => array( array( 'type' => 'heading', 'content' => esc_html__('Switch Version', 'darkify'), ), array( 'id' => 'enable_dark_switcher', 'type' => 'layout_preset', 'title' => esc_html__('Floating Switch', 'darkify'), 'desc' => esc_html__('Choose default floating switch', 'darkify'), 'class' => 'icon_select', 'options' => array( 'classic' => array( 'image' => DARKIFY_DIR_URL . 'src/Admin/image/icon-01.jpg', 'text' => esc_html__('Classic', 'darkify'), 'option_demo_url' => '', ), 'expand' => array( 'image' => DARKIFY_DIR_URL . 'src/Admin/image/icon-02.jpg', 'text' => esc_html__('Expand', 'darkify'), 'option_demo_url' => '', ), 'inner-moon' => array( 'image' => DARKIFY_DIR_URL . 'src/Admin/image/icon-03.jpg', 'text' => esc_html__('Inner Moon', 'darkify'), 'option_demo_url' => '', ), 'within' => array( 'image' => DARKIFY_DIR_URL . 'src/Admin/image/icon-04.jpg', 'text' => esc_html__('Within', 'darkify'), 'option_demo_url' => '', ), 'around' => array( 'image' => DARKIFY_DIR_URL . 'src/Admin/image/icon-05.jpg', 'text' => esc_html__('Around', 'darkify'), 'option_demo_url' => '', 'pro_only' => true, ), 'dark-side' => array( 'image' => DARKIFY_DIR_URL . 'src/Admin/image/icon-06.jpg', 'text' => esc_html__('Dark Side', 'darkify'), 'option_demo_url' => '', 'pro_only' => true, ), 'horizon' => array( 'image' => DARKIFY_DIR_URL . 'src/Admin/image/icon-07.jpg', 'text' => esc_html__('Horizon', 'darkify'), 'option_demo_url' => '', 'pro_only' => true, ), 'eclipse' => array( 'image' => DARKIFY_DIR_URL . 'src/Admin/image/icon-08.jpg', 'text' => esc_html__('Eclipse', 'darkify'), 'option_demo_url' => '', 'pro_only' => true, ), 'lightbulb' => array( 'image' => DARKIFY_DIR_URL . 'src/Admin/image/icon-09.jpg', 'text' => esc_html__('Lightbulb', 'darkify'), 'option_demo_url' => '', 'pro_only' => true, ), 'dark-inner' => array( 'image' => DARKIFY_DIR_URL . 'src/Admin/image/icon-10.jpg', 'text' => esc_html__('Dark Inner', 'darkify'), 'option_demo_url' => '', 'pro_only' => true, ), 'half-sun' => array( 'image' => DARKIFY_DIR_URL . 'src/Admin/image/icon-11.jpg', 'text' => esc_html__('Half Sun', 'darkify'), 'option_demo_url' => '', 'pro_only' => true, ), 'simple' => array( 'image' => DARKIFY_DIR_URL . 'src/Admin/image/icon-12.jpg', 'text' => esc_html__('Simple', 'darkify'), 'option_demo_url' => '', 'pro_only' => true, ), ), 'default' => 'classic', ), // Enable Tooltip on Floating Switch array( 'id' => 'tooltip_on_floating_switch', 'type' => 'fieldset', 'fields' => array( array( 'id' => 'floating_switch_width', 'type' => 'switcher', 'title' => esc_html__('Enable or Disable Tooltip on Floating Switch', 'darkify'), 'desc' => esc_html__('Want to show a hint on dark mode floating switch as tooltip?', 'darkify'), 'text_on' => esc_html__('Enabled', 'darkify-pro'), 'text_off' => esc_html__('Disabled', 'darkify-pro'), 'text_width' => 100, 'default' => false, ), array( 'id' => 'tooltip_position', 'type' => 'select', 'title' => esc_html__('Tooltip Position', 'darkify'), 'desc' => esc_html__('Choose the position where the tooltip should be displaed relative to the floating switch.', 'darkify'), 'options' => array( 'top' => esc_html__('Top', 'darkify'), 'bottom' => esc_html__('Bottom', 'darkify'), 'left' => esc_html__('Left', 'darkify'), 'right' => esc_html__('Right', 'darkify'), ), 'default' => 'left', 'dependency' => array('floating_switch_width', '==', 'true'), ), array( 'id' => 'tooltip_text', 'type' => 'text', 'title' => esc_html__('Tooltip Text', 'darkify'), 'desc' => esc_html__('Customize text to be displayed on the tooltip.', 'darkify'), 'default' => esc_html__('Tooltip Text', 'darkify'), 'dependency' => array('floating_switch_width', '==', 'true'), ), array( 'id' => 'tooltip_background_color', 'type' => 'color', 'title' => esc_html__('Tooltip Background Color', 'darkify'), 'desc' => esc_html__('Customize the background color of the floating switch tooltip.', 'darkify'), 'dependency' => array('floating_switch_width', '==', 'true'), 'default' => '#142434', ), array( 'id' => 'tooltip_text_color', 'type' => 'color', 'title' => esc_html__('Tooltip Text Color', 'darkify'), 'desc' => esc_html__('Customize default margin from the left of the Floating Switch in Mobile.', 'darkify'), 'dependency' => array('floating_switch_width', '==', 'true'), 'default' => '#B0CBE7', ), ), ), array( 'type' => 'heading', 'content' => esc_html__('Position Customization', 'darkify'), ), // Switch Position array( 'id' => 'switcher_button_position', 'type' => 'fieldset', 'fields' => array( array( 'id' => 'dark_mode_switch_position', 'type' => 'select', 'title' => esc_html__('Switch Position', 'darkify'), 'desc' => esc_html__('Choose the screen position where the Floating Switch should be displayed.', 'darkify'), 'options' => array( 'top_right' => esc_html__('Top Right', 'darkify'), 'top_left' => esc_html__('Top Left', 'darkify'), 'bottom_right' => esc_html__('Bottom Right', 'darkify'), 'bottom_left' => esc_html__('Bottom Left', 'darkify'), ), 'default' => 'bottom_right', ), array( 'id' => 'switch_position_top_right', 'type' => 'spacing', 'title' => esc_html__('Margin From Top Right', 'darkify'), 'desc' => esc_html__('Customize default margin from the top right of the Floating Switch.', 'darkify'), 'left' => false, 'bottom' => false, 'default' => array( 'top' => '40', 'right' => '40', 'unit' => 'px', ), 'dependency' => array('dark_mode_switch_position', '==', 'top_right'), ), array( 'id' => 'switch_position_top_left', 'type' => 'spacing', 'title' => esc_html__('Margin From Top Left', 'darkify'), 'desc' => esc_html__('Customize default margin from the top left of the Floating Switch.', 'darkify'), 'right' => false, 'bottom' => false, 'default' => array( 'top' => '40', 'left' => '40', 'unit' => 'px', ), 'dependency' => array('dark_mode_switch_position', '==', 'top_left'), ), array( 'id' => 'switch_position_bottom_right', 'type' => 'spacing', 'title' => esc_html__('Margin From Bottom Right', 'darkify'), 'desc' => esc_html__('Customize default margin from the bottom right of the Floating Switch.', 'darkify'), 'left' => false, 'top' => false, 'default' => array( 'bottom' => '40', 'right' => '40', 'unit' => 'px', ), 'dependency' => array('dark_mode_switch_position', '==', 'bottom_right'), ), array( 'id' => 'switch_position_bottom_left', 'type' => 'spacing', 'title' => esc_html__('Margin from bottom left', 'darkify'), 'desc' => esc_html__('Customize default margin from the bottom left of the Floating Switch.', 'darkify'), 'right' => false, 'top' => false, 'default' => array( 'bottom' => '40', 'left' => '40', 'unit' => 'px', ), 'dependency' => array('dark_mode_switch_position', '==', 'bottom_left'), ), ), ), // Different Switch Position in Mobile array( 'id' => 'different_switch_in_mobile', 'type' => 'fieldset', 'fields' => array( array( 'id' => 'switch_position_different_in_mobile', 'type' => 'switcher', 'title' => esc_html__('Enable or Disable Different Switch Position in Mobile', 'darkify'), 'desc' => esc_html__('Should the Floating Switch be displayed on different position in mobile?', 'darkify'), 'text_on' => esc_html__('Enabled', 'darkify-pro'), 'text_off' => esc_html__('Disabled', 'darkify-pro'), 'text_width' => 100, 'default' => true, ), array( 'id' => 'switch_position_in_mobile', 'type' => 'select', 'title' => esc_html__('Switch Position in Mobile', 'darkify'), 'desc' => esc_html__('Choose the screen position where the Floating Switch should be displayed in mobile.', 'darkify'), 'options' => array( 'top_right' => esc_html__('Top Right', 'darkify'), 'top_left' => esc_html__('Top Left', 'darkify'), 'bottom_right' => esc_html__('Bottom Right', 'darkify'), 'bottom_left' => esc_html__('Bottom Left', 'darkify'), ), 'dependency' => array('switch_position_different_in_mobile', '==', 'true'), ), array( 'id' => 'switch_position_top_right_in_mobile', 'type' => 'spacing', 'title' => esc_html__('Margin From Top Right in Mobile', 'darkify'), 'desc' => esc_html__('Customize default margin from the top right of the Floating Switch.', 'darkify'), 'left' => false, 'bottom' => false, 'default' => array( 'top' => '40', 'right' => '40', 'unit' => 'px', ), 'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|top_right'), ), array( 'id' => 'switch_position_top_left_in_mobile', 'type' => 'spacing', 'title' => esc_html__('Margin From Top Left in Mobile', 'darkify'), 'desc' => esc_html__('Customize default margin from the top left of the Floating Switch.', 'darkify'), 'right' => false, 'bottom' => false, 'default' => array( 'top' => '40', 'left' => '40', 'unit' => 'px', ), 'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|top_left'), ), array( 'id' => 'switch_position_bottom_right_in_mobile', 'type' => 'spacing', 'title' => esc_html__('Margin From Bottom Right in Mobile', 'darkify'), 'desc' => esc_html__('Customize default margin from the bottom right of the Floating Switch.', 'darkify'), 'left' => false, 'top' => false, 'default' => array( 'bottom' => '40', 'right' => '40', 'unit' => 'px', ), 'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|bottom_right'), ), array( 'id' => 'switch_position_bottom_left_in_mobile', 'type' => 'spacing', 'title' => esc_html__('Margin From Bottom Left in Mobile', 'darkify'), 'desc' => esc_html__('Customize default margin from the bottom left of the Floating Switch.', 'darkify'), 'right' => false, 'top' => false, 'default' => array( 'bottom' => '40', 'left' => '40', 'unit' => 'px', ), 'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|bottom_left'), ), ), ), array( 'id' => 'enable_absolute_position', 'type' => 'switcher', 'title' => esc_html__('Absolute Switch Position', 'darkify'), 'text_on' => esc_html__('Enabled', 'darkify'), 'text_off' => esc_html__('Disabled', 'darkify'), 'text_width' => '100', 'desc' => esc_html__('Enable to make the floating switch scroll from its position with page scrolling.', 'darkify'), ), array( 'id' => 'enable_switch_dragging', 'type' => 'switcher', 'title' => esc_html__('Draggable Position Change', 'darkify'), 'text_on' => esc_html__('Enabled', 'darkify'), 'text_off' => esc_html__('Disabled', 'darkify'), 'text_width' => '100', 'desc' => esc_html__('Allow/Disallow users to change the floating switch position by dragging to where they want.', 'darkify'), 'class' => 'switcher_pro_only', ), array( 'type' => 'heading', 'content' => esc_html__('Advanced Customization', 'darkify'), ), array( 'id' => 'switch_width_height', 'type' => 'dimensions', 'title' => esc_html__('Floating Switch Size', 'darkify'), 'desc' => esc_html__('Customize the Selected Switch Design in Your Way.', 'darkify'), 'height' => false, 'default' => array( 'width' => '60', ) ), array( 'id' => 'switch_icon_size', 'type' => 'dimensions', 'title' => esc_html__('Floating Switch Icon Size', 'darkify'), 'desc' => esc_html__('Customize the Selected Switch Icon Size.', 'darkify'), 'height' => false, 'default' => array( 'width' => '50', ) ), array( 'id' => 'switch_border_radius', 'type' => 'spacing', 'title' => esc_html__('Border Radius', 'darkify'), 'desc' => esc_html__('Set the border radius of the Floating Switch in pixel.', 'darkify'), 'all' => true, 'default' => array( 'all' => '7', 'unit' => 'px', ) ), array( 'id' => 'switch_light_mode_bg', 'type' => 'color', 'title' => esc_html__('Switch Background on Light Mode', 'darkify'), 'desc' => esc_html__('Set the background color of the Floating Switch in light mode.', 'darkify'), 'default' => '#121116', ), array( 'id' => 'switch_dark_mode_bg', 'type' => 'color', 'title' => esc_html__('Switch Background on Dark Mode', 'darkify'), 'desc' => esc_html__('Set the background color of the Floating Switch in dark mode.', 'darkify'), 'default' => '#ffffff', ), array( 'id' => 'switch_light_mode_color', 'type' => 'color', 'title' => esc_html__('Switch Icon Color on Light Mode', 'darkify'), 'desc' => esc_html__('Set the color color of the Floating Switch in light mode.', 'darkify'), 'default' => '#ffffff', ), array( 'id' => 'switch_dark_mode_color', 'type' => 'color', 'title' => esc_html__('Switch Icon Color on Dark Mode', 'darkify'), 'desc' => esc_html__('Set the color color of the Floating Switch in dark mode.', 'darkify'), 'default' => '#121116', ), array( 'type' => 'heading', 'content' => esc_html__('Switch Extras', 'darkify'), ), array( 'id' => 'alternative_dark_mode_switcher', 'type' => 'text', 'title' => esc_html__('Treat an element as switch', 'darkify'), 'desc' => esc_html__('Enter comma-separated CSS class or ID selectors to treat them as dark mode switch.', 'darkify'), ), array( 'id' => 'switcher_shortcode', 'type' => 'switcher_shortcode', 'title' => esc_html__('Switcher Shortcode', 'darkify'), 'desc' => esc_html__('Copy this shortcode and put any page or post to show switcher. You will able to customize all value including swtich 1-12 currently available in this version of plugin.', 'darkify'), ), ), ), ); } }