-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Removing PHP notice for non pattern definition files #8631
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 1 commit
def2545
93364ad
44258cd
abf064c
4285d81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
$dirpath to pattern files filter
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1865,9 +1865,10 @@ public function get_block_patterns() { | |||||||||
| * | ||||||||||
| * @since 6.8 | ||||||||||
| * | ||||||||||
| * @param array $files Array of theme files found within `patterns` directory. | ||||||||||
| * @param array $files Array of theme files found within `patterns` directory. | ||||||||||
| * @param string $dirpath Path of theme `patterns` directory being scanned. | ||||||||||
| */ | ||||||||||
| $files = (array) apply_filters( 'get_block_patterns_files', $files ); | ||||||||||
| $files = (array) apply_filters( 'get_block_patterns_files', $files, $dirpath ); | ||||||||||
|
||||||||||
| $files = (array) apply_filters( 'get_block_patterns_files', $files, $dirpath ); | |
| $files = (array) apply_filters( 'theme_block_pattern_files', $files, $dirpath ); |
Outdated
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.
Casting as an array could hide if someone returns the wrong type which can make it harder to debug.
| $files = (array) apply_filters( 'get_block_patterns_files', $files, $dirpath ); | |
| $files = apply_filters( 'get_block_patterns_files', $files, $dirpath ); |
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.