Skip to content

Commit

Permalink
a little clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mogmarsh committed Dec 21, 2023
1 parent 3bd416e commit 16c8473
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ function () {
// Load the plugin's main files.
require_once __DIR__ . '/src/assets.php';
require_once __DIR__ . '/src/meta.php';
require_once __DIR__ . '/src/class-feature-manager.php';

/**
* Instantiate the plugin.
*/
function main(): void {
// This should be an array with keys set to feature classnames and arguments
$features = [
// Add initial features here.
];
Expand Down
6 changes: 3 additions & 3 deletions src/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ add_filter( 'create_wordpress_plugin_features', function ( array $features ) use
return $features;
} );
```
### Add a feature using the add_features method
### Add a feature using the `add_features` method
```
$features = [
'Create_WordPress_Plugin\Features\Hello' => [ 'lyrics' => $lyrics ],
Expand All @@ -39,11 +39,11 @@ $features = apply_filters( 'create_wordpress_plugin_features', $features );
Feature_Manager::add_features( $features );
```
### Add a feature using the add_feature method
### Add a feature using the `add_feature` method
```
Feature_Manager::add_feature( 'Create_WordPress_Plugin\Features\Hello', [ 'lyrics' => $lyrics ] );
```
## Get the instance of an added feature
## Get the instance of an added feature with the `get_feature` method
```
$hello_feature = Feature_Manager::get_feature( 'Create_WordPress_Plugin\Features\Hello' );
```
Expand Down

0 comments on commit 16c8473

Please sign in to comment.