PluginProbe
Elementor Website Builder – more than just a page builder / 3.6.7
Elementor Website Builder – more than just a page builder v3.6.7
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 +28 -104 4.0.73.6.7 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 }
@@ -52,36 +52,19 @@
52 52 ]
53 53 );
54 54
55 55 $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 56 'ui_theme',
65 57 [
66 - 'label' => esc_html__( 'Display mode', 'elementor' ),
67 - 'type' => Controls_Manager::CHOOSE,
58 + 'label' => esc_html__( 'UI Theme', 'elementor' ),
59 + 'type' => Controls_Manager::SELECT,
60 + 'description' => esc_html__( 'Set light or dark mode, or use Auto Detect to sync it with your OS setting.', 'elementor' ),
61 + 'default' => 'auto',
68 62 '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 - ],
63 + 'auto' => esc_html__( 'Auto Detect', 'elementor' ),
64 + 'light' => esc_html__( 'Light', 'elementor' ),
65 + 'dark' => esc_html__( 'Dark', 'elementor' ),
81 66 ],
82 - 'default' => 'auto',
83 - 'description' => esc_html__( 'Set light or dark mode, or auto-detect to sync with your operating system settings.', 'elementor' ),
84 67 ]
85 68 );
86 69
87 70 $this->add_control(
@@ -86,13 +69,13 @@
86 69
87 70 $this->add_control(
88 71 'panel_width',
89 72 [
90 - 'label' => esc_html__( 'Width', 'elementor' ) . ' (px)',
73 + 'label' => esc_html__( 'Panel Width', 'elementor' ),
91 74 'type' => Controls_Manager::SLIDER,
92 75 'range' => [
93 76 'px' => [
94 - 'min' => 250,
77 + 'min' => 200,
95 78 'max' => 680,
96 79 ],
97 80 ],
98 81 'default' => [
@@ -101,24 +84,13 @@
101 84 ]
102 85 );
103 86
104 87 $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 88 'edit_buttons',
115 89 [
116 - 'label' => esc_html__( 'Show quick edit options', 'elementor' ),
90 + 'label' => esc_html__( 'Editing Handles', 'elementor' ),
117 91 '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' ),
92 + 'description' => esc_html__( 'Show editing handles when hovering over the element edit button.', 'elementor' ),
121 93 ]
122 94 );
123 95
124 96 $this->add_control(
@@ -123,56 +95,18 @@
123 95
124 96 $this->add_control(
125 97 'lightbox_in_editor',
126 98 [
127 - 'label' => esc_html__( 'Expand images in lightbox', 'elementor' ),
99 + 'label' => esc_html__( 'Enable Lightbox In Editor', 'elementor' ),
128 100 'type' => Controls_Manager::SWITCHER,
129 101 '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 102 ]
134 103 );
135 104
136 105 $this->add_control(
137 - 'show_hidden_elements',
106 + 'responsive_heading',
138 107 [
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' ),
108 + 'label' => __( 'Responsive Preview', 'elementor' ),
175 109 'type' => Controls_Manager::HEADING,
176 110 'separator' => 'before',
177 111 ]
178 112 );
@@ -177,40 +111,30 @@
177 111 ]
178 112 );
179 113
180 114 $this->add_control(
181 - 'enable_styleguide_preview',
115 + 'show_hidden_elements',
182 116 [
183 - 'label' => esc_html__( 'Show global settings', 'elementor' ),
117 + 'label' => __( 'Hidden Elements', 'elementor' ),
184 118 'type' => Controls_Manager::SWITCHER,
119 + 'label_on' => 'Show',
120 + 'label_off' => 'Hide',
185 121 '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 122 ]
190 123 );
191 124
192 125 $this->add_control(
193 - 'navigation_heading',
126 + 'default_device_view',
194 127 [
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' ),
128 + 'label' => esc_html__( 'Default Device View ', 'elementor' ),
205 129 'type' => Controls_Manager::SELECT,
206 - 'default' => 'this_post',
130 + 'default' => 'default',
207 131 'options' => [
208 - 'this_post' => esc_html__( 'This Post', 'elementor' ),
209 - 'all_posts' => esc_html__( 'All Posts', 'elementor' ),
210 - 'dashboard' => esc_html__( 'WP Dashboard', 'elementor' ),
132 + 'default' => esc_html__( 'Default', 'elementor' ),
133 + 'mobile' => esc_html__( 'Mobile', 'elementor' ),
134 + 'tablet' => esc_html__( 'Tablet', 'elementor' ),
135 + 'desktop' => esc_html__( 'Desktop', 'elementor' ),
211 136 ],
212 - 'description' => esc_html__( 'Decide where you want to go when leaving the editor.', 'elementor' ),
213 137 ]
214 138 );
215 139
216 140 $this->end_controls_section();