Skip to content

Commit

Permalink
Cache-bust the asset
Browse files Browse the repository at this point in the history
  • Loading branch information
rinatkhaziev committed Dec 10, 2024
1 parent 34300a9 commit 4b759f6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion vip-jetpack/vip-jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ function vip_prevent_jetpack_post_by_email_database_noise() {
} );

// https://lobby.vip.wordpress.com/2024/12/10/notice-editor-issues-when-using-jetpack-version-13-7-and-wordpress-version-6-5/
add_action( 'plugins_loaded', 'vip_jetpack_disable_wpcom_block_editor' );
// Uncomment below line to enable the hotfix
// add_action( 'plugins_loaded', 'vip_jetpack_disable_wpcom_block_editor' );
function vip_jetpack_disable_wpcom_block_editor() {
global $wp_version;
$matching_jetpack_constraints = defined( 'JETPACK__VERSION' ) && version_compare( JETPACK__VERSION, '13.7', '<' );
Expand All @@ -472,3 +473,17 @@ function vip_jetpack_disable_wpcom_block_editor() {
} );
}
}
// Force cache flush
add_action( 'plugins_loaded', function () {
add_filter( 'script_loader_src',
function ( $src, $handle ) {
if ( 'wpcom-block-editor-default-editor-script' === $handle ) {
return $src . '.vip';
}

return $src;
},
PHP_INT_MIN,
2
);
} );

0 comments on commit 4b759f6

Please sign in to comment.