PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 2.0.3
Adminify – White Label, Admin Menu Editor, Login Customizer v2.0.3
4.3.1 4.3.0 4.2.26 4.2.25 4.2.24 4.2.23 4.2.22 4.2.21 4.2.20 4.2.19 4.2.18 4.2.17 4.2.16 4.2.15 4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 4.1.17 All 164 releases
adminify / Inc / Admin / Options / Custom_CSS_JS_Admin_Area.php

Custom_CSS_JS_Admin_Area.php in Adminify – White Label, Admin Menu Editor, Login Customizer 2.0.3, at Inc/Admin/Options/Custom_CSS_JS_Admin_Area.php

87 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPAdminify\Inc\Admin\Options;
4
5 use WPAdminify\Inc\Utils;
6 use WPAdminify\Inc\Admin\AdminSettingsModel;
7
8 if (!defined('ABSPATH')) {
9 die;
10 } // Cannot access directly.
11
12 class Custom_CSS_JS_Admin_Area extends AdminSettingsModel
13 {
14 public function __construct()
15 {
16 $this->general_post_settings();
17 }
18
19 public function get_defaults()
20 {
21 return [
22 'custom_css' => '',
23 'custom_js' => ''
24 ];
25 }
26
27
28 /**
29 * Post Status Columns
30 */
31
32 public function custom_css_js_fields(&$fields)
33 {
34 $fields[] = array(
35 'type' => 'subheading',
36 'content' => Utils::adminfiy_help_urls(
37 __('Custom CSS/JS Settings', WP_ADMINIFY_TD),
38 'https://wpadminify.com/kb/wp-adminify-options-panel/#custom-css-js',
39 'https://www.youtube.com/playlist?list=PLqpMw0NsHXV-EKj9Xm1DMGa6FGniHHly8',
40 'https://www.facebook.com/groups/jeweltheme',
41 'https://wpadminify.com/support/'
42 )
43 );
44
45 $fields[] = array(
46 'id' => 'custom_css',
47 'type' => 'code_editor',
48 'title' => __('Custom CSS (Admin Area)', WP_ADMINIFY_TD),
49 'desc' => __('Write your own <strong>Custom CSS</strong> for WordPress Admin here', WP_ADMINIFY_TD),
50 'settings' => array(
51 'theme' => 'mbo',
52 'mode' => 'css',
53 ),
54 'default' => '
55 /* Your Custom CSS Code here */'
56 );
57
58 $fields[] = array(
59 'id' => 'custom_js',
60 'type' => 'code_editor',
61 'title' => __('Custom JavaScript (Admin Area)', WP_ADMINIFY_TD),
62 'desc' => 'Write your own <strong>Custom Script</strong> for WordPress Admin here',
63 'settings' => array(
64 'theme' => 'dracula',
65 'mode' => 'javascript',
66 )
67 );
68 }
69
70 public function general_post_settings()
71 {
72 if (!class_exists('ADMINIFY')) {
73 return;
74 }
75
76 $fields = [];
77 $this->custom_css_js_fields($fields);
78
79 // Custom CSS Settings
80 \ADMINIFY::createSection($this->prefix, array(
81 'title' => __('Custom CSS/JS', WP_ADMINIFY_TD),
82 'icon' => 'fas fa-code',
83 'fields' => $fields
84 ));
85 }
86 }
87