diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index a2a579eacb..05e3861f17 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -1048,6 +1048,11 @@ function delete_plugins( $plugins, $deprecated = '' ) { foreach ( $translations as $translation => $data ) { $wp_filesystem->delete( WP_LANG_DIR . '/plugins/' . $plugin_slug . '-' . $translation . '.po' ); $wp_filesystem->delete( WP_LANG_DIR . '/plugins/' . $plugin_slug . '-' . $translation . '.mo' ); + + $json_translation_files = glob( WP_LANG_DIR . '/plugins/' . $plugin_slug . '-' . $translation . '-*.json' ); + if ( $json_translation_files ) { + array_map( array( $wp_filesystem, 'delete' ), $json_translation_files ); + } } } } diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 1b472f3daf..7c307c33eb 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -88,6 +88,11 @@ function delete_theme( $stylesheet, $redirect = '' ) { foreach ( $translations as $translation => $data ) { $wp_filesystem->delete( WP_LANG_DIR . '/themes/' . $stylesheet . '-' . $translation . '.po' ); $wp_filesystem->delete( WP_LANG_DIR . '/themes/' . $stylesheet . '-' . $translation . '.mo' ); + + $json_translation_files = glob( WP_LANG_DIR . '/themes/' . $stylesheet . '-' . $translation . '-*.json' ); + if ( $json_translation_files ) { + array_map( array( $wp_filesystem, 'delete' ), $json_translation_files ); + } } } diff --git a/wp-includes/version.php b/wp-includes/version.php index bbe8f961b4..dafa089a1a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-beta1-44674'; +$wp_version = '5.1-beta1-44675'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.