PluginProbe
Elementor Website Builder – more than just a page builder / 3.9.1
Elementor Website Builder – more than just a page builder v3.9.1
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 | includes/compatibility.php +8 -18 4.2.0-dev23.9.1 View file →
@@ -3,9 +3,8 @@
3 3
4 4 use Elementor\Core\Base\Document;
5 5 use Elementor\Core\DocumentTypes\PageBase;
6 6 use Elementor\TemplateLibrary\Source_Local;
7 -use Elementor\Utils;
8 7
9 8 if ( ! defined( 'ABSPATH' ) ) {
10 9 exit; // Exit if accessed directly.
11 10 }
@@ -42,19 +41,10 @@
42 41 add_filter( 'wxr_importer.pre_process.post_meta', [ __CLASS__, 'on_wxr_importer_pre_process_post_meta' ] );
43 42 }
44 43
45 44 add_action( 'elementor/maintenance_mode/mode_changed', [ __CLASS__, 'clear_3rd_party_cache' ] );
46 -
47 - // Enable floating buttons and link in bio experiment for all.
48 - // TODO Remove in version 3.26.
49 - add_filter( 'pre_option_elementor_experiment-floating-buttons', [ __CLASS__, 'return_active' ] );
50 - add_filter( 'pre_option_elementor_experiment-link-in-bio', [ __CLASS__, 'return_active' ] );
51 45 }
52 46
53 - public static function return_active() {
54 - return 'active';
55 - }
56 -
57 47 public static function clear_3rd_party_cache() {
58 48 // W3 Total Cache.
59 49 if ( function_exists( 'w3tc_flush_all' ) ) {
60 50 w3tc_flush_all();
@@ -64,9 +54,9 @@
64 54 if ( ! empty( $GLOBALS['wp_fastest_cache'] ) && method_exists( $GLOBALS['wp_fastest_cache'], 'deleteCache' ) ) {
65 55 $GLOBALS['wp_fastest_cache']->deleteCache();
66 56 }
67 57
68 - // WP Super Cache.
58 + // WP Super Cache
69 59 if ( function_exists( 'wp_cache_clean_cache' ) ) {
70 60 global $file_prefix;
71 61 wp_cache_clean_cache( $file_prefix, true );
72 62 }
@@ -87,20 +77,20 @@
87 77 if ( ! User::is_current_user_can_edit_post_type( $typenow ) ) {
88 78 return;
89 79 }
90 80
91 - // Introduced in WP 5.0.
81 + // Introduced in WP 5.0
92 82 if ( function_exists( 'use_block_editor_for_post' ) && ! use_block_editor_for_post( $typenow ) ) {
93 83 return;
94 84 }
95 85
96 - // Deprecated/removed in Gutenberg plugin v5.3.0.
86 + // Deprecated/removed in Gutenberg plugin v5.3.0
97 87 if ( function_exists( 'gutenberg_can_edit_post_type' ) && ! gutenberg_can_edit_post_type( $typenow ) ) {
98 88 return;
99 89 }
100 90
101 91 ?>
102 - <script>
92 + <script type="text/javascript">
103 93 document.addEventListener( 'DOMContentLoaded', function() {
104 94 var dropdown = document.querySelector( '#split-page-title-action .dropdown' );
105 95
106 96 if ( ! dropdown ) {
@@ -213,12 +203,12 @@
213 203 remove_filter( 'pum_admin_var', [ $pum_admin_instance, 'pum_admin_var' ] );
214 204 } );
215 205 }
216 206
217 - // Fix Preview URL for https://github.com/wpmudev/domain-mapping plugin.
207 + // Fix Preview URL for https://github.com/wpmudev/domain-mapping plugin
218 208 if ( class_exists( 'domain_map' ) ) {
219 209 add_filter( 'elementor/document/urls/preview', function( $preview_url ) {
220 - if ( wp_parse_url( $preview_url, PHP_URL_HOST ) !== Utils::get_super_global_value( $_SERVER, 'HTTP_HOST' ) ) {
210 + if ( wp_parse_url( $preview_url, PHP_URL_HOST ) !== $_SERVER['HTTP_HOST'] ) {
221 211 $preview_url = \domain_map::utils()->unswap_url( $preview_url );
222 212 $preview_url = add_query_arg( [
223 213 'dm' => \Domainmap_Module_Mapping::BYPASS,
224 214 ], $preview_url );
@@ -227,9 +217,9 @@
227 217 return $preview_url;
228 218 } );
229 219 }
230 220
231 - // Gutenberg.
221 + // Gutenberg
232 222 if ( function_exists( 'gutenberg_init' ) ) {
233 223 add_action( 'admin_print_scripts-edit.php', [ __CLASS__, 'add_new_button_to_gutenberg' ], 11 );
234 224 }
235 225 }
@@ -249,9 +239,9 @@
249 239 * @access private
250 240 * @static
251 241 */
252 242 private static function polylang_compatibility() {
253 - // Copy elementor data while polylang creates a translation copy.
243 + // Copy elementor data while polylang creates a translation copy
254 244 add_filter( 'pll_copy_post_metas', [ __CLASS__, 'save_polylang_meta' ], 10, 4 );
255 245 }
256 246
257 247 /**