Skip to content

Commit

Permalink
Remove/unnecessary textdomain filter (#39552)
Browse files Browse the repository at this point in the history
* i18n: Remove unnecessary filter to loading translations

This filter has been moved to D162485-code

* changelog

* Add changelog files
  • Loading branch information
d-alleyne authored Sep 27, 2024
1 parent bfbd852 commit b6a5258
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

jetpack-mu-wpcom: remove unneeded filter
18 changes: 0 additions & 18 deletions projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,6 @@ public static function init() {
return;
}

add_filter(
'load_script_textdomain_relative_path',
function ( $relative ) {
// Check if $relative is a string and contains the required segment
if ( str_contains( $relative, 'vendor/automattic/jetpack-mu-wpcom/' ) ) {
$pattern = '#^(?:production|staging|moon|sun)/#'; // Matches the environment prefix on Simple Sites

if ( preg_match( $pattern, $relative ) ) {
$relative = preg_replace( $pattern, '', $relative ); // Remove the environment prefix
}
}

return $relative;
},
10,
2
);

// Shared code for src/features.
require_once self::PKG_DIR . 'src/common/index.php'; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.NotAbsolutePath
require_once __DIR__ . '/utils.php';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: removed an unused filter


Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: removed an unused filter


0 comments on commit b6a5258

Please sign in to comment.