-
Notifications
You must be signed in to change notification settings - Fork 4
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
Issue-293: Create Structure for Features #305
Issue-293: Create Structure for Features #305
Conversation
Important Auto Review SkippedDraft detected. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor things to address before merge, otherwise 🍣
src/features/README.md
Outdated
$features = [ | ||
'Create_WordPress_Plugin\Features\Hello' => [ 'lyrics' => $lyrics ], | ||
]; | ||
$features = apply_filters( 'create_wordpress_plugin_features', $features ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filter isn't part of the features class itself, so I'd recommend not including it here in the example that shows adding a feature using the add_features method. It would be worthwhile to note in the example above that the filter is defined in the plugin's main file.
src/features/class-hello.php
Outdated
@@ -0,0 +1,94 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this into the features README as an example of a feature class so it's not a file that needs to be deleted after initializing the plugin
Pull Request
Description
Sets up a structure for Features, and a way to load them and reference them later.
Related Issue
Issue #293: Create Structure for Features