Conversation
supportWith the plugin activated, the following messages are showing up in my debug log. PHP Deprecated: Hook block_categories is deprecated since version 5.8.0! Use block_categories_all instead. in /path/to/wp-includes/functions.php on line 5754 PHP Deprecated: Hook block_categories is deprecated since version 5.8.0! Use block_categories_all instead. in /path/to/wp-includes/functions.php on line 5754 Fixed it with this: /path/to/wp-content/plugins/block-for-font-awesome/block-for-font-awesome.php line 103 add_filter( 'block_categories', 'getbutterfly_block_categories', 10, 2 ); change to: if ( version_compare( get_bloginfo( 'version' ), '5.8', '>=' ) ) { add_filter( 'block_categories_all', 'getbutterfly_block_categories', 10, 2 ); } else { add_filter( 'block_categories', 'getbutterfly_block_categories', 10, 2 ); } Hope to see an update soon 馃檪
Looked at my code for a few minutes and wasn鈥檛 happy with it. Too long. I turned your 1-liner into a 15-liner 馃檨 Here鈥檚 a 1-liner instead: add_filter( 'block_categories'.( ( version_compare( get_bloginfo( 'version' ), '5.8', '>=' ) ) ? '_all' : '' ), 'getbutterfly_block_categories', 10, 2 ); Marking as solved.
Thanks for the code. I have updated the plugin and made the block_categories_all default. I have also increased the WordPress version requirement to 5.8+. The block editor is making some huge jumps, and it鈥檚 not worth maintaining 2 versions. The next release of this plugin will include some WordPress 5.9 changes to the colour picker, so it will make version below 5.8 irrelevant anyway. Thanks again!
Looked at my code for a few minutes and wasn鈥檛 happy with it. Too long. I turned your 1-liner into a 15-liner 馃檨 Here鈥檚 a 1-liner instead: add_filter( 'block_categories'.( ( version_compare( get_bloginfo( 'version' ), '5.8', '>=' ) ) ? '_all' : '' ), 'getbutterfly_block_categories', 10, 2 ); Marking as solved.
Thanks for the code. I have updated the plugin and made the block_categories_all default. I have also increased the WordPress version requirement to 5.8+. The block editor is making some huge jumps, and it鈥檚 not worth maintaining 2 versions. The next release of this plugin will include some WordPress 5.9 changes to the colour picker, so it will make version below 5.8 irrelevant anyway. Thanks again!