| @@ -42,19 +42,10 @@ | ||
| 42 | 42 | add_filter( 'wxr_importer.pre_process.post_meta', [ __CLASS__, 'on_wxr_importer_pre_process_post_meta' ] ); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | 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 | 46 | } |
| 52 | 47 | |
| 53 | - public static function return_active() { | |
| 54 | - return 'active'; | |
| 55 | - } | |
| 56 | - | |
| 57 | 48 | public static function clear_3rd_party_cache() { |
| 58 | 49 | // W3 Total Cache. |
| 59 | 50 | if ( function_exists( 'w3tc_flush_all' ) ) { |
| 60 | 51 | w3tc_flush_all(); |
| @@ -64,9 +55,9 @@ | ||
| 64 | 55 | if ( ! empty( $GLOBALS['wp_fastest_cache'] ) && method_exists( $GLOBALS['wp_fastest_cache'], 'deleteCache' ) ) { |
| 65 | 56 | $GLOBALS['wp_fastest_cache']->deleteCache(); |
| 66 | 57 | } |
| 67 | 58 | |
| 68 | - // WP Super Cache. | |
| 59 | + // WP Super Cache | |
| 69 | 60 | if ( function_exists( 'wp_cache_clean_cache' ) ) { |
| 70 | 61 | global $file_prefix; |
| 71 | 62 | wp_cache_clean_cache( $file_prefix, true ); |
| 72 | 63 | } |
| @@ -87,20 +78,20 @@ | ||
| 87 | 78 | if ( ! User::is_current_user_can_edit_post_type( $typenow ) ) { |
| 88 | 79 | return; |
| 89 | 80 | } |
| 90 | 81 | |
| 91 | - // Introduced in WP 5.0. | |
| 82 | + // Introduced in WP 5.0 | |
| 92 | 83 | if ( function_exists( 'use_block_editor_for_post' ) && ! use_block_editor_for_post( $typenow ) ) { |
| 93 | 84 | return; |
| 94 | 85 | } |
| 95 | 86 | |
| 96 | - // Deprecated/removed in Gutenberg plugin v5.3.0. | |
| 87 | + // Deprecated/removed in Gutenberg plugin v5.3.0 | |
| 97 | 88 | if ( function_exists( 'gutenberg_can_edit_post_type' ) && ! gutenberg_can_edit_post_type( $typenow ) ) { |
| 98 | 89 | return; |
| 99 | 90 | } |
| 100 | 91 | |
| 101 | 92 | ?> |
| 102 | - <script> | |
| 93 | + <script type="text/javascript"> | |
| 103 | 94 | document.addEventListener( 'DOMContentLoaded', function() { |
| 104 | 95 | var dropdown = document.querySelector( '#split-page-title-action .dropdown' ); |
| 105 | 96 | |
| 106 | 97 | if ( ! dropdown ) { |
| @@ -213,9 +204,9 @@ | ||
| 213 | 204 | remove_filter( 'pum_admin_var', [ $pum_admin_instance, 'pum_admin_var' ] ); |
| 214 | 205 | } ); |
| 215 | 206 | } |
| 216 | 207 | |
| 217 | - // Fix Preview URL for https://github.com/wpmudev/domain-mapping plugin. | |
| 208 | + // Fix Preview URL for https://github.com/wpmudev/domain-mapping plugin | |
| 218 | 209 | if ( class_exists( 'domain_map' ) ) { |
| 219 | 210 | add_filter( 'elementor/document/urls/preview', function( $preview_url ) { |
| 220 | 211 | if ( wp_parse_url( $preview_url, PHP_URL_HOST ) !== Utils::get_super_global_value( $_SERVER, 'HTTP_HOST' ) ) { |
| 221 | 212 | $preview_url = \domain_map::utils()->unswap_url( $preview_url ); |
| @@ -227,9 +218,9 @@ | ||
| 227 | 218 | return $preview_url; |
| 228 | 219 | } ); |
| 229 | 220 | } |
| 230 | 221 | |
| 231 | - // Gutenberg. | |
| 222 | + // Gutenberg | |
| 232 | 223 | if ( function_exists( 'gutenberg_init' ) ) { |
| 233 | 224 | add_action( 'admin_print_scripts-edit.php', [ __CLASS__, 'add_new_button_to_gutenberg' ], 11 ); |
| 234 | 225 | } |
| 235 | 226 | } |
| @@ -249,9 +240,9 @@ | ||
| 249 | 240 | * @access private |
| 250 | 241 | * @static |
| 251 | 242 | */ |
| 252 | 243 | private static function polylang_compatibility() { |
| 253 | - // Copy elementor data while polylang creates a translation copy. | |
| 244 | + // Copy elementor data while polylang creates a translation copy | |
| 254 | 245 | add_filter( 'pll_copy_post_metas', [ __CLASS__, 'save_polylang_meta' ], 10, 4 ); |
| 255 | 246 | } |
| 256 | 247 | |
| 257 | 248 | /** |