PluginProbe
Elementor Website Builder – more than just a page builder / 3.21.4
Elementor Website Builder – more than just a page builder v3.21.4
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 4.0.7 All 451 releases
← All changes | modules/safe-mode/module.php +33 -17 4.2.23.21.4 View file →
@@ -8,9 +8,9 @@
8 8 use Elementor\Core\Common\Modules\Ajax\Module as Ajax;
9 9 use Elementor\Utils;
10 10
11 11 if ( ! defined( 'ABSPATH' ) ) {
12 - exit; // Exit if accessed directly.
12 + exit; // Exit if accessed directly
13 13 }
14 14
15 15 class Module extends \Elementor\Core\Base\Module {
16 16
@@ -64,9 +64,9 @@
64 64 return $value;
65 65 }
66 66
67 67 /**
68 - * @throws \Exception If the safe mode cannot be enabled.
68 + * @throws \Exception
69 69 */
70 70 public function ajax_enable_safe_mode( $data ) {
71 71 if ( ! current_user_can( 'install_plugins' ) ) {
72 72 throw new \Exception( 'Access denied.' );
@@ -154,15 +154,11 @@
154 154 <style>
155 155 .elementor-safe-mode-toast {
156 156 position: absolute;
157 157 z-index: 10000; /* Over the loading layer */
158 - inset-block-end: 10px;
159 - inset-inline-end: 10px;
158 + bottom: 10px;
160 159 width: 400px;
161 160 line-height: 30px;
162 - display: flex;
163 - flex-direction: column;
164 - gap: 20px;
165 161 color: var(--e-a-color-txt);
166 162 background: var(--e-a-bg-default);
167 163 padding: 20px 25px 25px;
168 164 box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
@@ -169,8 +165,16 @@
169 165 border-radius: 5px;
170 166 font-family: var(--e-a-font-family);
171 167 }
172 168
169 + body.rtl .elementor-safe-mode-toast {
170 + left: 10px;
171 + }
172 +
173 + body:not(.rtl) .elementor-safe-mode-toast {
174 + right: 10px;
175 + }
176 +
173 177 #elementor-try-safe-mode {
174 178 display: none;
175 179 }
176 180
@@ -191,32 +195,44 @@
191 195
192 196 .elementor-safe-mode-toast header {
193 197 display: flex;
194 198 align-items: center;
195 - gap: 10px;
199 + justify-content: space-between;
200 + flex-wrap: wrap;
201 + margin-block-end: 20px;
196 202 }
197 203
204 + .elementor-safe-mode-toast header > * {
205 + margin-block-start: 10px;
206 + }
207 +
198 208 .elementor-safe-mode-toast header i {
199 209 font-size: 25px;
200 210 color: var(--e-a-color-warning);
201 211 }
202 212
213 + .elementor-safe-mode-toast header i {
214 + margin-inline-end: 10px;
215 + }
216 +
203 217 .elementor-safe-mode-toast header h2 {
204 218 flex-grow: 1;
205 219 font-size: 18px;
206 220 }
207 221
208 - .elementor-safe-mode-list {
209 - display: flex;
210 - flex-direction: column;
211 - gap: 10px;
222 + .elementor-safe-mode-list-item {
223 + margin-block-start: 10px;
224 + list-style: outside;
212 225 }
213 226
214 227 .elementor-safe-mode-list-item {
215 228 margin-inline-start: 15px;
216 - list-style: outside;
217 229 }
218 230
231 + .elementor-safe-mode-list-item b {
232 + font-size: 14px;
233 + }
234 +
219 235 .elementor-safe-mode-list-item-content {
220 236 font-style: italic;
221 237 color: var(--e-a-color-txt);
222 238 }
@@ -239,9 +255,9 @@
239 255 $this->print_safe_mode_css()
240 256 ?>
241 257 <div class="elementor-safe-mode-toast" id="elementor-safe-mode-message">
242 258 <header>
243 - <i class="eicon-warning" aria-hidden="true"></i>
259 + <i class="eicon-warning"></i>
244 260 <h2><?php echo esc_html__( 'Safe Mode ON', 'elementor' ); ?></h2>
245 261 <a class="elementor-button elementor-safe-mode-button elementor-disable-safe-mode" target="_blank" href="<?php echo esc_url( $this->get_admin_page_url() ); ?>">
246 262 <?php echo esc_html__( 'Disable Safe Mode', 'elementor' ); ?>
247 263 </a>
@@ -347,9 +363,9 @@
347 363 ?>
348 364 <div class="elementor-safe-mode-toast" id="elementor-try-safe-mode">
349 365 <?php if ( current_user_can( 'install_plugins' ) ) : ?>
350 366 <header>
351 - <i class="eicon-warning" aria-hidden="true"></i>
367 + <i class="eicon-warning"></i>
352 368 <h2><?php echo esc_html__( 'Can\'t Edit?', 'elementor' ); ?></h2>
353 369 <a class="elementor-button e-primary elementor-safe-mode-button elementor-enable-safe-mode" target="_blank" href="<?php echo esc_url( $this->get_admin_page_url() ); ?>">
354 370 <?php echo esc_html__( 'Enable Safe Mode', 'elementor' ); ?>
355 371 </a>
@@ -359,9 +375,9 @@
359 375 <a href="<?php Utils::print_unescaped_internal_string( self::DOCS_TRY_SAFE_MODE_URL ); ?>" target="_blank"><?php echo esc_html__( 'Learn More', 'elementor' ); ?></a>
360 376 </div>
361 377 <?php else : ?>
362 378 <header>
363 - <i class="eicon-warning" aria-hidden="true"></i>
379 + <i class="eicon-warning"></i>
364 380 <h2><?php echo esc_html__( 'Can\'t Edit?', 'elementor' ); ?></h2>
365 381 </header>
366 382 <div class="elementor-toast-content">
367 383 <?php echo esc_html__( 'If you are experiencing a loading issue, contact your site administrator to troubleshoot the problem using Safe Mode.', 'elementor' ); ?>
@@ -424,9 +440,9 @@
424 440 return;
425 441 }
426 442
427 443 if ( ! $notice.data( 'visible' ) ) {
428 - $notice.attr( 'style', 'display: flex;' );
444 + $notice.show().data( 'visible', true );
429 445 }
430 446
431 447 // Re-check after 500ms.
432 448 setTimeout( handleTrySafeModeNotice, 500 );