From 5ffc3b2d7cfcad0a2f835f9c2cec8cbef83af109 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 18 Dec 2023 09:47:09 +0100 Subject: [PATCH] Honor location flag --- src/MakePotCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MakePotCommand.php b/src/MakePotCommand.php index d87a875..e022775 100644 --- a/src/MakePotCommand.php +++ b/src/MakePotCommand.php @@ -630,7 +630,7 @@ protected function extract_strings() { $translation->addExtractedComment( sprintf( '%s of the plugin', $header ) ); } - if ( $this->main_file_path ) { + if ( $this->main_file_path && $this->location ) { $translation->addReference( str_replace( "$this->source/", '', $this->main_file_path ) );