Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Fix: Remove extra comma which is inserted for themes without a textdomain #210

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

johnstonphilip
Copy link
Contributor

@johnstonphilip johnstonphilip commented Aug 10, 2023

Tasks

Summary of changes

If a theme doesn't have a TextDomain, patterns that have custom categories will have an extra comma in the PHP code, causing a fatal error.

How to test

  1. Make a theme but have no TextDomain in the style.css file
  2. Make a pattern with PM and add a custom category to it, and save the pattern.
  3. The site should not fatal.

Related:
https://wordpress.org/support/topic/creating-custom-category-causes-fatal-error/#post-16961268

Copy link
Contributor

@mike-day mike-day left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this, @johnstonphilip!

@johnstonphilip johnstonphilip merged commit c83d18b into main Aug 10, 2023
@johnstonphilip johnstonphilip deleted the fix/themes-without-textdomains branch August 10, 2023 17:07
Copy link
Contributor

@kienstra kienstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested this, but the code looks good.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants