Skip to content

Conversation

@productivemindsdotcom
Copy link

Validate two text-domains for child themes

File: /theme-check/checks/class-textdomain-check.php

Error:
The file correctly collects all unique text domains used in both parent and child themes. However, it incorrectly expects that only one text domain has been used across both parent and child themes. As a result, it displays an error message when the two correct domains (one for the parent theme and one for the child theme) are found.

Fix:
When, and only when, valid text domains for both child and parent themes are found, an appropriate "INFO" message is displayed instead of an error.

Reasoning behind the fix:
The parent theme must be activated to use a child theme. Consequently, the parent theme should be translated into any language that the child theme is being translated into. Therefore, when validating a child theme, it makes sense to check for both the parent and child theme text domains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants