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

Theme's style.css not detected when in a subdirectory #124

Closed
bradyvercher opened this issue Dec 18, 2018 · 1 comment
Closed

Theme's style.css not detected when in a subdirectory #124

bradyvercher opened this issue Dec 18, 2018 · 1 comment

Comments

@bradyvercher
Copy link

I'm working on bundling this package as the engine for node-wp-i18n (which is used by grunt-wp-i18n), but am running into a few failing tests due to slight differences in the way they work.

WordPress supports themes that are in a subdirectory of the theme root directory, but this command doesn't detect style.css files that aren't in the theme root and doesn't include a way to specify where to find the main file with the package metadata.

There could potentially be multiple nested themes in a themes in a theme directory, which would pose a problem for automatically detecting the correct theme when running wp i18n from the theme root, but the most common use case is to use the root directory for development and config related files, with style.css and templates in a subdirectory. This structure can be found in the Make theme, Sage, and WP Rig.

Here's the issue in node-wp-i18n where support was requested and added.

@swissspidy
Copy link
Member

Huh, I knew I saw this code before but somehow surprised WordPress still supports that.

Should be as easy as updating MakePotCommand::get_main_file_data(). Doesn't hurt to refactor that method anyway.

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

No branches or pull requests

2 participants