-
Notifications
You must be signed in to change notification settings - Fork 58
Extract pattern metadata (title & description) #312
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
Changes from all commits
7f7bc16
cc4b02b
4cff589
2b14dfd
ffa8702
3298a2a
29c3b19
fe3b26d
8b584de
4a4549b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -618,6 +618,17 @@ protected function extract_strings() { | |
| PhpCodeExtractor::fromDirectory( $this->source, $translations, $options ); | ||
| } | ||
|
|
||
| if ( ! $this->skip_php ) { | ||
| $options = [ | ||
| // Extract 'Title' and 'Description' headers from pattern files. | ||
| 'wpExtractPatterns' => isset( $this->main_file_data['Theme Name'] ), | ||
| 'include' => array_merge( $this->include, array( 'patterns' ) ), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @swissspidy Do you know why this hardcodes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose the idea was to make this more efficient and only scan these files when needed. But you're right that this is already covered by the call above. I'll create a PHP to combine these.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| 'exclude' => $this->exclude, | ||
| 'extensions' => [ 'php' ], | ||
| ]; | ||
| PhpCodeExtractor::fromDirectory( $this->source, $translations, $options ); | ||
| } | ||
|
|
||
| if ( ! $this->skip_blade ) { | ||
| $options = [ | ||
| 'include' => $this->include, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.