*/ namespace ThemeAtelier\Darkify\Admin\Views; use ThemeAtelier\Darkify\Admin\Framework\Classes\Darkify; class AdvancedSettings { /** * 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__('ADVANCED SETTINGS', 'darkify'), 'icon' => 'icofont-settings', 'fields' => array( // 'HTML/CSS Restriction array( 'type' => 'heading', 'content' => esc_html__('HTML/CSS Restriction', 'darkify'), ), // ALLOWED ELEMENTS array( 'id' => 'allowed_elements', 'type' => 'textarea', 'title' => esc_html__('Allow Only Elements', 'darkify'), 'desc' => esc_html__('Dark mode will be applied only to these elements.', 'darkify'), 'placeholder' => esc_html__('Enter comma separated HTML tags, CSS class or CSS ids. Example: div, #site-header, .my-footer', 'darkify'), 'class' => 'only_pro', ), array( 'id' => 'allowed_elements_force_to_correct', 'type' => 'switcher', 'title' => esc_html__('Force To Correct', 'darkify'), 'desc' => esc_html__('Force to keep designs correct if background color or text color is changed on disallowed elements..', 'darkify'), 'text_on' => esc_html__('Yes', 'darkify'), 'text_off' => esc_html__('No', 'darkify'), 'default' => true, 'class' => 'switcher_pro_only', ), // DISALLOWED ELEMENTS array( 'id' => 'disallowed_elements', 'type' => 'textarea', 'title' => esc_html__('Disallowed Elements', 'darkify'), 'desc' => esc_html__('Dark mode will be applied only to these elements.', 'darkify'), 'placeholder' => esc_html__('Enter comma separated HTML tags, CSS class or CSS ids. Example: div, #site-header, .my-footer', 'darkify'), 'class' => 'only_pro', ), array( 'id' => 'disallowed_elements_force_to_correct', 'type' => 'switcher', 'title' => esc_html__('Force To Correct', 'darkify'), 'desc' => esc_html__('Force to keep designs correct if background color or text color is not working properly for allowed elements.', 'darkify'), 'text_on' => esc_html__('Yes', 'darkify'), 'text_off' => esc_html__('No', 'darkify'), 'class' => 'switcher_pro_only', 'default' => true, ), // Page Restriction array( 'type' => 'heading', 'content' => esc_html__('Page Restriction', 'darkify'), ), array( 'id' => 'allowed_pages', 'type' => 'select', 'title' => esc_html__('Allow Only Pages', 'darkify'), 'help' => esc_html__('Dark mode will be applied only to these pages.', 'darkify'), 'desc' => esc_html__('Choose the pages only where dark mode and floating switch can work. No other pages will be able to process dark mode.', 'darkify'), 'placeholder' => esc_html__('Select some pages', 'darkify'), 'options' => 'pages', 'chosen' => true, 'multiple' => true, 'class' => 'only_pro', ), array( 'id' => 'disallowed_pages', 'type' => 'select', 'title' => esc_html__('Disallowed Pages', 'darkify'), 'help' => esc_html__('Dark mode will not be applied to these pages.', 'darkify'), 'desc' => esc_html__('Choose the pages where dark mode and floating switch can not work. Other pages will be able to process dark mode.', 'darkify'), 'placeholder' => esc_html__('Select some pages', 'darkify'), 'options' => 'pages', 'chosen' => true, 'multiple' => true, 'class' => 'only_pro', ), // Post Restriction array( 'type' => 'heading', 'content' => esc_html__('Post Restriction', 'darkify'), ), array( 'id' => 'allowed_posts', 'type' => 'select', 'title' => esc_html__('Allow Only Posts', 'darkify'), 'help' => esc_html__('Dark mode will be applied only to these posts.', 'darkify'), 'desc' => esc_html__('Choose the posts only where dark mode and floating switch can work. No other pages will be able to process dark mode.', 'darkify'), 'placeholder' => esc_html__('Select some posts', 'darkify'), 'options' => 'posts', 'chosen' => true, 'multiple' => true, 'class' => 'only_pro', ), array( 'id' => 'disallowed_posts', 'type' => 'select', 'title' => esc_html__('Disallowed Posts', 'darkify'), 'help' => esc_html__('Dark mode will not be applied to these posts.', 'darkify'), 'desc' => esc_html__('Choose the posts where dark mode and floating switch can not work. Other pages will be able to process dark mode.', 'darkify'), 'placeholder' => esc_html__('Select some posts', 'darkify'), 'options' => 'posts', 'chosen' => true, 'multiple' => true, 'class' => 'only_pro', ), array( 'type' => 'heading', 'content' => esc_html__('Custom CSS', 'darkify'), ), array( 'id' => 'custom_css', 'type' => 'code_editor', 'title' => esc_html__('Dark Mode CSS', 'darkify'), 'desc' => esc_html__('The CSS code will only be applied when dark mode is active.', 'darkify'), 'settings' => array( 'theme' => 'mbo', 'mode' => 'css', ), 'class' => 'only_pro', ), array( 'id' => 'css_rules', 'type' => 'switcher', 'title' => esc_html__('CSS Rules', 'darkify'), 'help' => esc_html__('CSS rules should be applied to all children of the CSS selectors.', 'darkify'), 'desc' => esc_html__('Custom CSS selectors are automatically identified as Disallowed Elements, to ignore, use :not-disallowed pseudo class. i.e. body:not-disallowed{...}', 'darkify'), 'text_on' => esc_html__('Yes', 'darkify'), 'text_off' => esc_html__('No', 'darkify'), 'class' => 'switcher_pro_only', 'default' => true, ), array( 'id' => 'normal_custom_css', 'type' => 'code_editor', 'title' => esc_html__('Normal Mode CSS', 'darkify'), 'desc' => esc_html__('The CSS code will be applied on both normal mode and dark mode.', 'darkify'), 'settings' => array( 'theme' => 'mbo', 'mode' => 'css', ), 'class' => 'only_pro', ), ) )); } }