This PR adds a fix to prevent a PHP fatal error when the value of the filtered block categories is not an array. This could happen when a third-party plugin or them is modifying the value of the filtered block categories with a non-appropriate value.
Closes #199
How to test the Change
Add the following to your theme's function.php file
add_action( 'block_categories_all', 'nullify_block_categories' );
function nullify_block_categories() {
return null;
}
Changelog Entry
Fixed - Prevent PHP fatal error when the value of the filtered block categories is not an array.
Description of the Change
This PR adds a fix to prevent a PHP fatal error when the value of the filtered block categories is not an array. This could happen when a third-party plugin or them is modifying the value of the filtered block categories with a non-appropriate value.
Closes #199
How to test the Change
Add the following to your theme's function.php file
Changelog Entry
Credits
Props @kmgalanakis
Checklist: