Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove/unnecessary textdomain filter #39552

Merged
merged 3 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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