PluginProbe
Elementor Website Builder – more than just a page builder / 3.25.4
Elementor Website Builder – more than just a page builder v3.25.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/gutenberg/module.php +10 -13 4.3.0-beta23.25.4 View file →
@@ -38,14 +38,14 @@
38 38 */
39 39 public function register_elementor_rest_field() {
40 40 register_rest_field( get_post_types( '', 'names' ),
41 41 'gutenberg_elementor_mode', [
42 - 'update_callback' => function( $request_value, $obj ) {
43 - if ( ! User::is_current_user_can_edit( $obj->ID ) ) {
42 + 'update_callback' => function( $request_value, $object ) {
43 + if ( ! User::is_current_user_can_edit( $object->ID ) ) {
44 44 return false;
45 45 }
46 46
47 - $document = Plugin::$instance->documents->get( $obj->ID );
47 + $document = Plugin::$instance->documents->get( $object->ID );
48 48
49 49 if ( ! $document ) {
50 50 return false;
51 51 }
@@ -70,9 +70,9 @@
70 70 }
71 71
72 72 $this->is_gutenberg_editor_active = true;
73 73
74 - $suffix = Utils::is_script_debug() ? '' : '.min';
74 + $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
75 75
76 76 wp_enqueue_script( 'elementor-gutenberg', ELEMENTOR_ASSETS_URL . 'js/gutenberg' . $suffix . '.js', [ 'jquery' ], ELEMENTOR_VERSION, true );
77 77
78 78 $elementor_settings = [
@@ -94,12 +94,9 @@
94 94 ?>
95 95 <script id="elementor-gutenberg-button-switch-mode" type="text/html">
96 96 <div id="elementor-switch-mode">
97 97 <button id="elementor-switch-mode-button" type="button" class="button button-primary button-large">
98 - <span class="elementor-switch-mode-on">
99 - <i class="eicon-wordpress" aria-hidden="true"></i>
100 - <?php echo esc_html__( 'Edit with WordPress', 'elementor' ); ?>
101 - </span>
98 + <span class="elementor-switch-mode-on"><?php echo esc_html__( '&#8592; Back to WordPress Editor', 'elementor' ); ?></span>
102 99 <span class="elementor-switch-mode-off">
103 100 <i class="eicon-elementor-square" aria-hidden="true"></i>
104 101 <?php echo esc_html__( 'Edit with Elementor', 'elementor' ); ?>
105 102 </span>
@@ -176,13 +173,13 @@
176 173 *
177 174 * @since 3.21.0
178 175 * @access private
179 176 */
180 - private static function is_optimized_gutenberg_loading_enabled(): bool {
177 + private static function is_optimized_gutenberg_loading_enabled() : bool {
181 178 return (bool) get_option( 'elementor_optimized_gutenberg_loading', '1' );
182 179 }
183 180
184 - private static function should_dequeue_gutenberg_assets(): bool {
181 + private static function should_dequeue_gutenberg_assets() : bool {
185 182 $post = get_post();
186 183
187 184 if ( empty( $post->ID ) ) {
188 185 return false;
@@ -198,9 +195,9 @@
198 195
199 196 return true;
200 197 }
201 198
202 - private static function is_built_with_elementor( $post ): bool {
199 + private static function is_built_with_elementor( $post ) : bool {
203 200 $document = Plugin::$instance->documents->get( $post->ID );
204 201
205 202 if ( ! $document || ! $document->is_built_with_elementor() ) {
206 203 return false;
@@ -208,9 +205,9 @@
208 205
209 206 return true;
210 207 }
211 208
212 - private static function is_gutenberg_in_post( $post ): bool {
209 + private static function is_gutenberg_in_post( $post ) : bool {
213 210 if ( has_blocks( $post ) ) {
214 211 return true;
215 212 }
216 213
@@ -220,9 +217,9 @@
220 217
221 218 return false;
222 219 }
223 220
224 - private static function current_theme_is_fse_theme(): bool {
221 + private static function current_theme_is_fse_theme() : bool {
225 222 if ( function_exists( 'wp_is_block_theme' ) ) {
226 223 return (bool) wp_is_block_theme();
227 224 }
228 225 if ( function_exists( 'gutenberg_is_fse_theme' ) ) {