# darkify/1.3.0/src/Admin/Views/ADminDarkMode.php

Darkify – Dark Mode &amp; Night Mode for Website &amp; Admin (Dark Theme Included), version 1.3.0. 60 lines.

- Page: https://pluginprobe.com/plugins/darkify/1.3.0/code/src/Admin/Views/ADminDarkMode.php
- Raw: https://pluginprobe.com/plugins/darkify/1.3.0/raw/src/Admin/Views/ADminDarkMode.php
- Modified: 2025-03-21T01:44:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/darkify/1.3.0/code/src/Admin/Views/ADminDarkMode.php#L10-L20`.

```php
<?php

/**
 * Views class for Shortcode generator options.
 *
 * @link       https://themeatelier.net
 * @since      1.0.0
 *
 * @package darkify
 * @subpackage darkify/src/Admin/Views/ADminDarkMode
 * @author     ThemeAtelier<themeatelierbd@gmail.com>
 */

namespace ThemeAtelier\Darkify\Admin\Views;

use ThemeAtelier\Darkify\Admin\Framework\Classes\Darkify;

class ADminDarkMode
{
  /**
   * 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__('ADMIN DARK MODE', 'darkify'),
      'icon'        => 'icofont-brand-wordpress',
      'id'    => 'control_admin',
      'fields'      => array(
        array(
          'type'    => 'heading',
          'content' => esc_html__('Admin Panel Dark Control', 'darkify'),
        ),
        array(
          'id'      => 'enable_admin_panel_dark_mode',
          'type'    => 'switcher',
          'title'   => esc_html__('Enable or Disable Admin Panel Dark Mode', 'darkify'),
          'desc'    => esc_html__('Switch to show the Dark Mode Floating Switch in your Websites frontend.', 'darkify'),
          'text_on'    => esc_html__('Enabled', 'darkify-pro'),
          'text_off'    => esc_html__('Disabled', 'darkify-pro'),
          'text_width' => 100,
          'default' => false,
        ),
        array(
          'id'          => 'disallowed_admin_pages',
          'type'        => 'textarea',
          'class'        => 'only_pro',
          'title'       => esc_html__('Disallowed Pages', 'darkify'),
          'desc'        => esc_html__('Dark mode will not be applied to these admin pages.', 'darkify'),
          'placeholder' => esc_html__('Enter comma separated page slugs. Example: darkify-dashboard, elementor', 'darkify'),
          'dependency'  => array('enable_admin_panel_dark_mode', '==', 'true'),
      ),
      )
    ));
  }
}

```
