Skip to content

Commit c8316fb

Browse files
committed
Docs.
1 parent 8cc9ada commit c8316fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ $filters = json_decode( $filters_json, true )['hooks'];
2929
// Search for filters matching a string:
3030
$search = 'permalink';
3131
$results = array_filter( $filters, function( array $hook ) use ( $search ) {
32-
return ( false !== strpos( $hook['name'], $search ) );
32+
return ( strpos( $hook['name'], $search ) !== false );
3333
} );
3434
3535
var_dump( $results );
@@ -44,7 +44,7 @@ const filters = require('@wp-hooks/wordpress-core/hooks/filters.json').hooks;
4444
4545
// Search for actions matching a string:
4646
const search = 'menu';
47-
const results = actions.filter( hook => ( null !== hook.name.match( search ) ) );
47+
const results = actions.filter( hook => ( hook.name.match( search ) !== null ) );
4848
4949
console.log(results);
5050
```

0 commit comments

Comments
 (0)