WPIntell

Source evidence

PHP Deprecated : Hook block_categories

Block for Font Awesome 路 support 路 2022-06-11T02:19:00+00:00

mixedsentiment
lowseverity
0.62relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 34 rows with source links

14.7% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
JP3 resolved
With 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!

Comments

2 shown
JP3 2022-06-11T03:33:00+00:00

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.

Ciprian Popescu 2022-06-13T16:57:00+00:00

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!