PluginProbe
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) / 2.0.1
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) v2.0.1
2.1.3 2.1.2 2.1.1 2.1.0 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 trunk 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 All 57 releases
darkify / src / Admin / Views / Tools.php

Tools.php in Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) 2.0.1, at src/Admin/Views/Tools.php

76 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Tools class for Tools options.
5 *
6 * @link https://themeatelier.net
7 * @since 1.0.0
8 *
9 * @package darkify
10 * @subpackage darkify/src/Admin/Views/Tools
11 * @author ThemeAtelier<themeatelierbd@gmail.com>
12 */
13
14 namespace ThemeAtelier\Darkify\Admin\Views;
15
16 use ThemeAtelier\Darkify\Admin\Schema\SchemaRegistry;
17
18 class Tools
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 SchemaRegistry::createSection(
29 $prefix,
30 array(
31 'title' => esc_html__('Tools', 'darkify'),
32 'icon' => 'icofont-holding-hands',
33 'fields' => array(
34 // Intro line, rendered plain above the section cards.
35 array(
36 'type' => 'page_hint',
37 'content' => esc_html__('Maintenance, backup, and restore utilities.', 'darkify'),
38 ),
39 // ===== DATA =====
40 array(
41 'type' => 'heading',
42 'title' => esc_html__('Data', 'darkify'),
43 'section_start' => true,
44 ),
45 array(
46 'id' => 'darkify_data_remove',
47 'type' => 'switcher',
48 'title' => esc_html__('Clean-up Data on Deletion', 'darkify'),
49 'title_help' =>
50 '<div class="darkify-info-label">' .
51 esc_html__('Enable this option to completely remove all Darkify data when the plugin is deleted.', 'darkify') .
52 '</div>',
53 'text_on' => esc_html__('Enabled', 'darkify'),
54 'text_off' => esc_html__('Disabled', 'darkify'),
55 'text_width' => 100,
56 ),
57 // ===== BACKUP & RESTORE =====
58 array(
59 'type' => 'heading',
60 'title' => esc_html__('Backup & Restore', 'darkify'),
61 'section_start' => true,
62 ),
63 array(
64 'title' => esc_html__('Backup and Restore Settings', 'darkify'),
65 'title_help' =>
66 '<div class="darkify-info-label">' .
67 esc_html__('Use these options to back up your settings for safekeeping or restore them when needed. You can export your current settings as a .json file and import it anytime to restore your configuration.', 'darkify') .
68 '</div>',
69 'type' => 'backup',
70 ),
71 ),
72 )
73 );
74 }
75 }
76