Skip to content

Commit

Permalink
Fix condition for themes without license in the header
Browse files Browse the repository at this point in the history
  • Loading branch information
meszarosrob committed Apr 26, 2024
1 parent 3848cbf commit a4ec80c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MakePotCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ protected function get_file_comment() {
}

if ( isset( $this->main_file_data['Theme Name'] ) ) {
if ( isset( $this->main_file_data['License'] ) ) {
if ( ! empty( $this->main_file_data['License'] ) ) {
return sprintf(
"Copyright (C) %1\$s %2\$s\nThis file is distributed under the %3\$s.",
date( 'Y' ), // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
Expand All @@ -920,7 +920,7 @@ protected function get_file_comment() {
}

if ( isset( $this->main_file_data['Plugin Name'] ) ) {
if ( isset( $this->main_file_data['License'] ) && ! empty( $this->main_file_data['License'] ) ) {
if ( ! empty( $this->main_file_data['License'] ) ) {
return sprintf(
"Copyright (C) %1\$s %2\$s\nThis file is distributed under the %3\$s.",
date( 'Y' ), // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
Expand Down

0 comments on commit a4ec80c

Please sign in to comment.