Skip to content

Commit c45dadf

Browse files
authored
Fix Feature interface URL (#443)
1 parent ac13968 commit c45dadf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/features/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Features
22

3-
Features should be PHP classes that implement the [Alley\WP\Types\Feature interface](https://github.com/alleyinteractive/wp-type-extensions/blob/main/src/alley/wp/types/interface-feature.php).
3+
Features should be PHP classes that implement the [Alley\WP\Types\Feature interface](https://github.com/alleyinteractive/wp-type-extensions/blob/main/src/types/interface-feature.php).
44

55
Features should be located in the `src/features` directory of the plugin and have namespace `Create_WordPress_Plugin\Features;`
66

77
The following variable is passed to the `Class_Hello` feature in each of the following examples. This shows how we can remove any business logic from the feature and pass it in when the feature is added.
88

9-
```
9+
```php
1010
$lyrics = "Hello, Dolly
1111
Well, hello, Dolly
1212
It's so nice to have you back where you belong
@@ -25,7 +25,7 @@ $lyrics = "Hello, Dolly
2525

2626
Files in the features directory will be autoloaded, but features will not be automatically instantiated. Features are typically instantiated in the plugin's `main()` function.
2727

28-
```
28+
```php
2929
function main(): void {
3030
// Add features here.
3131
$plugin = new Group(
@@ -43,7 +43,7 @@ function main(): void {
4343

4444
This is a port of the infamous WordPress `hello.php` plugin to a feature. The lyrics would be passed in when the feature was called, as shown above.
4545

46-
```
46+
```php
4747
<?php
4848
/**
4949
* Feature implementation of hello.php

0 commit comments

Comments
 (0)