PluginProbe
Elementor Website Builder – more than just a page builder / 3.4.0-dev9
Elementor Website Builder – more than just a page builder v3.4.0-dev9
4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
← All changes | core/settings/editor-preferences/model.php +32 -111 4.1.33.4.0-dev9 View file →
@@ -1,14 +1,13 @@
1 1 <?php
2 +
2 3 namespace Elementor\Core\Settings\EditorPreferences;
3 4
4 5 use Elementor\Controls_Manager;
5 6 use Elementor\Core\Settings\Base\Model as BaseModel;
6 -use Elementor\Modules\Checklist\Module as ChecklistModule;
7 -use Elementor\Plugin;
8 7
9 8 if ( ! defined( 'ABSPATH' ) ) {
10 - exit; // Exit if accessed directly.
9 + exit; // Exit if accessed directly
11 10 }
12 11
13 12 class Model extends BaseModel {
14 13
@@ -19,8 +18,9 @@
19 18 *
20 19 * @return string The name.
21 20 * @since 2.8.0
22 21 * @access public
22 + *
23 23 */
24 24 public function get_name() {
25 25 return 'editor-preferences';
26 26 }
@@ -43,45 +43,25 @@
43 43 * @since 3.1.0
44 44 * @access protected
45 45 */
46 46 protected function register_controls() {
47 - $this->start_controls_section(
48 - 'preferences',
49 - [
50 - 'tab' => Controls_Manager::TAB_SETTINGS,
51 - 'label' => esc_html__( 'Preferences', 'elementor' ),
52 - ]
53 - );
47 + $this->start_controls_section( 'preferences', [
48 + 'tab' => Controls_Manager::TAB_SETTINGS,
49 + 'label' => esc_html__( 'Preferences', 'elementor' ),
50 + ] );
54 51
55 52 $this->add_control(
56 - 'editor_heading',
57 - [
58 - 'label' => esc_html__( 'Panel', 'elementor' ),
59 - 'type' => Controls_Manager::HEADING,
60 - ]
61 - );
62 -
63 - $this->add_control(
64 53 'ui_theme',
65 54 [
66 - 'label' => esc_html__( 'Display mode', 'elementor' ),
67 - 'type' => Controls_Manager::CHOOSE,
55 + 'label' => esc_html__( 'UI Theme', 'elementor' ),
56 + 'type' => Controls_Manager::SELECT,
57 + 'description' => esc_html__( 'Set light or dark mode, or use Auto Detect to sync it with your OS setting.', 'elementor' ),
58 + 'default' => 'auto',
68 59 'options' => [
69 - 'light' => [
70 - 'title' => esc_html__( 'Light mode', 'elementor' ),
71 - 'icon' => 'eicon-light-mode',
72 - ],
73 - 'dark' => [
74 - 'title' => esc_html__( 'Dark mode', 'elementor' ),
75 - 'icon' => 'eicon-dark-mode',
76 - ],
77 - 'auto' => [
78 - 'title' => esc_html__( 'Auto detect', 'elementor' ),
79 - 'icon' => 'eicon-header',
80 - ],
60 + 'auto' => esc_html__( 'Auto Detect', 'elementor' ),
61 + 'light' => esc_html__( 'Light', 'elementor' ),
62 + 'dark' => esc_html__( 'Dark', 'elementor' ),
81 63 ],
82 - 'default' => 'auto',
83 - 'description' => esc_html__( 'Set light or dark mode, or auto-detect to sync with your operating system settings.', 'elementor' ),
84 64 ]
85 65 );
86 66
87 67 $this->add_control(
@@ -86,13 +66,13 @@
86 66
87 67 $this->add_control(
88 68 'panel_width',
89 69 [
90 - 'label' => esc_html__( 'Width', 'elementor' ) . ' (px)',
70 + 'label' => esc_html__( 'Panel Width', 'elementor' ),
91 71 'type' => Controls_Manager::SLIDER,
92 72 'range' => [
93 73 'px' => [
94 - 'min' => 250,
74 + 'min' => 200,
95 75 'max' => 680,
96 76 ],
97 77 ],
98 78 'default' => [
@@ -101,24 +81,13 @@
101 81 ]
102 82 );
103 83
104 84 $this->add_control(
105 - 'preview_heading',
106 - [
107 - 'label' => esc_html__( 'Canvas', 'elementor' ),
108 - 'type' => Controls_Manager::HEADING,
109 - 'separator' => 'before',
110 - ]
111 - );
112 -
113 - $this->add_control(
114 85 'edit_buttons',
115 86 [
116 - 'label' => esc_html__( 'Show quick edit options', 'elementor' ),
87 + 'label' => esc_html__( 'Editing Handles', 'elementor' ),
117 88 'type' => Controls_Manager::SWITCHER,
118 - 'label_on' => esc_html__( 'Yes', 'elementor' ),
119 - 'label_off' => esc_html__( 'No', 'elementor' ),
120 - 'description' => esc_html__( 'Show additional actions while hovering over the handle of an element.', 'elementor' ),
89 + 'description' => esc_html__( 'Show editing handles when hovering over the element edit button.', 'elementor' ),
121 90 ]
122 91 );
123 92
124 93 $this->add_control(
@@ -123,56 +92,18 @@
123 92
124 93 $this->add_control(
125 94 'lightbox_in_editor',
126 95 [
127 - 'label' => esc_html__( 'Expand images in lightbox', 'elementor' ),
96 + 'label' => esc_html__( 'Enable Lightbox In Editor', 'elementor' ),
128 97 'type' => Controls_Manager::SWITCHER,
129 98 'default' => 'yes',
130 - 'label_on' => esc_html__( 'Yes', 'elementor' ),
131 - 'label_off' => esc_html__( 'No', 'elementor' ),
132 - 'description' => esc_html__( 'This only applies while you’re working in the editor. The front end won’t be affected.', 'elementor' ),
133 99 ]
134 100 );
135 101
136 102 $this->add_control(
137 - 'show_hidden_elements',
103 + 'responsive_heading',
138 104 [
139 - 'label' => esc_html__( 'Show hidden elements', 'elementor' ),
140 - 'type' => Controls_Manager::SWITCHER,
141 - 'label_on' => esc_html__( 'Yes', 'elementor' ),
142 - 'label_off' => esc_html__( 'No', 'elementor' ),
143 - 'default' => 'yes',
144 - 'description' => esc_html__( 'This refers to elements you’ve hidden in the Responsive Visibility settings.', 'elementor' ),
145 - ]
146 - );
147 -
148 - if ( ChecklistModule::should_display_checklist_toggle_control() ) {
149 - $this->add_control(
150 - 'get_started_heading',
151 - [
152 - 'label' => esc_html__( 'Get Started', 'elementor' ),
153 - 'type' => Controls_Manager::HEADING,
154 - 'separator' => 'before',
155 - ]
156 - );
157 -
158 - $this->add_control(
159 - ChecklistModule::VISIBILITY_SWITCH_ID,
160 - [
161 - 'label' => esc_html__( 'Show launchpad checklist', 'elementor' ),
162 - 'type' => Controls_Manager::SWITCHER,
163 - 'label_on' => esc_html__( 'Yes', 'elementor' ),
164 - 'label_off' => esc_html__( 'No', 'elementor' ),
165 - 'default' => Plugin::$instance->modules_manager->get_modules( 'checklist' )->is_preference_switch_on() ? 'yes' : '',
166 - 'description' => esc_html__( 'These will guide you through the first steps of creating your site.', 'elementor' ),
167 - ]
168 - );
169 - }
170 -
171 - $this->add_control(
172 - 'design_system_heading',
173 - [
174 - 'label' => esc_html__( 'Design System', 'elementor' ),
105 + 'label' => __( 'Responsive Preview', 'elementor' ),
175 106 'type' => Controls_Manager::HEADING,
176 107 'separator' => 'before',
177 108 ]
178 109 );
@@ -177,40 +108,30 @@
177 108 ]
178 109 );
179 110
180 111 $this->add_control(
181 - 'enable_styleguide_preview',
112 + 'show_hidden_elements',
182 113 [
183 - 'label' => esc_html__( 'Show global settings', 'elementor' ),
114 + 'label' => __( 'Hidden Elements', 'elementor' ),
184 115 'type' => Controls_Manager::SWITCHER,
116 + 'label_on' => 'Show',
117 + 'label_off' => 'Hide',
185 118 'default' => 'yes',
186 - 'label_on' => esc_html__( 'Yes', 'elementor' ),
187 - 'label_off' => esc_html__( 'No', 'elementor' ),
188 - 'description' => esc_html__( 'Temporarily overlay the canvas with the style guide to preview your changes to global colors and fonts.', 'elementor' ),
189 119 ]
190 120 );
191 121
192 122 $this->add_control(
193 - 'navigation_heading',
123 + 'default_device_view',
194 124 [
195 - 'label' => esc_html__( 'Navigation', 'elementor' ),
196 - 'type' => Controls_Manager::HEADING,
197 - 'separator' => 'before',
198 - ]
199 - );
200 -
201 - $this->add_control(
202 - 'exit_to',
203 - [
204 - 'label' => esc_html__( 'Exit to', 'elementor' ),
125 + 'label' => esc_html__( 'Default Device View ', 'elementor' ),
205 126 'type' => Controls_Manager::SELECT,
206 - 'default' => 'this_post',
127 + 'default' => 'default',
207 128 'options' => [
208 - 'this_post' => esc_html__( 'This Post', 'elementor' ),
209 - 'all_posts' => esc_html__( 'All Posts', 'elementor' ),
210 - 'dashboard' => esc_html__( 'WP Dashboard', 'elementor' ),
129 + 'default' => esc_html__( 'Default', 'elementor' ),
130 + 'mobile' => esc_html__( 'Mobile', 'elementor' ),
131 + 'tablet' => esc_html__( 'Tablet', 'elementor' ),
132 + 'desktop' => esc_html__( 'Desktop', 'elementor' ),
211 133 ],
212 - 'description' => esc_html__( 'Decide where you want to go when leaving the editor.', 'elementor' ),
213 134 ]
214 135 );
215 136
216 137 $this->end_controls_section();