| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Views class for Shortcode generator options. |
| 5 |
* |
| 6 |
* @link https://themeatelier.net |
| 7 |
* @since 1.0.0 |
| 8 |
* |
| 9 |
* @package darkify |
| 10 |
* @subpackage darkify/src/Admin/Views/ADminDarkMode |
| 11 |
* @author ThemeAtelier<themeatelierbd@gmail.com> |
| 12 |
*/ |
| 13 |
|
| 14 |
namespace ThemeAtelier\Darkify\Admin\Views; |
| 15 |
|
| 16 |
use ThemeAtelier\Darkify\Admin\Framework\Classes\Darkify; |
| 17 |
|
| 18 |
class ADminDarkMode |
| 19 |
{ |
| 20 |
/** |
| 21 |
* Create Option fields for the setting options. |
| 22 |
* |
| 23 |
* @param string $prefix Option setting key prefix. |
| 24 |
* @return void |
| 25 |
*/ |
| 26 |
public static function options($prefix) |
| 27 |
{ |
| 28 |
Darkify::createSection($prefix, array( |
| 29 |
'title' => esc_html__('ADMIN DARK MODE', 'darkify'), |
| 30 |
'icon' => 'icofont-brand-wordpress', |
| 31 |
'id' => 'control_admin', |
| 32 |
'fields' => array( |
| 33 |
array( |
| 34 |
'type' => 'heading', |
| 35 |
'content' => esc_html__('Admin Panel Dark Control', 'darkify'), |
| 36 |
), |
| 37 |
array( |
| 38 |
'id' => 'enable_admin_panel_dark_mode', |
| 39 |
'type' => 'switcher', |
| 40 |
'title' => esc_html__('Enable or Disable Admin Panel Dark Mode', 'darkify'), |
| 41 |
'desc' => esc_html__('Switch to show the Dark Mode Floating Switch in your Websites frontend.', 'darkify'), |
| 42 |
'text_on' => esc_html__('Enabled', 'darkify-pro'), |
| 43 |
'text_off' => esc_html__('Disabled', 'darkify-pro'), |
| 44 |
'text_width' => 100, |
| 45 |
'default' => false, |
| 46 |
), |
| 47 |
array( |
| 48 |
'id' => 'disallowed_admin_pages', |
| 49 |
'type' => 'textarea', |
| 50 |
'class' => 'only_pro', |
| 51 |
'title' => esc_html__('Disallowed Pages', 'darkify'), |
| 52 |
'desc' => esc_html__('Dark mode will not be applied to these admin pages.', 'darkify'), |
| 53 |
'placeholder' => esc_html__('Enter comma separated page slugs. Example: darkify-dashboard, elementor', 'darkify'), |
| 54 |
'dependency' => array('enable_admin_panel_dark_mode', '==', 'true'), |
| 55 |
), |
| 56 |
) |
| 57 |
)); |
| 58 |
} |
| 59 |
} |
| 60 |
|